/* ============================================================
   ROOT & CUSTOM PROPERTIES
============================================================ */
:root {
  --bg:            #06080f;
  --bg-surface:    rgba(255, 255, 255, 0.04);
  --bg-hover:      rgba(255, 255, 255, 0.08);
  --border:        rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 195, 255, 0.25);

  --accent:        #00c3ff;
  --accent-glow:   rgba(0, 195, 255, 0.45);
  --accent-dim:    rgba(0, 195, 255, 0.12);
  --accent-text:   rgba(0, 195, 255, 0.9);

  --text:          #ddeeff;
  --text-muted:    rgba(221, 238, 255, 0.45);

  --gold:          #ffd700;
  --gold-glow:     rgba(255, 215, 0, 0.35);
  --silver:        #b8c4d0;
  --silver-glow:   rgba(184, 196, 208, 0.25);
  --bronze:        #cd7f32;
  --bronze-glow:   rgba(205, 127, 50, 0.25);

  --leader-bg:     rgba(0, 195, 255, 0.14);
  --leader-color:  #00c3ff;

  --radius:        12px;
  --radius-lg:     18px;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #060a14; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ============================================================
   ICE PARTICLE CANVAS
============================================================ */
#ice-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ============================================================
   HERO
============================================================ */
.hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(0, 100, 210, 0.28) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 15% 100%, rgba(0, 50, 160, 0.2) 0%, transparent 60%),
    linear-gradient(180deg, #060e1f 0%, #030810 100%);
}

/* Rink line decorations (purely decorative CSS) */
.hero-rink-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(0deg,
      transparent 49.7%,
      rgba(210, 30, 30, 0.07) 49.7%,
      rgba(210, 30, 30, 0.07) 50.3%,
      transparent 50.3%
    ),
    linear-gradient(90deg,
      transparent 29.7%,
      rgba(0, 140, 255, 0.07) 29.7%,
      rgba(0, 140, 255, 0.07) 30.3%,
      transparent 30.3%
    ),
    linear-gradient(90deg,
      transparent 69.7%,
      rgba(0, 140, 255, 0.07) 69.7%,
      rgba(0, 140, 255, 0.07) 70.3%,
      transparent 70.3%
    );
}

/* Faceoff circle overlay */
.hero::after {
  content: '';
  position: absolute;
  width: min(420px, 72vw);
  height: min(420px, 72vw);
  border: 1.5px solid rgba(200, 30, 30, 0.07);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
  will-change: transform, opacity;
}

/* Floating puck icon */
.hero-icon {
  font-size: clamp(2.5rem, 6vw, 4rem);
  display: block;
  margin-bottom: 20px;
  animation: hero-float 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(0, 195, 255, 0.6));
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0)    rotate(-6deg); }
  50%       { transform: translateY(-14px) rotate(6deg); }
}

/* Title */
.hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(4rem, 13vw, 9.5rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 0.9;
  background: linear-gradient(160deg,
    #ffffff 0%,
    #b5dcff 35%,
    var(--accent) 75%,
    #007eb5 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-glow 5s ease-in-out infinite;
}

@keyframes title-glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(0, 195, 255, 0.3)); }
  50%       { filter: drop-shadow(0 0 48px rgba(0, 195, 255, 0.65)); }
}

/* Subtitle */
.hero-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-top: 14px;
  opacity: 0.85;
}

/* Horizontal rule */
.hero-divider {
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 22px auto;
  border-radius: 2px;
}

/* Scroll hint */
.hero-scroll {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: scroll-hint 2.5s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { opacity: 0.4; transform: translateY(0);   }
  50%       { opacity: 0.9; transform: translateY(5px); }
}

/* ============================================================
   STICKY NAVIGATION
============================================================ */
.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(5, 8, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-accent);
  box-shadow: 0 1px 30px rgba(0, 195, 255, 0.08);
}

.sticky-nav.is-visible {
  transform: translateY(0);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-brand {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  white-space: nowrap;
}

/* ============================================================
   TABS
============================================================ */
.tabs {
  display: flex;
  gap: 6px;
}

.tab-button {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border-accent);
  background: transparent;
  color: var(--text-muted);
  padding: 7px 20px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.tab-button:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.tab-button.is-active {
  background: var(--accent);
  color: #030810;
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
  font-weight: 700;
}

/* ============================================================
   TAB PANELS
============================================================ */
.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: panel-in 0.35s ease;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MAIN CONTENT
============================================================ */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}

/* ============================================================
   SECTION HEADERS
============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 28px;
  padding-top: 12px;
}

.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin-top: 6px;
  border-radius: 2px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ============================================================
   PODIUM / CATEGORY WINS
============================================================ */
.podium-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 64px;
}

.podium-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  text-align: center;
  min-width: 148px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.podium-card:hover {
  transform: translateY(-5px);
}

/* JS-driven card reveal: starts hidden */
.js-enabled .podium-card,
.js-enabled .table-card,
.js-enabled .roster-card {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.js-enabled .podium-card.is-visible,
.js-enabled .table-card.is-visible,
.js-enabled .roster-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js-enabled .podium-card.is-visible:hover {
  transform: translateY(-5px);
}

/* Medal variants */
.podium-gold {
  border-color: var(--gold);
  box-shadow: 0 0 30px var(--gold-glow), inset 0 0 40px rgba(255, 215, 0, 0.04);
  padding: 30px 34px;
}

.podium-silver {
  border-color: var(--silver);
  box-shadow: 0 0 20px var(--silver-glow);
}

.podium-bronze {
  border-color: var(--bronze);
  box-shadow: 0 0 20px var(--bronze-glow);
}

.podium-rest {
  padding: 14px 20px;
}

.podium-medal {
  font-size: 2rem;
  margin-bottom: 8px;
  line-height: 1;
}

.podium-gold .podium-medal {
  font-size: 2.8rem;
}

.podium-rank-num {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
}

.podium-team {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.podium-stat {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.podium-gold   .podium-stat { color: var(--gold);   font-size: 3.1rem; }
.podium-silver .podium-stat { color: var(--silver); }
.podium-bronze .podium-stat { color: var(--bronze); }

.podium-label {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   TABLE CARD (wraps stats-table)
============================================================ */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 52px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.4);
}

.table-scroll {
  overflow-x: auto;
}

/* ============================================================
   STATS TABLE
============================================================ */
.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table thead tr {
  background: linear-gradient(90deg,
    rgba(0, 88, 180, 0.42),
    rgba(0, 55, 130, 0.3)
  );
  border-bottom: 2px solid var(--border-accent);
}

.stats-table th {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  padding: 13px 16px;
  text-align: left;
  white-space: nowrap;
}

.stats-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.15s;
}

.stats-table tbody tr:last-child td {
  border-bottom: none;
}

.stats-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.stats-table tbody tr:hover td {
  background: rgba(0, 195, 255, 0.06);
}

/* Team name cell */
.team-cell {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.95rem !important;
}

/* Leader (category winner) cell */
.leader-cell {
  background: var(--leader-bg) !important;
  color: var(--leader-color) !important;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 195, 255, 0.4);
  position: relative;
}

.leader-cell::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

/* ============================================================
   ROSTERS
============================================================ */
.rosters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(680px, 100%), 1fr));
  gap: 28px;
}

.roster-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.4);
}

.roster-card-header {
  background: linear-gradient(90deg,
    rgba(0, 88, 180, 0.5),
    rgba(0, 50, 120, 0.3)
  );
  border-bottom: 2px solid var(--border-accent);
  padding: 16px 20px;
}

.roster-team-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

.roster-section-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-text);
  padding: 10px 20px 4px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.roster-card .stats-table th { padding: 10px 12px; }
.roster-card .stats-table td { padding: 9px 12px; font-size: 0.85rem; }

/* Totals row inside roster tables */
.totals-row td {
  background: rgba(0, 195, 255, 0.08) !important;
  border-top: 2px solid var(--border-accent) !important;
  color: var(--accent-text);
  font-weight: 600;
}

/* ============================================================
   ERROR BANNER
============================================================ */
.error-banner {
  background: rgba(220, 40, 40, 0.12);
  border: 1px solid rgba(220, 40, 40, 0.35);
  color: #ff7b7b;
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 0.9rem;
}

/* ============================================================
   NO DATA
============================================================ */
.no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 52px 20px;
  font-style: italic;
  font-size: 0.9rem;
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 24px;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .nav-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
  }

  .main-content {
    padding: 48px 14px 32px;
  }

  .podium-card { min-width: 128px; padding: 18px 18px; }
  .podium-gold { padding: 24px 26px; }

  .stats-table th { padding: 10px 11px; }
  .stats-table td { padding: 9px 11px; }
}

@media (max-width: 480px) {
  .hero-title    { letter-spacing: 0.07em; }
  .nav-brand     { font-size: 1rem; }
  .section-title { letter-spacing: 0.06em; }
  .podium-wrap   { gap: 10px; }
}
