/* styles.css */

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

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

/* 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.png");
}

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

/* 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: 1px;
    /* 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);
}

/* 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);
}

/* 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;
}

.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 {
  background: var(--semi-transparent-bg);
  flex: 1;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

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

.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: 0;
  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.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: 8px 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; 
}

.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);
}

.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: 2px 20px;
  border: none;
  background: transparent;
  color: white;
  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); */
  text-transform: uppercase;
}

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

.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);
}

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

/* .league-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.league-container div {
  text-align: center;
  margin: 0 auto;
}

.league-container img {
  margin: 0 auto;
  width: 30px;
} TODO PROBABLY UNUSED */

.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;
}

.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;
}

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

.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: 35px;
}

.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;
}

.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 5px;
  transition: transform 0.3s ease;
  vertical-align: middle;
}

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

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

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

/* 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;
}
