/* ======================================== 
🔥 ELITE ATHLETIC PERFORMANCE UI (CLEAN + FINAL)
======================================== */

/* ===== 1. VARIABLES ===== */
:root {
  --background: #000;
  --card: #1a1a1a;
  --text: #ffffff;
  --muted: #aaa;
  --border: rgba(255,255,255,0.08);

  --primary: #5A2D82;
  --primaryLight: #8B63B5;
  --primaryDark: #3A1C57;

  --secondary: #C62828;
  --secondaryLight: #F06A6A;

  --radius: 14px;
  --transition: 0.25s ease;
}

/* ===== 2. GLOBAL ===== */

* { box-sizing: border-box; }

html, body {
margin: 0;
padding: 0;
background: var(--background);
color: var(--text);
font-family: 'Arial Black', sans-serif;
}

h1, h2, h3 {
margin: 0;
letter-spacing: 1px;
}

/* ===== 3. LAYOUT ===== */
main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.section {
margin: 40px auto;
text-align: center;
}

/* ========================================
   🔥 ELITE HEADER
======================================== */

.logo {
  height: 100px; /* 🔥 was 48px → slightly bigger */
  width: auto;
  object-fit: contain;
}

/* Title */
.title {
  font-size: 1.4rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.school-name {
    padding: 4px 14px;
    border-radius: 6px;

    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);

    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;

    margin-bottom: 8px;

    /* 🔥 ADD THIS ↓ */
    color: var(--primary);

    text-shadow:
        0 0 2px var(--primary);

    -webkit-text-stroke: 0.6px rgba(0,0,0,0.7);
}

/* Buttons */

.logout-btn {
  background: transparent;
  border: 1px solid var(--primaryLight);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}



.logout-btn:hover {
  background: #444;
}

/* Menu */
.menu-toggle {
  font-size: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.1);
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    right: 20px;
    margin-top: 10px;

    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;

    display: none;
    flex-direction: column;
    min-width: 180px;

    z-index: 999;

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s ease;
}

.dropdown a {
  padding: 14px 16px;
  font-size: 1.1rem;
  font-weight: 600;

  display: flex;
  align-items: center;
  gap: 10px;                   /* 🔥 space between emoji + text */

  transition: all 0.2s ease;
}

.dropdown a:hover {
  background: #222;
  padding-left: 20px;          /* 🔥 subtle slide effect */
}

.dropdown.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Animation */
@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 4. BUTTON ===== */
.btn {
background: linear-gradient(135deg, var(--secondary), var(--primary));
padding: 12px 20px;
border-radius: 10px;
color: white;
text-decoration: none;
font-weight: 600;
transition: var(--transition);
border: none;
cursor: pointer;
}

.btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px var(--primaryLight)
}

/* ===================== ELITE HEADERS ===================== */

#schoolHeader {
    display: grid;
    grid-template-columns: 120px 1fr 120px; /* left | center | right */

    align-items: center;

    padding: 18px 40px;
    height: 100px;

    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.school-name {
  color: var(--primary);

  text-shadow:
    0 0 1px var(--primary);

  -webkit-text-stroke: 0.6px rgba(0,0,0,0.7);
}

.glow-title {
  color: var(--primary);
  text-shadow:
    0 0 4px var(--primary),
    0 0 10px var(--primaryLight),
    0 0 18px var(--secondaryLight);
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.elite-lg {
    font-size:clamp(32px, 5vh, 60px);
}

.elite-header {
    font-family:'Orbitron', sans-serif;
    font-weight:900;
    letter-spacing:4px;
    transform:scaleX(1.04);

    color:#ffffff;
    text-align:center;

    text-shadow:
      0 2px 2px rgba(0,0,0,0.9),
      0 4px 8px rgba(0,0,0,0.8),
      0 0 10px var(--primary),
      0 0 20px var(--primaryLight),
      0 0 35px var(--primaryLight),
      0 0 55px var(--secondaryLight);

    background:linear-gradient(
        180deg,
        #ffffff 0%,
        #dce6ff 40%,
        #ffffff 100%
    );

    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;

    -webkit-text-stroke:1px rgba(0,0,0,0.6);

    animation: eliteGlow 2.5s ease-in-out infinite alternate;

    white-space:nowrap;
}

@keyframes eliteGlow {
    from {
        text-shadow:
            0 2px 2px rgba(0,0,0,0.9),
            0 0 10px var(--primary),
            0 0 20px var(--primaryLight);
    }
    to {
        text-shadow:
            0 2px 4px rgba(0,0,0,1),
            0 0 20px var(--primary),
            0 0 40px var(--primaryLight),
            0 0 70px var(--secondaryLight);
    }
}

 .title {
    max-width:100%;
}

#schoolHeader::before {
    content:"STRENGTH - SPEED - AGILITY - POWER - EXPLOSION - ENDURANCE";

    position:absolute;
    top:50%;
    left:0;
    transform:translateY(-50%);

    white-space:nowrap;

    font-size:120px;
    font-weight:900;
    letter-spacing:8px;

    color:rgba(255,255,255,0.08);

    animation:scrollWatermark 25s linear infinite;

    pointer-events:none;
    z-index:0;
}

#schoolHeader::after {
    content:"";
    position:absolute;

    top:0;
    left:-60%;
    width:60%;
    height:100%;

    background:linear-gradient(
        120deg,
        rgba(0,102,255,0.0),
        rgba(0,102,255,0.25),
        rgba(255,255,255,0.2),
        rgba(0,102,255,0.25),
        rgba(0,102,255,0.0)
    );

    transform:skewX(-25deg);

    animation:shimmer 5s infinite; /* 🔥 slower = more noticeable */

    z-index:1;
}

@keyframes scrollWatermark {
    0%   { transform:translateX(0) translateY(-50%); }
    100% { transform:translateX(-50%) translateY(-50%); }
}

@keyframes shimmer {
    0%   { left:-50%; }
    100% { left:150%; }
}

.header-left,
.header-center,
.header-right {
    position:relative;
    z-index:2;
}

#schoolLogo {
  height: 75px;
  width: auto;

  opacity: 0;                /* start hidden */
  transition: opacity 0.6s ease;  /* smooth fade */
}

/* when ready */
#schoolLogo.loaded {
  opacity: 1;
}

/* ===== 5. GRID ===== */
.grid {
    display: grid;
    gap: 48px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;

    max-width: 750px;
    margin: 0 auto;
}

.grid-auto {
    display: grid;

    /* 🔥 KEY CHANGE */
    grid-template-columns: repeat(auto-fit, minmax(220px, 260px));

    justify-content: center;   /* centers the whole grid */
    gap: 24px;

    width: 100%;
}

/* ===== 6. CARDS ===== */
.card {
    background: linear-gradient(
        145deg,
        rgba(20,20,20,0.95),
        rgba(40,40,40,0.9)
    );

      min-height: 350px;
    border-radius: 16px;
    padding: 20px 40px 40px 40px;

    text-decoration: none;
    color: white;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.6),
        0 0 15px var(--primaryLight);

    transition: all 0.25s ease;
}

.card:active {
  transform: scale(0.96);
}

.card {
  backdrop-filter: blur(6px);
}

@keyframes glowPulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

h1 {
  animation: glowPulse 2s ease-in-out infinite alternate;
}

.card h2 {
    font-size: 2.6rem;
    font-weight: 800;
}

.card p {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* Hover effect */
.card:hover {
  transform: translateY(-8px) scale(1.02);

  box-shadow:
    0 25px 50px rgba(0,0,0,0.9),
    0 0 30px var(--primaryLight),
    0 0 60px rgba(139,99,181,0.6);
}

h1 {
  text-shadow:
    0 0 10px var(--primaryLight),
    0 0 20px rgba(139,99,181,0.5);
}

/* ICON */
.card-icon {
    font-size: 48px;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 10px var(--primaryLight));
}

#comparisonButtons button {
  font-size: 15px;
  padding: 10px 16px; /* ⬆️ slightly bigger buttons */
}

/* ===== MINI CARDS (STATS) ===== */
.card-mini {
    background: transparent;
    border: none;
    box-shadow: none;

    padding: 40px 20px; /* 🔥 keep spacing so layout doesn’t collapse */
}

.card-mini h3 {
    font-size: 1.4rem;
    opacity: 0.8;
    margin-bottom: 12px;
}

.card-mini p {
    font-size: 2.3rem;
    font-weight: 900;
}

/* Hover for mini cards */
.card-mini:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow:
        0 15px 40px rgba(0,0,0,0.8),
        0 0 25px var(--primaryLight);
}

/* ===== CENTER CONTENT ===== */
.card,
.card-mini {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    opacity: 0;
    animation: cardFadeUp 0.7s cubic-bezier(.2,.8,.2,1) forwards;
}

.card {
  cursor: pointer;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.9),
    0 0 25px var(--primaryLight);
}

.card-icon {
  transition: transform 0.2s ease;
}

.card:hover .card-icon {
  transform: scale(1.15);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== STAGGERED ANIMATION ===== */
.card:nth-child(1) { transform: rotate(-0.5deg); }
.card:nth-child(2) { transform: rotate(0.5deg); }
.card:nth-child(3) { transform: rotate(-0.5deg); }
.card:nth-child(4) { transform: rotate(0.5deg); }

.card-mini:nth-child(1) { animation-delay: 0.1s; }
.card-mini:nth-child(2) { animation-delay: 0.2s; }

/* ===== ANIMATION ===== */
@keyframes cardFadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    80% {
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== BIG STAT NUMBERS ===== */
#totalAthletes,
#totalTests {
    font-size: 3.0rem;
    font-weight: 900;
}

/* ========================================
   ATHLETE CARDS (FIXED)
======================================== */

.athlete-card {
  width: 100%;
  max-width: 260px;

  background: linear-gradient(145deg, #1a1a1a, #111);
  border-radius: 16px;

  padding: 20px;
  text-align: center;

  box-shadow:
    0 10px 25px rgba(0,0,0,0.6),
    0 0 12px var(--primaryLight);

  cursor: pointer;
  transition: all 0.25s ease;

  display: block;
}

.athlete-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    0 15px 35px rgba(0,0,0,0.8),
    0 0 20px var(--primaryLight);
}

.athlete-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.athlete-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.athlete-score {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 6px;
}

.athlete-tag {
  font-size: 14px;
  opacity: 0.85;
}

.athlete-stats {
  display: grid;

  /* 🔥 better layout */
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));

  gap: 12px;

  /* 🔥 REMOVE the narrow constraint */
  width: 100%;
  max-width: 1300px;   /* optional cap */
  margin: 0 auto;
}

.stat-box {
  background: linear-gradient(145deg, #1a1a1a, #111);
 .stat-box {
  padding: 8px;
  border-radius: 10px;
}
  text-align: center;

  box-shadow:
    0 6px 15px rgba(0,0,0,0.6),
    0 0 8px var(--primaryLight);
}

.stat-box h3 {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.stat-box p {
  font-size: 18px;
  font-weight: 800;
}

/* ===== 7. TABLE ===== */
.table {
  width: 100%;
  max-width: 1500px;   /* 🔥 THIS is what centers visually */
  margin: 0 auto;      /* 🔥 fallback centering */
  border-collapse: collapse;
  background: #111;
  border-radius: var(--radius);
  overflow: hidden;
  table-layout: auto;
}

/* ===== TABLE WRAPPER FIX ===== */
.table-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 12px;
}

/* ===== TABLE FONT SIZE ===== */
.table {
  font-size: 24px;   /* 🔥 base size */
}

.table th {
  font-size: 26px;   /* slightly bigger headers */
  font-weight: 700;
}

.table td {
  font-size: 24px;
}

.table th,
.table td {
padding: 26px;
text-align: center;
}

th.sort-asc::after {
  content: " ▲";
  var(--primaryLight)
}

th.sort-desc::after {
  content: " ▼";
  color: var(--primaryLight);
text-shadow:
  0 0 6px var(--primary),
  0 0 12px var(--primaryLight);
}

.table th:hover {
    color: var(--primaryLight);
text-shadow:
  0 0 6px var(--primary),
  0 0 12px var(--primaryLight);
}

.table tr:nth-child(even) {
background: #1a1a1a;
}

/* ===== ROW HOVER EFFECT ===== */
.table tbody tr {
  transition: background 0.2s ease, transform 0.15s ease;
}

.table tbody tr:hover {
  background: #2a2a2a;              /* 🔥 highlight color */
  transform: scale(1.01);           /* 🔥 subtle pop */
  cursor: pointer;
}

.table td:first-child {
  white-space: nowrap;
}

.table {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.section:first-child {
  margin-top: 60px; /* 🔥 reduces giant top gap */
}

@keyframes eliteGlow {
  0% { box-shadow: 0 0 8px rgba(59,130,246,0.5); }
  50% { box-shadow: 0 0 18px rgba(59,130,246,0.9); }
  100% { box-shadow: 0 0 8px rgba(59,130,246,0.5); }
}

.metric-card.elite {
  animation: eliteGlow 2s infinite;
}

/* ===== 8. FORM ===== */
input, select {
  width: 100%;
  padding: 16px 18px;   /* 🔥 more height */
  border-radius: 10px;
  border: 1px solid #333;
  background: #111;
  color: white;

  font-size: 18px;      /* 🔥 bigger text */
}

input:focus {
  color: var(--primaryLight);
text-shadow:
  0 0 6px var(--primary),
  0 0 12px var(--primaryLight);
  box-shadow: 0 0 8px rgba(96,165,250,0.4);
}

/* ========================================
🔙 BACK BUTTON
======================================== */

.back-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  color: #ddd;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  color: #fff;
  border-color: #c084fc;
  box-shadow: 0 0 8px rgba(192,132,252,0.6);
  transform: translateY(-1px);
}

/* ========================================
🔥 RADAR SIZE BOOST (1.5x)
======================================== */

#radarChart {
  width: 100% !important;
  max-width: 1200px;   /* ⬆️ was ~700 */
  height: 750px !important; /* ⬆️ increase height */
  margin: 0 auto;
}

/* 🔥 PROGRESS CHART FIX */
#progressChart {
  width: 100% !important;
  height: 750px !important; /* ⬅️ smaller, stable */
  max-height: 750px;
   margin: 0 auto;
}

.progress-toggles {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.progress-toggles button {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.progress-toggles button.active {
  box-shadow: 0 0 8px var(--accent);
  border-color: var(--accent);
}

.progress-toggles button:not(.active) {
  opacity: 0.4;
}

/* ========================================
🔥 COMPARISON BUTTONS (GLOW ACTIVE)
======================================== */

.comparison-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.comparison-buttons button {
  background: #111;
  color: white;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover effect */
.comparison-buttons button:hover {
  border-color: #8B63B5;
  box-shadow: 0 0 6px rgba(139, 99, 181, 0.6);
}

/* 🔥 ACTIVE BUTTON (GLOW) */
.comparison-buttons button.active {
  background: #8B63B5;
  border-color: #8B63B5;
  color: white;

  box-shadow:
    0 0 8px rgba(139, 99, 181, 0.8),
    0 0 16px rgba(139, 99, 181, 0.6),
    inset 0 0 4px rgba(255,255,255,0.2);
}

.comparison-buttons {
  margin-top: 5px;
}

/* ========================================
🏷️ PERFORMANCE TAGS
======================================== */

.tag {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* 🟢 Elite */
.tag-elite {
  background: rgba(34,197,94,0.2);
  color: #22c55e;
}

/* 🔵 Above Avg */
.tag-good {
  background: rgba(59,130,246,0.2);
  color: #3b82f6;
}

/* 🟡 Average */
.tag-mid {
  background: rgba(250,204,21,0.2);
  color: #facc15;
}

/* 🔴 Needs Work */
.tag-low {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}

/* ========================================
HISTORY / COMPARISON
======================================== */
body {
  font-size: 20px; /* 🔥 bump everything up */
}

.score {
  font-size: 32px;
  font-weight: bold;
}

.dominant {
  font-size: 32px;
  color: var(--primaryLight);
}

.compare-toggle button {
  font-size: 18px;
  padding: 10px 16px;
  margin: 4px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #111;
  color: white;
  cursor: pointer;
}

.compare-toggle button.active {
  background: #2563eb;
}

.compare-toggle button:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

.compare-btn {
  margin: 10px 0 15px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.compare-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.compare-dropdown {
  margin: 20px auto 30px;
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: #111;
  color: #fff;
  width: 300px;
  display: none;

  appearance: none;
  outline: none;
  cursor: pointer;

  transition: 0.2s;
}

.compare-dropdown {
  position: relative;
  z-index: 10;
}

.compare-dropdown {
  width: 260px;
  max-width: 90%;
  text-align: center;
}

.compare-dropdown:hover {
  border-color: rgba(255,255,255,0.3);
}

.compare-dropdown:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.compare-dropdown {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.25s ease;
}

.compare-dropdown.show {
  opacity: 1;
  transform: translateY(0);
}

.metrics-grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  flex-wrap: nowrap; /* 🔥 forces one row */
  margin-top: 20px;
}

.metric-card {
  min-width: 140px;
  max-width: 160px;
  flex: 1;
}

.metric-label,
.metric-value {
  white-space: nowrap;
  text-align: center;
}

#metrics {
  overflow-x: auto;
}

/* ===== METRIC CARD GLOW ===== */

.metric-card {
  transition: all 0.3s ease;
}

/* 🔵 ELITE (Blue Glow) */
.metric-card.elite {
  border: 1px solid var(--primaryLight);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

/* 🟢 STRONG (Green Glow) */
.metric-card.strong {
  border: 1px solid #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

/* 🟡 DEVELOPING (Yellow Glow) */
.metric-card.developing {
  border: 1px solid #eab308;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
}

/* 🔴 WEAK (Red Glow) */
.metric-card.weak {
  border: 1px solid #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.metric-card:hover {
  transform: translateY(-4px) scale(1.03);
}

.metric-card.elite .metric-fill {
  background: var(--primaryLight);
}

.metric-card.strong .metric-fill {
  background: #22c55e;
}

.metric-card.developing .metric-fill {
  background: #eab308;
}

.metric-card.weak .metric-fill { 
  background: #ef4444;
}

.metric-bar {
  width: 100%;
  height: 6px;
  background: #222;
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  width: 0%;
  background: var(--primaryLight); /* fallback */
  transition: width 0.6s ease;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
}

/* ========================================
🧠 AI INSIGHTS (CLEAN + FINAL)
======================================== */

/* GRID LAYOUT (4 CARDS) */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;

  max-width: 1200px;
  margin: 0 auto;
}

/* INDIVIDUAL INSIGHT CARD */
.insight-box {
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 16px;
  text-align: left;

  border: 1px solid rgba(255,255,255,0.08);

  transition: all 0.25s ease;
}

/* HOVER EFFECT (SUBTLE GLOW) */
.insight-box:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 12px rgba(139, 99, 181, 0.4);
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: 30px;

  padding: 20px 40px;
  border-radius: 12px;

  background: rgba(255,255,255,0.03);

  box-shadow:
    0 0 10px rgba(139,99,181,0.2);
}

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

.stat-value {
  font-size: 42px;
  font-weight: 800;
}

.stat-label {
  font-size: 14px;
  opacity: 0.7;
}

.stat-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.primary-btn {
  font-size: 16px;
  padding: 12px 26px;

  border-radius: 10px;

  box-shadow:
    0 0 12px var(--primaryLight),
    0 0 25px rgba(139,99,181,0.5);

  transition: all 0.2s ease;
}

.primary-btn:hover {
  transform: scale(1.05);
}

/* TITLES */
.insight-box h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--primaryLight);

  text-shadow:
    0 0 6px var(--primary),
    0 0 12px var(--primaryLight);
}

/* LIST STYLE */
.insight-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.insight-box li {
  font-size: 14px;
  margin-bottom: 6px;
  opacity: 0.9;
}

.insight-box li {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* PARAGRAPH TEXT */
.insight-box p {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.9;
}

/* OPTIONAL: COLOR CODING */
.insight-box li.positive {
  color: #22c55e; /* green */
}

.insight-box li.negative {
  color: #ef4444; /* red */
}

.insight-box li.neutral {
  color: #facc15; /* yellow */
}

/* ========================================
PODIUM ENGINE (FINAL)
======================================== */

.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 25px;
  margin-top: 20px;
}

/* BASE */
.podium-item {
  width: 140px;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;

  transition: all 0.25s ease;

  transform: translateY(0);
  opacity: 1;
}

/* HOVER */
.podium-item:hover {
  transform: translateY(-6px) scale(1.03);
}

/* 🥇 FIRST */
.podium-item.first {
  height: 220px;
  background: linear-gradient(to top, #1e3a8a, var(--primaryLight));
  transform: scale(1.1);
  z-index: 2;

  box-shadow:
    0 0 20px var(--primaryLight),
    0 0 40px rgba(139,99,181,0.6);
}

/* 🥈 SECOND */
.podium-item.second {
  height: 170px;
  background: linear-gradient(to top, #374151, #9ca3af);
}

/* 🥉 THIRD */
.podium-item.third {
  height: 150px;
  background: linear-gradient(to top, #78350f, #f59e0b);
}

/* TEXT */
.podium-rank {
  font-size: 34px;
  margin-bottom: 6px;
}

.podium-name {
  font-size: 16px;
  font-weight: 700;
  margin-top: 10px;
}

.podium-score {
  font-size: 24px;
  font-weight: 800;
  color: var(--primaryLight);

  text-shadow:
    0 0 6px var(--primary),
    0 0 12px var(--primaryLight);
}

/* ENTRY ANIMATION */
.podium-item.show {
  animation: podiumRise 0.6s ease-out forwards;
}

@keyframes podiumRise {
  0% {
    transform: translateY(80px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========================================
MOBILE CARD FIX
======================================== */

.mobile-cards {
  display: none;
}

@media (max-width: 768px) {
  .leaderboard-grid {
    display: none;
  }

  .mobile-cards {
    display: block;
  }
}

/* ========================================
KEY (IDENTIFIER)
======================================== */

.key-card {
  max-width: 600px;
  margin: 30px auto 10px auto; /* 🔥 pulls it closer to tables */

  text-align: center;

  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 12px rgba(139,99,181,0.25);

  border-radius: 12px;
  padding: 18px;
}

.key-content {
  margin-top: 15px;
  line-height: 2;
  font-size: 18px;
  color: #ccc;
}

/* Labels row */
.key-labels {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 16px;
}

.key-labels span {
  font-weight: 700;
}

/* Color coding */
.key-labels .elite   { color: #22c55e; }  /* Green */
.key-labels .above  { color: #f97316; }  /* Orange */
.key-labels .average { color: #facc15; }  /* Yellow */
.key-labels .needs   { color: #ef4444; }  /* Red */

/* Divider slash */
.key-labels span:not(:last-child)::after {
  content: " /";
  color: #666;
  margin-left: 6px;
}

/* Description text */
.key-description {
  font-size: 14px;
  color: #ccc;
  margin-top: 5px;
}



/* ========================================
LEADERBOARD LAYOUT (CLEAN + BALANCED)
======================================== */

.leaderboard-title {
  font-size: 2.4rem;
  text-shadow:
    0 0 6px var(--primary),
    0 0 12px var(--primaryLight);
}

.leaderboard-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;

  max-width: 1400px;   /* 🔥 wider */
  margin: 20px auto 0 auto;
}

.leaderboard-card {
  flex: 1 1 600px;     /* 🔥 bigger cards */
  max-width: 700px;

  padding: 25px;
  border-radius: 16px;

  background: linear-gradient(145deg, #1a1a1a, #111);

  box-shadow:
    0 12px 30px rgba(0,0,0,0.7),
    0 0 15px var(--primaryLight);

  transition: all 0.25s ease;
}

.leaderboard-card h2 {
  margin-bottom: 15px;
  font-size: 1.6rem;
}

.leaderboard-card {
  transition: all 0.25s ease;
}

.leaderboard-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.9),
    0 0 25px var(--primaryLight);
}

.leaderboard-table th {
  font-size: 16px;
  opacity: 0.8;
}

.leaderboard-table td {
  font-size: 18px;
  font-weight: 700;
}


/* ========================================
TABLE SCROLL (FIXED)
======================================== */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* clean width behavior */
.leaderboard-table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 12px 14px;
}

.leaderboard-table tbody tr {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.leaderboard-table tbody tr:hover {
  background: rgba(139,99,181,0.12);
  transform: scale(1.01);
  box-shadow: 0 0 10px rgba(139,99,181,0.4);
}

/* ========================================
BADGE STYLES (FOR TABLE)
======================================== */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

/* 🟢 Elite */
.badge.elite {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid #22c55e;
}

/* 🟠 Above Average */
.badge.above {
  background: rgba(249,115,22,0.15);
  color: #f97316;
  border: 1px solid #f97316;
}

/* 🟡 Average */
.badge.average {
  background: rgba(250,204,21,0.15);
  color: #facc15;
  border: 1px solid #facc15;
}

/* 🔴 Needs Work */
.badge.needs {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid #ef4444;
}
.badge {
  white-space: nowrap;
}

.badge.incomplete {
  background: rgba(156,163,175,0.15); /* gray */
  color: #9ca3af;
  border: 1px solid #9ca3af;
}

/* ========================================
PERFORMANCE TIERS
======================================== */

.tier {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
}

/* 🔥 COLORS MATCH YOUR KEY */
.tier.elite {
  color: #22c55e;
}

.tier.above {
  color: #f97316;
}

.tier.average {
  color: #eab308;
}

.tier.needs {
  color: #ef4444;
}

/* ========================================
MOBILE (RESPONSIVE)
======================================== */

@media (max-width: 768px) {

    .header-right {
        justify-content: center;
        flex-wrap: wrap;
    }

    .menu-toggle {
        position: absolute;
        right: 15px;
        top: 15px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    main {
        padding: 10px;
    }
}

@media (max-width: 900px) {
  .leaderboard-grid {
    grid-template-columns: 1fr;
  }
}
