@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;600;800&family=Rajdhani:wght@500;700;900&display=swap');

/* ==========================================
   DESIGN VARIABLES & BASE RESET
   ========================================== */
:root {
  /* Colors */
  --primary-gold: #FFD600;
  --amber-gold: #FFB300;
  --dark-gold: #C67C00;
  --speed-line-gold: #FF8A00;
  --bg-black: rgba(13, 13, 13, 0.85); /* Semi-transparent for overlay */
  --bg-black-solid: #0D0D0D;
  --row-dark: #1A1200;
  --row-light: #2A1F00;
  --row-border: rgba(255, 214, 0, 0.15);
  --champion-rush-red: #CC0000;
  --danger-red: #FF3D3D;
  --success-green: #00FF84;
  --pure-white: #FFFFFF;
  --text-gray: #B0B0B0;
  
  /* Fonts */
  --font-display: 'Rajdhani', sans-serif;
  --font-numbers: 'Oxanium', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-display);
  background-color: transparent;
  color: var(--pure-white);
  overflow: hidden;
  width: 1920px;
  height: 1080px;
}

/* ==========================================
   MAIN OVERLAY CONTAINER
   ========================================== */
#overlay-container {
  position: relative;
  width: 1920px;
  height: 1080px;
  background-color: transparent;
}

/* ==========================================
   RIGHT LEADERBOARD PANEL
   ========================================== */
.leaderboard-panel {
  position: absolute;
  top: 140px;
  right: 50px;
  width: 450px;
  background: rgba(10, 10, 10, 0.9);
  border: 2px solid rgba(255, 214, 0, 0.3);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
}

/* Leaderboard Header */
.leaderboard-header {
  background: linear-gradient(90deg, var(--amber-gold) 0%, var(--speed-line-gold) 100%);
  height: 42px;
  display: grid;
  grid-template-columns: 240px 110px 100px; /* Team | Elims | Pts */
  align-items: center;
  color: #000000;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 97% 100%, 0 100%);
  position: relative;
  border-bottom: 2px solid var(--primary-gold);
}

.leaderboard-header::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(0, 0, 0, 0.05) 10px,
    rgba(0, 0, 0, 0.05) 20px
  );
  pointer-events: none;
}

.header-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.header-cell.team-cell {
  justify-content: flex-start;
  padding-left: 15px;
}

/* Slanted visual divider */
.header-cell:not(:last-child)::after {
  content: '/';
  color: rgba(0, 0, 0, 0.3);
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
}

/* Rows Wrapper */
.leaderboard-rows {
  display: flex;
  flex-direction: column;
  background-color: rgba(5, 5, 5, 0.7);
}

/* Single Leaderboard Row */
.team-row {
  display: grid;
  grid-template-columns: 240px 110px 100px;
  height: 52px;
  align-items: center;
  border-bottom: 1px solid var(--row-border);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.team-row:nth-child(odd) {
  background-color: var(--row-dark);
}

.team-row:nth-child(even) {
  background-color: var(--row-light);
}

.team-row.eliminated {
  opacity: 0.55;
  filter: grayscale(85%);
  border-bottom: 1px solid rgba(255, 61, 61, 0.1);
}

/* Cells styling */
.row-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.rank-val {
  font-family: var(--font-numbers);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-gray);
}

.team-row:nth-child(1) .rank-val { color: var(--primary-gold); }
.team-row:nth-child(2) .rank-val { color: #E5E4E2; } /* Silver */
.team-row:nth-child(3) .rank-val { color: #CD7F32; } /* Bronze */

.team-info {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding-left: 5px;
  gap: 8px;
}

.team-logo-container {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-logo {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.team-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--pure-white);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

.elims-val {
  font-family: var(--font-numbers);
  font-weight: 600;
  font-size: 18px;
  color: var(--pure-white);
}

/* Alive indicator segments (4 vertical bars) */
.alive-indicator {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3px 6px;
  border-radius: 4px;
  width: fit-content;
}

.alive-bar {
  width: 7px;
  height: 22px;
  background-color: #2F2B20; /* Dark default / dead */
  border-radius: 1px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.alive-bar.active {
  background-color: var(--primary-gold);
  box-shadow: 0 0 5px rgba(255, 214, 0, 0.4);
}

.alive-bar.dead {
  background-color: rgba(255, 61, 61, 0.25);
  box-shadow: none;
}

.pts-val {
  font-family: var(--font-numbers);
  font-weight: 800;
  font-size: 18px;
  color: var(--primary-gold);
  letter-spacing: 0.5px;
}

/* ==========================================
   CHAMPION RUSH QUALIFIED LEADERBOARD ROW STYLE
   ========================================== */
.team-row.rush-qualified {
  background: linear-gradient(
    90deg,
    rgba(255, 214, 0, 0.12) 0%,
    rgba(255, 138, 0, 0.06) 50%,
    transparent 100%
  ) !important;
  border-bottom: 1px solid rgba(255, 214, 0, 0.4);
  position: relative;
  z-index: 5;
}

/* Glow wrap aura overlay border styling */
.team-row.rush-qualified::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-gold), var(--speed-line-gold));
  box-shadow: 0 0 12px var(--primary-gold);
}

.team-row.rush-qualified .team-name {
  color: var(--primary-gold);
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 214, 0, 0.3);
}

.team-row.rush-qualified .pts-val {
  text-shadow: 0 0 10px rgba(255, 214, 0, 0.6);
}

/* Crown icon in row */
.team-row.rush-qualified .crown-icon-inline {
  color: var(--primary-gold);
  font-size: 14px;
  margin-right: 3px;
  filter: drop-shadow(0 0 2px rgba(255, 214, 0, 0.8));
}
