/* LIV-Inspired Leaderboard Styling */

.stat-block.scoring-leaders {
  color: #fff;
  padding: 24px 20px;
  border-radius: 12px;
  max-width: 500px;
  margin: 0 auto 40px auto;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border-left: 4px solid #00ff87;
  background-color: transparent;
}

.stat-block.scoring-leaders h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #00ff87;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 2px solid #222;
  padding-bottom: 6px;
  background-color: transparent;
}

/* Leaderboard layout */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Player card layout */
.player-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: linear-gradient(90deg, #1a1a1a, #111);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #333;
  transition: all 0.2s ease-in-out;
  height: 200px;
  position: relative;
  text-transform: uppercase;
  background-color: transparent;
}


/* Hover effect */
.player-row:hover {
  background: linear-gradient(90deg, #222, #1a1a1a);
  transform: scale(1.01);
  background-color: transparent;
}

/* Player rank in top-left */
.rank {
  position: absolute;
  top: 10px;
  right: 25px;
  font-weight: bold;
  font-size: 2rem;
  color: #656464;
  z-index: 2;
  background-color: transparent;
}

/* Player image section (1/3 of card) */
.player-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
  background-color: transparent;
}

/* Image container to control sizing */
.player-img-container {
  width: 33%;
  max-width: 180px;
  height: 100%;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
  flex-shrink: 0;
  background-color: transparent;
}

/* Info section (2/3 of card) */
.player-info {
  width: 67%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 20px;
  color: #fff;
  background: none;
  background-color: transparent;
}

/* Name styling */
.first-name {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 4px;
  background-color: transparent;
}

.last-name {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  background-color: transparent;
}

/* Label for scoring avg */
.stat-label {
  font-size: 0.85rem;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  background-color: transparent;
}

/* Actual scoring average */
.stat-value {
  font-weight: 700;
  font-size: 1.4rem;
  color: #00ff87;
  background-color: transparent;
}

/*Toggle Styling*/
.leader-toggle {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.leader-toggle button {
  background: none;
  border: 1px solid #ccc;
  padding: 0px 0px;
  cursor: pointer;
  color: #fff;
  font-weight: bold;
}

.leader-toggle button.active {
  background: #fff;
  color: #000;
}

.leaderboard-block.hidden {
  display: none;
}

/* Outer pill background */
.toggle-outer-pill {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #333; /* dark grey */
  border-radius: 999px;
  width: 285px;
  margin: 0 auto 15px auto; 
  padding-bottom: 9px;
}

/* Toggle Container */
.toggle-container {
  display: flex;
  align-items: center;
  background-color: transparent;
  gap: 8;
}

/* Toggle Buttons */
.stats-toggle-button {
  width: 130px;
  height: 30px;
  background-color: #333; /* Dark grey base */
  color: black;
  border: none;
  outline: none;
  padding: 0px 0px;
  margin: 0 0px;
  border-radius: 999px; /* pill shape */
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  text-transform: uppercase;
}

/* Active State */
.stats-toggle-button.active {
  background-color: #00ff87;
  color: #000;
  border: none;
}

@media (max-width: 480px) {
	/* Outer pill background */
	.toggle-outer-pill {
	  display: flex;
	  justify-content: center;
	  align-items: center;
	  background-color: #333; /* dark grey */
	  border-radius: 999px;
	  width: 285px;
	  margin: 0 auto 15px auto; 
	  padding-bottom: 9px;
	}

	/* Toggle Container */
	.toggle-container {
	  flex-wrap: nowrap;
	  justify-content: center;
	  background-color: transparent;
	  gap: 8;
	}

	/* Toggle Buttons */
	.stats-toggle-button {
	  width: 130px;
	  height: 30px;
	  background-color: #333; /* Dark grey base */
	  color: black;
	  border: none;
	  padding: 0px 0px;
	  margin: 0 0px;
	  border-radius: 999px; /* pill shape */
	  font-size: 1rem;
	  font-weight: 600;
	  cursor: pointer;
	  transition: background-color 0.3s, color 0.3s;
	  text-transform: uppercase;
	}

	/* Active State */
	.stats-toggle-button.active {
	  background-color: #00ff87;
	  color: #000;
	  border: none;
	}
}


/* === CURRENT EVENT LEADERBOARD === */
#current-event-leaderboard {
  background-color: #0d0d0d;
  color: #fff;
  padding: 24px 20px;
  border-radius: 12px;
  max-width: 500px;
  margin: 0 auto 40px auto;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border-left: 4px solid #00ff87;
}

#current-event-leaderboard h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #00ff87;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 2px solid #222;
  padding-bottom: 6px;
}

/* Leaderboard Table */
.leaderboard-table {
  width: 100%;
  max-height: 700px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.leaderboard-table thead th {
  text-align: left;
  padding: 10px 14px;
  color: #bbb;
  text-transform: uppercase;
  font-size: 0.75rem;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
}

.leaderboard-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #262626;
  color: #f0f0f0;
}

.leaderboard-table tbody tr:hover {
  background-color: #1c1c1c;
}

.leaderboard-table .player-name-cell {
	display: flex;
	align-items: center;
}

/* First Place Styling */
/*.leaderboard-first-place {
  background: linear-gradient(90deg, #113322, #1a3f2a);
  color: #00ff87;
  font-weight: bold;
  font-size: 1rem;
}*/

/* Player Cell Layout */
.player-img-container {
  display: flex;
  align-items: center;
  gap: 10px;
}



.leaderboard-avatar {
  width: 30px;
  height: 30px;
  object-fit: cover;
  margin-right: 15px;
  /*border: 1px solid #fff;*/
}

/* Responsive: Keep layout same for mobile */
@media (max-width: 540px) {
  .leaderboard-table thead {
    display: none;
  }

  .leaderboard-table tbody tr {
    display: table-row;
    border: none;
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
  }

  .leaderboard-table tbody td {
    display: table-cell;
    padding: 10px 8px;
    border-bottom: 1px solid #262626;
  }

  .leaderboard-table tbody td::before {
    content: none;
  }
}

/* ====== TOURNAMENT LEADERBOARD ====== */

/* TOURNAMENT LEADERBOARD CONTAINER */
#tournament-leaderboard {
  color: #fff;
  padding: 24px 20px;
  border-radius: 12px;
  max-width: 90%;
  margin: 0 auto 40px auto;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border-left: 4px solid #00ff87;
  background-color: transparent;
}

/* LEADERBOARD TABLE */
#tournament-leaderboard table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

/* Make grid lines transparent */
#tournament-leaderboard table,
#tournament-leaderboard th,
#tournament-leaderboard td {
  border: 1px solid transparent;
}

/* Table header */
#tournament-leaderboard thead th {
  text-align: center;
  padding: 10px 14px;
  color: #bbb;
  text-transform: uppercase;
  font-size: 0.75rem;
  background: #1a1a1a;
  border-bottom: 1px solid transparent; /* keep border invisible */
}

/* Player name column aligned left */
#tournament-leaderboard thead th:nth-child(2),
#tournament-leaderboard tbody td:nth-child(2) {
  text-align: left;
  padding-left: 15px;
}

/* Table body cells */
#tournament-leaderboard tbody td {
  padding: 12px 14px;
  color: #f0f0f0;
  text-align: center;
  border-bottom: 1px solid transparent; /* invisible line */
}

/* Player name column body aligned left */
#tournament-leaderboard tbody td:nth-child(2) {
  text-align: left;
  padding-left: 15px;
}

/* Hover effect */
#tournament-leaderboard tbody tr:hover {
  background-color: #1c1c1c;
}

/* Event logos images - max 50px */
#tournament-leaderboard thead th img,
#tournament-leaderboard tbody td img {
  max-height: 50px;
  vertical-align: middle;
  display: block;
  margin: 0 auto;
  background-color: #1a1a1a;
}

/* Responsive for mobile */
@media (max-width: 540px) {
  #tournament-leaderboard {
    max-width: 100%;       /* full width on small devices */
    padding: 12px 8px;     /* tighter padding */
  }

  /* Smaller logos to save space */
  #tournament-leaderboard thead th img,
  #tournament-leaderboard tbody td img {
    max-height: 18px;
    max-width: 40px;
    margin: 0 auto;
    background-color: #1a1a1a;
  }

  #tournament-leaderboard thead th,
  #tournament-leaderboard tbody td {
    height: 40px;
    padding: 5px 6px;
    font-size: 0.75rem;
  }

  #tournament-leaderboard thead {
    display: table-header-group; /* ensure header visible on scroll */
  }

  /* Player name column left align with minimal padding */
  #tournament-leaderboard thead th:nth-child(2),
  #tournament-leaderboard tbody td:nth-child(2) {
    padding-left: 4px;
    text-align: left;
  }

  /* Center all other columns */
  #tournament-leaderboard thead th:not(:nth-child(2)),
  #tournament-leaderboard tbody td:not(:nth-child(2)) {
    text-align: center;
  }

  /* Shrink rank column width */
  #tournament-leaderboard thead th:first-child,
  #tournament-leaderboard tbody td:first-child {
    width: 5px;
    min-width: 10px;
    padding-left: 2px;
    padding-right: 2px;
  }

  /* Optional fix for last columns */
  #tournament-leaderboard thead th:nth-child(6),
  #tournament-leaderboard tbody td:nth-child(6),
  #tournament-leaderboard thead th:nth-child(7),
  #tournament-leaderboard tbody td:nth-child(7) {
    width: 25px;
    max-width: 60px;
    white-space: nowrap;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* === SEASON STANDINGS STYLING (Full Update) === */
#season-standings {
  background-color: #0d0d0d;
  color: #fff;
  padding: 24px 20px;
  border-radius: 12px;
  max-width: 600px;
  margin: 0 auto 40px auto;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border-left: 4px solid #00ff87; /* Green left border */
  overflow-x: auto; /* Allow horizontal scroll if table too wide */
}

/* === Toggle Buttons === */
#standingsCompact,
#standingsExpanded {
  background-color: #1a1a1a;
  color: #fff;
  border: none;
  padding: 8px 16px;
  margin-right: 6px;
  margin-bottom: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
#standingsCompact.active,
#standingsExpanded.active {
  background-color: #00ff87;
  color: #0d0d0d;
  font-weight: bold;
}
#standingsCompact:hover,
#standingsExpanded:hover {
  background-color: #00ff87;
  color: #0d0d0d;
}

/* Offset container from left on larger screens */
@media (min-width: 900px) {
  #season-standings {
    margin-left: 50px;
  }
}

#season-standings h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #00ff87;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 2px solid #222;
  padding-bottom: 6px;
}

/* Leaderboard Table */
.season-leaderboard-table {
  width: 100%;
  max-height: 400px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.season-leaderboard-table thead th {
  text-align: left;
  padding: 10px 14px;
  color: #bbb;
  text-transform: uppercase;
  font-size: 0.75rem;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
}

.season-leaderboard-table tbody td {
  padding: 14px 10px; /* Slightly taller rows for bigger images */
  border-bottom: 1px solid #262626;
  color: #f0f0f0;
}

.season-leaderboard-table tbody tr:hover {
  background-color: #1c1c1c;
}

/* Player Image and Info */
.player-img-container-standings {
  display: flex;
  align-items: center;
  gap: 8px; /* Slightly reduced gap for mobile-friendly look */
}

.player-img-container-standings img {
  width: 70px;  
  height: 70px;
  border-radius: 0; /* Remove circular frame */
  object-fit: cover;
}

/* Player Name Layout */
.player-name {
  display: flex;
  flex-direction: column; /* Stack first name over last name */
  font-size: 1.1rem; /* Slightly larger font */
  line-height: 1.2;
  margin-left: 6px; /* Push name slightly away from image */
}

/* Expanded column classes for styling */
.points-expanded,
.events-expanded,
.wins-expanded,
.points-behind-expanded {
  text-align: center;
  padding-right: 16px;
}

/* Rank Column */
.season-leaderboard-table tbody td:first-child {
  width: 40px;
  font-weight: bold;
}

/* Points Column */
.season-leaderboard-table tbody td:last-child,
.season-leaderboard-table thead th:last-child {
  text-align: center;
  width: 70px; /* adjust as needed */
}


/* Responsive: mobile adjustments */
@media (max-width: 540px) {
  .season-leaderboard-table thead {
    display: table-header-group;
    font-size: 0.5rem;
  }

  .season-leaderboard-table tbody tr {
    display: table-row;
    border: none;
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
  }

  .season-leaderboard-table tbody td {
    display: table-cell;
    padding: 10px 6px;
    border-bottom: 1px solid #262626;
  }

  .player-name {
    font-size: 0.95rem;
  }

  /* Shift player image left for more space */
  .player-img-container-standings {
    justify-content: flex-start;
    gap: 4px;
  }

  .player-img-container-standings img {
    width: 60px;
    height: 60px;
  }
	
/* Points Column */
.season-leaderboard-table tbody td:last-child,
.season-leaderboard-table thead th:last-child {
  text-align: center;
  width: 20px; /* adjust as needed */
}

}


/* Countdown Clock */

.countdown-container {
  width: 100%;
  display: flex;
  justify-content: center;   /* Horizontally center */
  align-items: center;       /* Vertically center if container has height */
  margin: 20px 0;
}

.countdown-wrapper {
  display: flex;
  flex-direction: column;    /* Label on top, grid below */
  align-items: center;       /* Center content */
  text-align: center;
  padding: 24px 20px;
  border-radius: 12px;
  border-left: 4px solid #00ff87;
  background-color: #121212; /* Optional background to match site */
}

.countdown-label {
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: bold;
  margin-bottom: 6px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;           /* Ensures items wrap on very small screens */
}

.countdown-item {
  text-align: center;
}

.countdown-item div {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.4rem;
  font-weight: bold;
  color: #f5f5f5;
  background: #1a1a1a;
  padding: 8px 12px;
  border: 1px solid #262626;
  border-radius: 6px;
  min-width: 50px;

  /* === Pulse animation added === */
  animation: pulse 1s ease-in-out infinite;
}

.countdown-item span {
  display: block;
  margin-top: 4px;
  font-size: 0.7rem;
  color: #888888;
  font-family: 'Roboto', sans-serif;
}

/* === Pulse keyframes === */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .countdown-wrapper {
    padding: 16px 12px;
  }
  .countdown-item div {
    font-size: 1.1rem;
    padding: 6px 8px;
    min-width: 40px;
  }
  .countdown-item span {
    font-size: 0.6rem;
  }
  .countdown-grid {
    gap: 8px;
  }
  .countdown-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  .countdown-wrapper {
    padding: 12px 8px;
  }
  .countdown-item div {
    font-size: 0.9rem;
    padding: 4px 6px;
    min-width: 32px;
  }
  .countdown-item span {
    font-size: 0.55rem;
  }
  .countdown-grid {
    gap: 6px;
  }
  .countdown-label {
    font-size: 0.7rem;
  }
}







