/* styles.css */

/* Font Declarations */
@font-face {
  font-family: "BeauMed";
  src: url("../fonts/Fontspring-DEMO-BeauMed_-iF66728d559ef57.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "HeyComic";
  src: url("../fonts/Hey Comic.woff2") format("woff2");
  font-display: swap;
}

/* CSS Variables */
:root {
    --primary-color: #D7A84E;           /* Gold */
    --secondary-color: #A64B44;         /* Red */
    --background-color: #000000;        /* Black */
    --text-color: #f0f0f0;             /* Light gray */
  --semi-transparent-bg: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --highlight-color: rgba(215, 168, 78, 0.3);
  --primary-color-rgb: 255, 99, 132;
}

/* Temperary  Styles*/

.profile-btn:disabled{
  background-color: transparent !important;
  color: #f0f0f0 !important;
  cursor: not-allowed !important;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body {
    background: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow-y: hidden;
  position: relative;
}

header {
  text-align: center;
  padding-top: 20px;
}

a {
  text-decoration: none;
}
/* Background decorative images */
.bg-left,
.bg-right {
  position: fixed;
  bottom: 0;
  height: auto;
  max-height: 130vh;
  z-index: -1;
  background-size: contain;
  background-position: bottom;
  background-repeat: no-repeat;
    filter: blur(6px);
    opacity: 0.2;
  display: none; /* Hidden by default - will be shown by JavaScript after loading */
  overflow: hidden;
}

.bg-left {
  left: 0;
  background-image: url("/static/imgs/bg/darius_transpbg3.webp");
}

.bg-right {
  right: 0;
  background-image: url("/static/imgs/bg/kat_transpbg2.webp");
}

/* Adjust the container to be more explicit about its width */
.container {
  max-width: 1140px; /* Increased from 800px */
  min-width: 800px;
  width: calc(60vw + 120px);
  margin: 0 auto;
  padding: 0 20px; /* Slightly less padding for smaller default */
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1; /* Ensure it's above backgrounds */
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-arena {
    font-family: 'BeauMed', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 2.5px;
    /* Remove the solid color */
    /* color: var(--primary-color); */

    /* Add the gradient background */
  background: linear-gradient(
        140deg,          /* Angle of the light */
        #a8873e,         /* Darker edge/shadow color */
        var(--primary-color) 20%, /* Main gold color starts */
        #f5e5b8 50%,     /* Bright highlight in the middle */
        var(--primary-color) 80%, /* Main gold color ends */
        #a8873e          /* Darker edge/shadow color */
    );
    
    /* Clip the background to the text shape */
  -webkit-background-clip: text;
  background-clip: text;
    
    /* Make the text color transparent so the background shows through */
  color: transparent;

    /* Optional: Add a very subtle shadow to enhance depth, like the 'L' */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
    
    /* Cross-browser font rendering normalization */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: auto;
    text-rendering: optimizeLegibility;
    
    /* Force consistent font rendering */
    font-synthesis: none;
    font-kerning: normal;
    
    /* Ensure consistent spacing */
    word-spacing: normal;
    text-indent: 0;
    
    /* Make text thicker with stroke */
    -webkit-text-stroke: 0.5px rgba(215, 168, 78, 0.8);
    text-stroke: 0.5px rgba(215, 168, 78, 0.8);
}

/* Define the new keyframes for background position animation */

/* Keep the SWEATS animation */
@keyframes bounce {
    0%, 100% {
    transform: translateY(0);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: translateY(-4px);
    text-shadow: 1px 3px 4px rgba(0, 0, 0, 0.15);
  }
}

.logo-sweats {
  display: inline-block;
  animation: bounce 2.8s ease-in-out infinite;
  /* Keep existing .logo-sweats styles */
    font-family: 'HeyComic', sans-serif;
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--secondary-color);
    
    /* Cross-browser font rendering normalization */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: auto;
    text-rendering: optimizeLegibility;
    
    /* Force consistent font rendering */
    font-synthesis: none;
    font-kerning: normal;
    
    /* Ensure consistent spacing */
    word-spacing: normal;
    text-indent: 0;
    
    /* Make text thicker with stroke */
    -webkit-text-stroke: 1px rgba(166, 75, 68, 0.8);
    text-stroke: 1px rgba(166, 75, 68, 0.8);
}

/* Search Section Starts Here */
.search-container {
  background: var(--semi-transparent-bg);
  backdrop-filter: blur(10px);
  padding: 15px;
  box-shadow: 0 8px 32px var(--shadow-color);
  margin: 20px auto; /* Reduced from 30px */
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 40;
  width: 100%; /* Changed from fixed values to 100% */
  box-sizing: border-box;
}

/* Season Subtitle */
.season-subtitle {
  text-align: center;
  margin: -10px auto;
  opacity: 0.6;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.season-year,
.season-word, 
.season-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 18px;
  text-transform: uppercase;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  display: inline-block;
}

.season-year,
.season-number {
  color: rgba(240, 240, 240, 0.9);
  text-shadow: 0 0 8px rgba(240, 240, 240, 0.3);
}

.season-word {
  color: rgba(215, 168, 78, 0.9);
  text-shadow: 0 0 8px rgba(215, 168, 78, 0.2);
  margin: 0 0;
  letter-spacing: 10px;
}

.search-container form {
  display: flex;
  gap: 10px;
  position: relative; /* This is important for absolute positioning */
}

.search-container input[type="text"] {
  position: relative;
  flex: 1;
}

form {
  display: flex;
  gap: 10px;
}

input[type="text"] {
  flex: 1;
  padding: 12px 20px;
  background: var(--semi-transparent-bg);
  color: var(--text-color);
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.search-btn {
  padding: 12px 25px;
  border: none;
  background: var(--secondary-color);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(166, 75, 68, 0.4);
}

/* Replace the previous .search-btn.loading CSS with this */
.search-btn.loading {
  position: relative;
  color: transparent; /* Hide the text */
  pointer-events: none; /* Prevent clicks while loading */
}

.search-btn.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid #fff;
  animation: spin 1s linear infinite;
}

/* Search Section Ends Here */

/* Leaderboard Section Starts Here */
.leaderboard-container {
  --starred-height: 0px;
  background: var(--semi-transparent-bg);
  flex: 1;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.leaderboard-carousel-container {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-color) var(--semi-transparent-bg);
  position: relative;
}

.starred-profiles-layer {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(9px);
  padding: 0 20px 4px;
}

.starred-profiles-layer[hidden] {
  display: none;
}

.starred-profiles-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: visible;
  padding: 0;
}

.starred-profiles-inner .carousel-item {
  position: relative;
  margin: 0;
  width: 100%;
  padding-left: 68px;
}

.starred-profiles-inner .star-toggle {
  position: absolute;
  top: 50%;
  left: 24px;
  --star-translate: -50%;
}

.leaderboard-carousel-container::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-carousel-container::-webkit-scrollbar-track {
  background: var(--semi-transparent-bg);
}

.leaderboard-carousel-container::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 3px;
}

.bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--background-color));
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.top-fade {
  position: absolute;
  top: calc(var(--starred-height, 0) - 1px);
  left: 0;
  width: 100%;
  height: 160px;
  background: linear-gradient(to bottom, var(--background-color), transparent);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.return-to-top {
  position: sticky;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 25px;
  border: none;
  background: var(--secondary-color);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease, bottom 0.5s ease; /* Add transition for bottom position */
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

/* Add this new class */
.return-to-top.comment-visible {
  bottom: 180px; /* Adjust this value based on the height of your support comment */
}

.return-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.return-to-top:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 5px 15px rgba(166, 75, 68, 0.4);
}

/* Carousel Starts Here */
.carousel-track {
  transition: transform 0.3s ease;
  min-height: 100%;
}

.carousel-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 20px;
  margin: 6px 15px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
  gap: 20px;
}


.star-toggle {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0;
  margin-right: 0;
  transform: translateY(var(--star-translate, 0)) scale(1);
  transition: color 0.2s ease, transform 0.25s ease;
}

.star-toggle::before {
  content: '\2606';
  font-size: 26px;
  line-height: 1;
}

.star-toggle:hover,
.star-toggle:focus-visible {
  color: var(--secondary-color);
  transform: translateY(var(--star-translate, 0)) scale(1.12);
}

.star-toggle.is-starred {
  color: var(--secondary-color);
}

.star-toggle.is-starred::before {
  content: '\2605';
}

.star-toggle:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.star-toggle--large {
  width: 42px;
  height: 42px;
}

.star-toggle--large::before {
  font-size: 32px;
}

/* Responsive star toggle sizing */
@media (max-width: 800px) {
  .star-toggle {
    width: 32px;
    height: 32px;
  }

  .star-toggle::before {
    font-size: 22px;
  }

  .star-toggle--large {
    width: 36px;
    height: 36px;
  }

  .star-toggle--large::before {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .star-toggle {
    width: 28px;
    height: 28px;
  }

  .star-toggle::before {
    font-size: 20px;
  }

  .star-toggle--large {
    width: 32px;
    height: 32px;
  }

  .star-toggle--large::before {
    font-size: 24px;
  }
}
.carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
}

.carousel-item:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Starred items in the starred profiles tray - full styling */
.starred-profiles-inner .carousel-item.starred {
  border-color: rgba(166, 75, 68, 0.9);
  box-shadow: 0 6px 18px rgba(166, 75, 68, 0.35);
  padding-left: 40px;
}

.starred-profiles-inner .carousel-item.starred .star-toggle {
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%) scale(0.85);
  z-index: 2;
}

.starred-profiles-inner .carousel-item.starred .star-toggle:hover,
.starred-profiles-inner .carousel-item.starred .star-toggle:focus-visible {
  color: var(--secondary-color);
  transform: translateY(-50%) scale(1.12);
}

/* Starred items in the main carousel track - only red border */
#carousel-track .carousel-item.starred {
  border-color: rgba(166, 75, 68, 0.9);
}

.carousel-item.selected {
  background: var(--highlight-color);
  border: 1px solid var(--primary-color);
  transform: scale(1.03);
  z-index: 3;
  box-shadow: 0 5px 15px var(--highlight-color);
}

.carousel-item.selected::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 6px;
  box-shadow: inset 0 0 15px var(--highlight-color);
  pointer-events: none;
}

.carousel-item .rank {
  font-weight: 700;
  margin-left: 10px;
}

.carousel-item .player-name {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  min-width: 0;
}

.player-name-text {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.carousel-item .rating {
  min-width: 100px;
  text-align: center;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.15);
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  /* margin-right: 40px; */
  flex: 0 0 80px;
  justify-content: center;
}

.carousel-item .champions {
  display: flex;
  gap: 5px;
  flex: 0 0 50px;
  justify-content: center;
  align-items: center;
}

.carousel-item .champions img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: help;
}

.carousel-item .champions img:hover {
  transform: scale(1.2);
  z-index: 10; /* Ensure it appears above other icons when enlarged */
}

.carousel-item .league {
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  position: relative !important;
}

.carousel-item .league img {
  width: 36px;
  height: 36px;

  cursor: help;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.carousel-item .league img:hover {
  transform: scale(1.2);
}

.carousel-item .rank,
.carousel-item .player-name,
.carousel-item .rating {
  display: flex;
  align-items: center;
}

.carousel-item .rank {
  justify-content: flex-end;
}

.carousel-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 30px;
  background: var(--semi-transparent-bg);
  border-radius: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.carousel-header .header-rank {
  flex: 0 0 70px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-header .header-name {
  flex: 1;
  text-align: left;
  padding-left: 70px;
  min-width: 0;
}

.carousel-header .header-rating {
  flex: 0 0 120px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  /* margin-right: 10px; */
}

.carousel-header .header-champs {
  flex: 0 0 130px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-header .header-profile {
  flex: 0 0 70px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading and Spinner Starts Here */
.carousel-loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 20px 0;
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #fff;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.carousel-spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #fff;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

.carousel-track.loading {
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error Message */
.error-message {
  background: rgba(255, 94, 94, 0.2);
  border-left: 4px solid #ff5e5e;
  padding: 15px;
  margin-top: 20px;
}

/* Donate Button */
.donate-btn {
  padding: 10px 20px;
  border: none;
  background: var(--secondary-color);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  margin: 8px auto;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 120px;
  display: block;
}

.donate-btn:hover {
  background: var(--primary-color);
  transform: scale(1.05);
  box-shadow: 0 5px 15px var(--highlight-color);
}

.profile-btn {
  padding: 0px 20px;
  border: none;
  background: transparent;
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 6px;
  /* box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); */
  text-transform: uppercase;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.profile-btn:hover {
  background: var(--secondary-color);
  transform: scale(1.0);
}

.profile-btn img {
  width: 25px;
  height: 25px;
}

.profile-btn p {
  margin-top: 1px;
  font-size: 12px;
  font-weight: 600;
  font-family: "Times New Roman", Times, "Georgia", "Garamond", serif;
  color: var(--text-color);
}

/* Button Group Container - Allow overflow for live game button */
.button-group {
  position: relative;
  display: inline-block;
  overflow: visible; /* Allow live game button to extend beyond */
}

/* When part of button group, keep rounded corners on both sides */
.button-group .profile-btn {
  border-radius: 14px;
}

/* Live indicator dot positioned to the left of profile icon and centered */
.button-group .live-indicator {
  position: absolute;
  top: 50%;
  left: 5px;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #ff4444;
  border-radius: 50%;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: block;
  transform-origin: center;
}

/* Pulse animation for live indicator */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.5; transform: translateY(-50%) scale(1.2); }
}

/* Pulse animation for live indicator when selected and offset */
@keyframes pulse-dot-offset {
  0%, 100% { opacity: 1; transform: translateY(-50%) translateX(-7px) scale(1); }
  50% { opacity: 0.5; transform: translateY(-50%) translateX(-7px) scale(1.2); }
}

/* Show dot when carousel item has live game active */
.carousel-item.live-game-active .button-group .live-indicator {
  opacity: 1;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Live Game Button - Absolutely positioned within button group */
.live-game-btn {
  position: absolute;
  top: 0;
  right: -45px;
  padding: 5px;
  border: none;
  background: url('/static/livegame-button-shape.svg') no-repeat center center;
  background-size: contain;
  color: white;
  font-family: "Montserrat", sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.75;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
  border-radius: 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 0;
  height: 100%;
  min-width: 30px;
  width: 70px;
  opacity: 0;
  pointer-events: none;
}


/* Show when carousel item has live game active */
.carousel-item.live-game-active .live-game-btn {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Fade-out state for live game button when player leaves */
.carousel-item.live-game-leaving .live-game-btn {
  opacity: 0;
  pointer-events: none;
}

.carousel-item.live-game-leaving .button-group .live-indicator {
  opacity: 0;
}

/* Fix profile button position when carousel item is both selected and live-game-active */
.carousel-item.selected.live-game-active .profile-btn {
  transform: translateX(-9px);
}

/* Offset live indicator and live game button by same amount */
.carousel-item.selected.live-game-active .button-group .live-indicator {
  animation: pulse-dot-offset 2s ease-in-out infinite;
}

.carousel-item.selected.live-game-active .live-game-btn {
  transform: translateX(-11px);
}

/* Hover States */
.live-game-btn:hover {
  filter: brightness(1.3);
}


.profile-rank {
  text-align: center;
  font-weight: 700;
  color: var(--text-color);
  background: var(--primary-color);
  padding: 4px 10px;
  border-radius: 4px;
}


.player-badge {
  --badge-size: 40px;  /* i literally dont understand how to change the size */
  position: relative;
  display: flex;
  align-items: center;
  left: -15px;
  top: 0px;
  height: 25px;
  width: 25px;
  justify-content: flex-start;
  z-index: 0;
}
.player-badge img {
  position: relative;
  left: 0;
  right: 0;
  margin: 0 auto;
  transition: transform 0.2s, z-index 0.2s, box-shadow 0.2s;
  cursor: pointer;
  opacity: 0.95;
  width: auto;
  height: var(--badge-size);
}
.player-badge img:nth-child(1) {
  top: 0px;
  z-index: 1;
}


.player-badge img:hover {
  z-index: 10;
  transform: scale(1.25) translateY(-8px);
  filter: drop-shadow(0 6px 18px var(--primary-color))
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18));
  box-shadow: none;
  opacity: 1;
}

/* Optional: Simple tooltip for badge hover */
.player-badge img[data-title]:hover::after {
  content: attr(data-title);
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.95);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 99;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Rank Change Styles */
.carousel-item .rank-change {
  flex: 0 0 60px;
  display: flex;
  align-items: center;
  justify-content: center; /* Changed from flex-end */
  font-weight: 700;
  gap: 2px;
  margin-right: -20px; /* Move closer to rating box */
}

.carousel-item .rank-change.positive {
  color: #4caf50; /* Green color */
}

.carousel-item .rank-change.negative {
  color: #f44336; /* Red color */
}

.carousel-item .change-arrow {
  font-size: 12px;
  line-height: 1;
}

/* Countdown Timer */
.countdown-timer {
  position: absolute;
  top: 30px;
  right: 30px;
  background: var(--semi-transparent-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 0px;
  padding: 10px 15px;
  box-shadow: 0 3px 8px var(--shadow-color);
  transition: all 0.3s ease;
  color: var(--text-color);
  z-index: 20;
}

.countdown-timer:hover {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px var(--highlight-color);
}

.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-value {
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.timer-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-top: 2px;
}

/* Pulse animation for the last 5 minutes */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.timer-value.almost-done {
  color: var(--secondary-color);
  animation: pulse 2s infinite;
}

.timer-value.final-countdown {
  color: #f44336; /* Brighter red */
  animation: pulse 1s infinite;
}

/* Updated region-selector CSS */
.region-selector {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 62;
}

.season-selector {
  position: absolute;
  top: 80px;
  left: 30px;
  z-index: 61;
}

.region-btn,
.season-btn {
  background: var(--semi-transparent-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 0px;
  padding: 10px 15px;
  color: var(--text-color);
  font-family: "Montserrat", sans-serif; /* Match website font */
  /* font-weight: 600; */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px var(--shadow-color);
  display: flex;
  align-items: center;
  gap: 12px; /* Increased spacing between elements */
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.region-btn:hover,
.season-btn:hover {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px var(--highlight-color);
}

.region-label {
  letter-spacing: 0.5px; /* Match the style of timer-label */
}

.region-value,
.season-value {
  color: var(--primary-color); /* Match the timer-value color */
  font-weight: 600;
}

.dropdown-arrow {
  border: solid var(--text-color);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-left: 3px; /* Add some space after the text */
}

.region-btn.active .dropdown-arrow,
.season-btn.active .dropdown-arrow {
  transform: rotate(-135deg);
}

/* Side Widgets */
.side-widget {
  position: fixed;
  bottom: 20px;
  background: transparent;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 90;
  width: 120px;
  text-align: center;
}

.side-widget.visible {
  opacity: 1;
  visibility: visible;
}

.left-widget {
  /* Position will be set by JavaScript */
  bottom: 20px;
}

.right-widget {
  /* Position will be set by JavaScript */
  bottom: 30px;
}

.widget-text {
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.4;
  margin-bottom: 12px;
  opacity: 0.8;
}

#community-widget .widget-text {
  margin-bottom: 8px;
}

.widget-btn {
  padding: 8px 15px;
  border: none;
  background: var(--secondary-color);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 120px;
}

.widget-btn:hover {
  background: var(--primary-color);
  transform: scale(1.05);
  box-shadow: 0 5px 15px var(--highlight-color);
}

/* Match the support-link and support-icon styles from the support comment */
.side-widget .support-link {
  display: inline-flex;
  align-items: center;
  margin: 0;
  transition: transform 0.3s ease;
  vertical-align: middle;
}

.side-widget .support-link:hover {
  transform: scale(1.1);
}

.side-widget .support-icon {
  width: 121px;
  height: 38px;
  vertical-align: middle;
}

/* Help Button */
.help-selector {
  position: absolute;
  top: 130px; /* Position below the region selector */
  left: 30px;
  z-index: 60;
}

/* Fix for help button height and dropdown position */
.help-btn {
  background: var(--semi-transparent-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 0px;
  padding: 10px 15px; /* Same padding as region-btn */
  color: var(--text-color);
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px var(--shadow-color);
  display: flex;
  align-items: center;
  gap: 12px; /* Match the gap in region-btn */
  min-width: 110px;
}

.help-btn:hover {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px var(--highlight-color);
}

.help-btn.active {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px var(--highlight-color);
}

.help-text {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.help-btn .dropdown-arrow {
  border: solid var(--text-color);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-left: 18px;
}

.help-btn.active .dropdown-arrow {
  transform: rotate(-135deg); /* Same rotation as region-btn */
}

.empty-leaderboard-message {
  display: flex;
  height: 100%;
  min-height: 200px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-size: 18px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.4);
  margin: 0;
  width: 100%;
  line-height: 1.5;
  /* Ensure this doesn't cause scrollbars */
  box-sizing: border-box;
}



.profile-btn:disabled,
.donate-btn:disabled,
.widget-btn:disabled,
.upgrade-profile-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;                
    pointer-events: none;
}

/* Disable text selection for specific UI elements */
header,
.logo,
.search-container,
.search-btn,
button,
.carousel-header,
.carousel-item .league img,
.carousel-item .profile-btn img,
.carousel-item .champions,
.player-badge,
.countdown-timer,
.region-selector,
.season-selector,
.side-widget,
.upgrade-modal-title,
.badges-wrapper,
.badges-wrapper *,
.pick-rate-heading,
.win-rate-heading {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
