/* Modal Container */
.profile-modal-content {
  background: rgba(30, 30, 30, 0.95);
  padding: 15px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-color);
  /* Maintain constant ~180px gap from leaderboard (60vw + 120px - 180px) */
  width: calc(60vw - 60px);
  height: 90vh;
  max-width: 900px;
  min-width: 620px;
  max-height: 90vh;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-color) var(--semi-transparent-bg);
  
  /* CSS Variables for champion grid - Fixed card width */
  --card-width: 250px;
  --items-per-view: 1;
  --modal-padding: 30px;
  --arrows-width: 100px;
}

/* Modal Header Section */
.profile-modal-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0px 10px;
  margin-bottom: 20px;
  width: 100%;
}

/* First Row: Player Name Container */
.playername-container {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

.star-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.star-toggle-btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Second Row: Player Info and Header Right */
.profile-modal-header-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.playerinfo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  flex: 1;
}

.profile-player-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: fit-content; /* Only as wide as the text content */
  max-width: calc(100% - 40px); /* But don't exceed container minus button space */
  text-align: left;
  transition: all 0.3s ease;
}

.profile-player-name:hover{
  color: rgba(255, 255, 255, 0.6);
}

.clipboard-btn {
  background: var(--semi-transparent-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-color);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  flex-shrink: 0; /* Never shrink - always visible */
}

.clipboard-btn:hover {
  background: var(--secondary-color);
  opacity: 1;
  transform: scale(1.05);
}

.clipboard-btn svg {
  width: 16px;
  height: 16px;
}

.last-seen {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Tier Container */
.tier-container {
  margin-top: 5px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

.tier-container img {
  width: 24px;
  height: 24px;
}

.tier-container p {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

.tier-container span{
  font-size: .9rem;
    text-transform: uppercase;
}

/* League Container */
.league-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.league-container img {
  width: 40px;
  height: 40px;
}

.league-container-rank{
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 10px;
}

.league-container-rank p{
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-size: .8rem !important;
}
.league-container-rank span{
  color: rgba(255, 255, 255, 0.6);
  font-size: .8rem !important;
}

.rank-box {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
}

.league-container p {
  font-size: 0.9rem;
  font-weight: 300;
  border-radius: 6px;
}

.profile-league-icon {
  width: 40px;
  height: 40px;
}

.profile-league {
  font-size: 0.9rem;
}

/* OP.GG Container */
.opgg-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Info Container Section */
.info-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
  align-items: center;
}

/* Premium Content Wrapper - Base Classes */
.premium-content-wrapper {
  width: 100%;
  margin: 0 auto;
  position: relative;
  display: inline-block;
  cursor: pointer;
}

/* Base locked state */
.premium-content-wrapper.locked {
  position: relative;
}

/* Universal lock icon styling */
.premium-content-wrapper.locked .lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  z-index: 10;
  color: var(--primary-color);
  filter: none !important;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Universal tooltip styling */
.premium-content-wrapper.locked .lock-tooltip {
  display: none;
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9em;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
}

.premium-content-wrapper.locked:hover .lock-tooltip {
  display: block !important;
}



/* Player Info Wrapper */
.player-info-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

/* Teammate Images */
.teammate-images-wrapper {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.teammate-image img {
  width: 30px;
  height: 30px;
}

.teammate-wr {
  font-size: 0.6rem;
  font-weight: 300;
}

/* Bottom Wrapper Section */
.bottom-wrapper {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}



.stack-header {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
}

.stack-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.85em;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--text-color);
  text-align: center;
  opacity: 0.8;
  min-width: 120px;
}

.stack-arrow {
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.stack-arrow:hover {
  color: #ffd700;
  opacity: 1;
  transform: scale(1.1);
}

.stack-arrow svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}




.progress-percent-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.8em;
  font-weight: bold;
  z-index: 3;
  background: rgba(30, 30, 30, 0.85);
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}


/* Match History Table */
.match-history-table {
  width: 100%;
  padding: 20px 5px;
}

/* Match History Unlock Tooltip - matches items tooltip exactly */
.match-history-unlock-tooltip {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-content-wrapper.locked:hover .match-history-unlock-tooltip {
  opacity: 0;
  visibility: hidden;
}

.premium-content-wrapper.locked.show-unlock-tooltip:hover .match-history-unlock-tooltip {
  opacity: 1;
  visibility: visible;
}




/* Premium Content Styles */
.premium-content {
  position: relative;
  pointer-events: none;
  user-select: none;
}
.premium-content > table {
  filter: blur(4px);
}
/* Tier-specific overrides */
.premium-content-wrapper.lock-tier-4 .lock-icon,
.premium-content-wrapper[data-tier="4"] .lock-icon {
  width: 32px;
  height: 32px;
}

.premium-content-wrapper.lock-tier-4 .lock-tooltip,
.premium-content-wrapper[data-tier="4"] .lock-tooltip {
  top: 40px;
}

.champion-items-table:hover .lock-tooltip {
  display: block !important;
}


.lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  z-index: 10;
  color: var(--primary-color);
  filter: none !important;
  pointer-events: none;
  transition: opacity 0.3s ease;
}


.premium-content-blur-wrapper {
  position: relative;
  display: inline-block;
  min-width: 20px;
  cursor: pointer;
}

.premium-content-blur-wrapper::before {
  content: "Unlock at Tier 2";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-content-blur-wrapper:hover::before {
  opacity: 1;
  visibility: visible;
}


.premium-content-blur-wrapper svg circle {
  filter: blur(2px);
}

.premium-content-blur-wrapper .progress-percent-center {
  filter: blur(4px);
  display: none;
}

/* Ensure lock icon stays sharp */
.premium-content-blur-wrapper .lock-icon {
  filter: none;
  z-index: 3;
}

@media (min-width: 769px) {
  .premium-content-blur-wrapper .lock-icon {
    width: 24px;
    height: 24px;
  }
}

/* Buttons */
.upgrade-profile-btn {
  margin-left: 5px;
  padding: 8px 10px;
  font-size: 0.7rem;
  background: var(--secondary-color);
  color: var(--text-color);
  border: none;
  cursor: pointer;
  font-weight: 400;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.upgrade-profile-btn:hover {
  background: var(--primary-color);
}

/* Profile Modal Tabs */
.profile-modal-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.tabs-buttons {
  display: flex;
}

.tab-btn {
  background: none;
  border: none;
  position: relative;
  top: 2.3px;
  color: var(--text-color);
  padding: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  border-radius: 0;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0);
  transition: all 0.3s ease;
  border-radius: 10px;
}

.tab-btn:hover {
  opacity: 1;
  background: none;
}

.tab-btn:hover::after {
  background-color: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
  opacity: 1;
  background: none;
  color: var(--text-color);
}

.tab-btn.active::after {
  background-color: var(--secondary-color);
}

.tab-btn.blurred {
  filter: blur(2px);
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.tab-btn .tab-text.blurred {
  filter: blur(2px);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Hover effects for locked tabs */
.tab-btn:hover .lock-icon {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-btn:hover .tab-text.blurred {
  filter: none;
  opacity: 0.4;
}

.tabs-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Tab Content */
.tab-content {
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Player Info Section */
.player-info-header {
  padding: 0 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.opgg-link {
  display: block;
  text-decoration: none;
  /* Removed max-width: 100px constraint that was limiting player name width */
}

.opgg-icon {
  width: 100%;
  height: auto;
}

/* Responsive Styles */





/* Hide by default */
.desktop-only {
  display: none;
}



.tab-btn .tab-lock-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  top: -22%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9em;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
}

.tab-btn:hover .tab-lock-tooltip,
.tab-btn:focus .tab-lock-tooltip,
.premium-content-wrapper:hover .tab-lock-tooltip {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.premium-content > canvas {
  filter: blur(4px);
}

/* Coming Soon Lock Styles */
.premium-content-wrapper.coming-soon-lock.premium-content > table {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.premium-content-wrapper.coming-soon-lock .lock-icon {
  width: 32px;
  height: 32px;
}

.premium-content-wrapper.coming-soon-lock .lock-tooltip {
  top: 40px;
}






/* Hide arrow when content is expanded */




















/* Above 1600px: Fixed width - profile modal doesn't shrink yet (100px delay after leaderboard) */
@media screen and (min-width: 1600px) {
  .profile-modal-content {
    width: 900px;
    max-width: 900px;
  }
}

/* Below 1600px: Use constant gap formula for seamless transition */
@media (max-width: 1599px) {
  .profile-modal-content {
    width: calc(60vw - 60px);
    max-width: 900px;
    min-width: 620px; /* Stops shrinking when leaderboard stops at 800px (800-180=620) */
  }
}

/* 1200-1599px: 2 cards */
@media (min-width: 1200px) and (max-width: 1599px) {
  .profile-modal-content {
    --items-per-view: 2;
  }
  .profile-champions-grid {
    justify-content: space-around;
  }
}

/* >=1600px: 3 cards */
@media (min-width: 1600px) {
  .profile-modal-content {
    --items-per-view: 3;
  }
  .profile-champions-grid {
    justify-content: space-around;
  }
}

/* Start width reduction at 768px to match leaderboard behavior */
@media (max-width: 768px) {
  .profile-modal-content {
    width: calc(60vw + 160px); /* Leaderboard width + 220px gap = maintains ~620px at 768px */
    max-width: 620px; /* Cap it at 620px */
    min-width: unset; /* Remove min-width constraint to allow shrinking */
  }
}

/* Removed complex 1024px/800px breakpoint */





@media (max-width: 600px) {
  .profile-modal-content {
    width: 95%;
    max-width: 620px; /* Maintain consistent gap with leaderboard */
    min-width: 320px; /* Ensure minimum width for very small screens */
    padding: 10px;
  }
  
  .profile-champions-grid {
    justify-content: center;
  }

  .profile-modal-header {
    gap: 10px;
    padding: 15px 5px;
  }

  .profile-modal-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }

  .playername-container {
    justify-content: center;
  }

  .playerinfo-container {
    align-items: center;
  }

  .header-right {
    justify-content: center;
    margin-top: 0;
  }

  .profile-modal-tabs {
    flex-direction: column;
    gap: 15px;
  }

  .tabs-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .tabs-right {
    width: 100%;
    justify-content: center;
  }

  .player-info-header {
    padding: 0 10px;
  }


}

@media (max-width: 600px) {

  .profile-modal-content {
    width: 95%;
    padding: 5px;
  }

  .profile-player-name {
    font-size: 1.2rem;
    max-width: calc(100% - 50px); /* Allow more space for player name on mobile */
  }
  
  .clipboard-btn {
    padding: 5px;
  }
  
  .clipboard-btn svg {
    width: 14px;
    height: 14px;
  }

  .tab-btn {
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .upgrade-profile-btn {
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .tabs-buttons {
    gap: 3px;
  }

  .tabs-right {
    gap: 5px;
  }



}

/* Show on screens with height greater than 800px */
@media (min-height: 800px) {
  .desktop-only {
    display: flex !important;
  }
}

/* Additional responsive adjustment for very tall screens */

/* Live Game Styles - Minimal styling now handled by profile-livegame.css */




