/* Reset & base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Header styling */
header {
    top: 0;
    width: 100%;
  background-color: rgba(35, 34, 34, 1);
  padding: 0.25rem 1rem;
  position: fixed;
  z-index: 1000;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav img {
  height: 60px;
  width: auto;
}

.header-title h1 {
  color: white;
  font-size: 2rem;
  margin-left: 1rem;
}

/* Menu styling */
.menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.menu a {
  border-radius: 5px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  padding: 6px 10px;
  transition: background 0.3s ease;
}

.menu a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

/* CTA dropdown */
.cta-menu {
  position: relative;
}

.cta-menu .cta {
  cursor: pointer;
  background-color: #a149f3 ;
  color: #000;
  padding: 6px 12px;
  border-radius: 5px;
  font-weight: bold;
}

.cta-menu .cta:hover {
background-color: #872fcc ;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 5px;
  display: none;
  flex-direction: column;
  min-width: 120px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 999;
}

.dropdown-menu ul {
  list-style: none;
}

.dropdown-menu ul li {
  border-bottom: 1px solid #eee;
}

.dropdown-menu ul li:last-child {
  border-bottom: none;
}

.dropdown-menu ul li a {
  padding: 10px;
  display: block;
  color: #333;
  text-decoration: none;
}

.dropdown-menu ul li a:hover {
  background-color: #f2f2f2;
}

/* Show dropdown on hover */
.cta-menu:hover .dropdown-menu {
  display: flex;
}


.top-players {
  background-image: url('/Images/throne.png');
  background-repeat: no-repeat;
  background-size: cover;     
  padding: 4rem 2rem;
  text-align: center;
  border-bottom: 1px solid #222;
  padding-top: 10rem;
  z-index: 1;
}

.top-players h1 {
  font-size: 2rem;
  color: #fff;
}

.top-players .subtitle {
  color: #aaa;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.top-player-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: end;
  z-index: 4;
}

.player-card {
  position: relative; 
  z-index: 0; 
  background: #1b1b1b;
  border: 1px solid #333;
  padding: 1.5rem;
  border-radius: 12px;
  width: 100%;
  max-width: 250px;
  overflow: hidden; 
  transition: transform 0.2s ease;
}

.player-card:hover {
  transform: translateY(-6px);
}

.player-card h3 {
  font-size: 1.25rem;
  color: #999;
}

.player-card .avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 1rem 0;
  border: 2px solid #7c3aed;
}

.player-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f3f3f3;
}

.player-score {
  color: #bbb;
  margin-top: 0.3rem;
  font-size: 0.95rem;
}

.player-card.first {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, #2b2b2b, #3a3a3a);
  border: 1px solid #7c3aed;
  transform: scale(1.05);
}

.player-card.first::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 140%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(208, 28, 221, 0.3), transparent 70%);
  z-index: -1;
  border-radius: 16px;
  filter: blur(20px);
}

.player-card.first:hover {
  transform: scale(1.075);
}

.leaderboard-section {
  background-color: #1d1d1d;
  padding: 4rem 2rem;
  color: #eee;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
  padding-top: 2rem !important;
}

/* Layout container for leaderboard and stats */
.leaderboard-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

/* Leaderboard block */
.leaderboard {
  background-color: #1b1b1b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
  width: 100%;
  max-width: 700px;
}

.leaderboard-header,
.leaderboard-row {
  display: grid;
  grid-template-columns: 1fr 4fr 2fr;
  padding: 0.8rem 1.2rem;
  align-items: center;
}

.leaderboard-header {
  background-color: #7c3aed;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.leaderboard-row {
  border-top: 1px solid #333;
  background-color: #1b1b1b;
  color: #ccc;
  font-weight: 500;
  transition: background 0.2s;
}

.leaderboard-row:nth-child(odd) {
  background-color: #222;
}

.rank {
  font-weight: 700;
}

.player {
  text-align: left;
  font-weight: 600;
}

.score {
  text-align: right;
  font-weight: 600;
}

/* Stats box */
.leaderboard-stats {
  background-color: #1b1b1b;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
  color: #eee;
  min-width: 240px;
  max-width: 300px;
  flex: 1 1 auto;
  overflow: hidden;
}

.leaderboard-stats h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #7c3aed;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}



.leaderboard-stats .leaderboard-header,
.leaderboard-stats .leaderboard-row {
  padding: 0.8rem 1.2rem;
}


.leaderboard-stats {
  max-width: 410px;
}

/* Use same row style but change column layout for stats */
.leaderboard-stats .leaderboard-header,
.leaderboard-stats .leaderboard-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 0.8rem 1.2rem;
  align-items: center;
}

.leaderboard-stats .score {
  text-align: center;
}



.site-footer {
  background-color: #111;
  color: #ccc;
  padding: 3rem 2rem;
  font-size: 0.9rem;
  border-top: 2px solid #333;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-left {
  flex: 1 1 250px;
}

.footer-logo {
  width: 60px;
  margin-bottom: 1rem;
}

.footer-links,
.footer-social {
  flex: 1 1 150px;
}

.footer-links h4,
.footer-social h4 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-links ul,
.footer-social ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li,
.footer-social ul li {
  margin-bottom: 0.4rem;
}

.footer-links a,
.footer-social a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-social a:hover {
  color: #fff;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
    color: #eee;
}

.footer-privacy h4 {
  margin-bottom: 0.5rem;
}

.footer-privacy a {
  color: #ccc;
  text-decoration: none;
}

.footer-privacy a:hover {
  color: #fff;
}

.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: max-content;
  max-width: 240px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  top: 120%; 
  right: 0;
  font-size: 14px;
  line-height: 1.4;
  transition: opacity 0.2s ease-in-out;
  white-space: normal;
  pointer-events: none;
  z-index: 10;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

@media screen and (max-width: 1200px) {
  .leaderboard{
    max-width: 475px;
    width: 100%;
  }
}

@media screen and (max-width: 1023px) {
  .leaderboard-stats{
    max-width: 525px;
    width: 100%;
  }
  .leaderboard{
    max-width: 525px;
    width: 100%;
  }
}

@media screen and (max-width: 500px){
  .leaderboard-stats .leaderboard-header,
.leaderboard-stats .leaderboard-row {
  font-size: 0.85rem;
}

  .leaderboard {
    font-size: 0.85rem;
  }

  .leaderboard-header {
    font-size: 0.85rem;
  }
}

@media screen and (max-width: 880px) {
  /* Default: desktop/tablet */
.top-player-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Mobile: below 880px = swipe carousel */
@media (max-width: 880px) {
  .top-player-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 1rem;
  }

  .player-card {
    flex: 0 0 80%;
    scroll-snap-align: center;
    margin: 0 auto;
  }

  .top-player-grid::-webkit-scrollbar {
    display: none;
  }
}

}

.leaderboard-search {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    background: #1b1b1b;
    padding: 1rem 1.5rem;
    border: 1px solid #333;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
    }


.leaderboard-search select,
.leaderboard-search input {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #444;
  background: #111;
  color: #eee;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.leaderboard-search select:focus,
.leaderboard-search input:focus {
  outline: none;
  border: 1px solid #7c3aed;
  box-shadow: 0 0 6px rgba(124, 58, 237, 0.6);
}

.leaderboard-search button {
  padding: 0.6rem 1.2rem;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.leaderboard-search button:hover {
  background: #872fcc;
  transform: translateY(-2px);
}

.leaderboard-search button:active {
  transform: translateY(0);
}


/* Leaderboard Section Heading */
.leaderboard-section h2 {
  text-align: center;           
  font-size: 2rem;             
  font-weight: 700;             
  color: #fff;             
  margin-bottom: 2rem;          
  line-height: 1.2;             
  padding: 0 1rem;             
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .leaderboard-section h2 {
    font-size: 1.75rem;        
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .leaderboard-section h2 {
    font-size: 1.5rem;          
    margin-bottom: 1rem;
  }
}

.player-card .rank-label {
    font-size: 1.25rem;
    color: #999;
    margin: 0; 
    text-align: center; 
    font-weight: 700;
}

.leaderboard-row.highlight,
.leaderboard-stats .leaderboard-row.highlight {
    background-color: #592167;
    transition: background-color 0.5s ease;
}

.leaderboard-row {
  transition: background-color 1s ease; /* smooth transition for all rows */
}