@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* ---- BASE ---- */
  --bg-white: #ffffff;
  --bg-off: #fafbfd;
  --bg-soft-blue: #f2f6ff;
  --bg-alt: #f7f8fb;

  /* ---- ACCENTS (energetic, modern) ---- */
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --orange: #f97316;
  --green: #16a34a;
  --red: #ef4444;
  --purple: #9333ea;

  /* ---- NEUTRAL / TEXT ---- */
  --navy: #101828;
  --text-body: #344054;
  --text-muted: #667085;
  --border-soft: #e4e7ec;
  --shadow-soft: rgba(16, 24, 40, 0.08);

  --font-display: 'Pixelify Sans', 'Space Grotesk', sans-serif;
  --font-heading-alt: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-card: 16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-white);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

body {
  position: relative;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle, var(--border-soft) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  background-position: -6px -6px;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.3px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
img { image-rendering: pixelated; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

.eyebrow-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--blue);
  background: var(--bg-soft-blue);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-image: url("/static/images/image_banner_3.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.icon-rule { display: block; text-align: center; color: var(--orange); font-size: 13px; letter-spacing: 8px; margin: 6px 0 0; }

.section-title {
  font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.3;
  letter-spacing: 0.5px; color: var(--navy); margin: 0 0 30px;
}
.section-sub { color: var(--text-muted); margin-bottom: 30px; font-size: 16px; }
.section { padding: 60px 0; position: relative; }
.section-alt { background: var(--bg-alt); }

.pixel-frame, .parchment-card, .royal-card {
  position: relative;
  background: var(--bg-white);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 16px var(--shadow-soft);
}
.parchment-card { padding: 20px; color: var(--navy); }
.royal-corners::before, .royal-corners::after { content: none; }

/* ---------- NAVBAR ---------- */
.navbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--navy); }
.navbar-brand img { width: 32px; height: 32px; border-radius: 8px; }
.navbar-links { display: flex; gap: 24px; align-items: center; font-size: 13px; }
.navbar-links a { font-family: var(--font-display); color: var(--text-body); font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; }
.navbar-links a:hover { color: var(--blue); }
.nav-cta {
  background: var(--navy) !important; color: #fff !important; padding: 10px 18px;
  border-radius: var(--radius-pill); font-weight: 700 !important;
}
.nav-cta:hover { background: var(--blue) !important; color: #fff !important; }
.hamburger { display: none; background: var(--bg-white); border: 2px solid var(--border-soft); color: var(--navy); padding: 6px 10px; cursor: pointer; border-radius: 8px; }

/* ---------- HERO (two-column) ---------- */
.hero { position: relative; padding: 60px 0 20px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 30px; }
.hero-tag {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--orange); background: #fff2e8; padding: 8px 16px; border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 700; font-size: 58px; line-height: 1.25;
  letter-spacing: 1px; color: var(--navy); margin: 0 0 18px;
}
.hero-subtitle { font-size: 19px; color: var(--text-muted); margin: 0 0 26px; font-weight: 500; }
.btn-pixel {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; background: var(--navy); color: #fff;
  border: none; border-radius: 10px;
  box-shadow: 3px 3px 0 var(--orange);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-pixel:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--orange); color: #fff; }
.btn-pixel.btn-lg { padding: 16px 30px; font-size: 15px; }
.btn-pixel.btn-outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); box-shadow: 3px 3px 0 var(--border-soft); }
.btn-pixel.btn-danger { background: var(--red); box-shadow: 3px 3px 0 #7f1d1d; }
.btn-pixel.btn-small { font-size: 12px; padding: 10px 16px; }

.hero-dots-deco { display: flex; gap: 8px; margin-top: 30px; }
.hero-dots-deco span { width: 8px; height: 8px; border-radius: 2px; background: var(--border-soft); }
.hero-dots-deco span:nth-child(1) { background: var(--blue); }
.hero-dots-deco span:nth-child(2) { background: var(--orange); }
.hero-dots-deco span:nth-child(3) { background: var(--green); }
.hero-dots-deco span:nth-child(4) { background: var(--red); }
.hero-dots-deco span:nth-child(5) { background: var(--purple); }

.hero-art { position: relative; height: 400px; display: flex; align-items: center; justify-content: center; }
.hero-art-blob {
  position: absolute; width: 320px; height: 320px; border-radius: 42% 58% 60% 40% / 45% 40% 60% 55%;
  background: linear-gradient(135deg, var(--bg-soft-blue), #fff2e8);
  z-index: 0;
}
.pixel-illustration { position: relative; z-index: 1; width: 100%; height: 100%; }
.pixel-emoji {
  position: absolute; font-size: 64px; filter: drop-shadow(0 8px 12px rgba(16,24,40,0.15));
}
.pixel-emoji--main { top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 130px; animation: floatMain 4s ease-in-out infinite; }
.pixel-emoji--float-1 { top: 8%; left: 12%; font-size: 44px; animation: floatSmall 3.4s ease-in-out infinite; }
.pixel-emoji--float-2 { bottom: 10%; left: 6%; font-size: 40px; animation: floatSmall 3.8s ease-in-out infinite .4s; }
.pixel-emoji--float-3 { top: 12%; right: 8%; font-size: 46px; animation: floatSmall 3.2s ease-in-out infinite .2s; }
.pixel-emoji--float-4 { bottom: 6%; right: 14%; font-size: 42px; animation: floatSmall 3.6s ease-in-out infinite .6s; }
@keyframes floatMain { 0%,100% { transform: translate(-50%,-50%) translateY(0);} 50% { transform: translate(-50%,-50%) translateY(-14px);} }
@keyframes floatSmall { 0%,100% { transform: translateY(0) rotate(0deg);} 50% { transform: translateY(-10px) rotate(-6deg);} }
.speed-line { position: absolute; height: 4px; border-radius: 2px; opacity: 0.5; }
.speed-line--1 { width: 60px; background: var(--blue); top: 30%; left: 0; }
.speed-line--2 { width: 40px; background: var(--orange); bottom: 32%; right: 4%; }
.speed-line--3 { width: 50px; background: var(--green); top: 62%; left: 8%; }

.hero-geo-strip {
  height: 6px; margin-top: 40px;
  background: repeating-linear-gradient(90deg,
    var(--blue) 0 40px, var(--orange) 40px 80px, var(--green) 80px 120px,
    var(--red) 120px 160px, var(--purple) 160px 200px);
}

/* ---------- CAMPAIGN BANNER CAROUSEL ---------- */
.hero-carousel {
  position: relative; max-width: 1180px; height: 360px; overflow: hidden;
  border-radius: var(--radius-card); border: 2px solid var(--border-soft);
  box-shadow: 0 10px 30px var(--shadow-soft); margin-top: 45px;
}
.hero-slide {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  flex-direction: column; text-align: center; background-size: cover; background-position: center;
  opacity: 0; transition: opacity .8s ease; padding: 20px;
}
.hero-slide.active { opacity: 1; z-index: 2; }
/* .hero-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.94)); } */
.hero-slide::before { content:none; }
.hero-slide > * { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 12px; color: var(--orange);
  letter-spacing: 2px; margin-bottom: 10px;
}
.hero-slide-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--navy); margin: 0 0 10px; }
.hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: #fff; border: 2px solid var(--border-soft); color: var(--navy);
  width: 42px; height: 42px; cursor: pointer; font-size: 16px; border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.hero-nav.prev { left: 14px; } .hero-nav.next { right: 14px; }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; background: var(--border-soft); border: none; cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--blue); }

/* ---------- TEAMS (directorates) ---------- */
.directorate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.team-card {
  position: relative; text-align: center; background: var(--bg-white);
  border: 2px solid var(--border-soft); border-radius: var(--radius-card);
  padding: 30px 16px 22px; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.team-card:hover { transform: translateY(-6px); box-shadow: 0 16px 28px var(--shadow-soft); border-color: var(--team-color, var(--blue)); }
.team-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--team-color, var(--blue)); }
.team-badge {
  width: 140px; height: 350px; margin: 14px auto 14px;
  border-radius: 22px; border: 3px solid var(--team-color, var(--blue));
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-off); overflow: hidden;
  box-shadow: 0 6px 14px var(--shadow-soft);
}
.team-badge img { width: 100%; height: 100%; object-fit: cover; }
.team-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.4; letter-spacing: 0.4px; margin: 6px 0 16px; color: var(--navy); }
.team-stats { display: flex; justify-content: center; gap: 18px; }
.team-stat { display: flex; flex-direction: column; }
.team-stat b { font-family: var(--font-display); font-size: 20px; color: var(--navy); }
.team-stat span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* ---------- SPORTS ---------- */
.sports-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.sport-card {
  text-align: center; padding: 32px 12px; cursor: pointer; display: block;
  background: var(--bg-white); border: 2px solid var(--border-soft); border-radius: var(--radius-card);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.sport-card:hover { transform: translateY(-6px); border-color: var(--blue); box-shadow: 0 14px 24px var(--shadow-soft); }
.sport-icon { font-size: 44px; display: block; margin-bottom: 12px; }
.sport-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.4px; color: var(--navy); }
.sport-count { font-size: 11px; color: var(--text-muted); margin-top: 6px; letter-spacing: .5px; }

/* ---------- STANDINGS (segmented filter + scoreboard) ---------- */
.filter-bar {
  display: inline-flex; gap: 4px; flex-wrap: wrap; margin-bottom: 28px;
  background: var(--bg-alt); padding: 6px; border-radius: var(--radius-pill);
}
.filter-chip {
  font-family: var(--font-display); font-weight: 700; font-size: 12px; padding: 10px 18px;
  background: transparent; color: var(--text-muted); border: none;
  border-radius: var(--radius-pill); cursor: pointer; transition: all .15s ease;
}
.filter-chip.active, .filter-chip:hover { background: var(--navy); color: #fff; }

.standings-wrap { overflow-x: auto; }
table.standings {
  width: 100%; border-collapse: collapse; min-width: 640px;
  background: var(--bg-white); color: var(--navy);
  border: 2px solid var(--border-soft); border-radius: var(--radius-card); overflow: hidden;
}
table.standings th, table.standings td { padding: 16px 12px; text-align: center; border-bottom: 1px solid var(--border-soft); font-size: 15px; }
table.standings th { background: var(--bg-alt); font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .5px; color: var(--text-muted); }
table.standings td.team-name, table.standings td.team-name-cell { text-align: left; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.3px; display: flex; align-items: center; gap: 10px; }
.team-color-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.standings-logo { width: 24px; height: 24px; border-radius: 6px; }
.rank-cell { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
table.standings tr:nth-child(1) .rank-cell { font-size: 24px; }
table.standings tr:nth-child(2) .rank-cell { font-size: 22px; }
table.standings tr:nth-child(3) .rank-cell { font-size: 22px; }
table.standings tr:hover { background: var(--bg-soft-blue); }
.points-cell { font-family: var(--font-display); font-weight: 700; color: var(--blue); font-size: 20px; letter-spacing: 0.5px; }

/* ---------- SCHEDULE (modern grid cards) ---------- */
.match-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.match-card-modern {
  background: var(--bg-white); border: 2px solid var(--border-soft); border-radius: var(--radius-card);
  padding: 20px; position: relative;
}
.match-date-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-bottom: 16px; }
.match-teams-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.match-team { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.match-team img { width: 40px; height: 40px; border-radius: 10px; }
.match-team span { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.3px; color: var(--navy); text-align: center; }
.vs-badge { font-family: var(--font-display); font-weight: 700; font-size: 12px; color: #fff; background: var(--navy); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.match-sport-row { text-align: center; font-size: 13px; font-weight: 700; color: var(--purple); margin-bottom: 6px; }
.match-venue-row { text-align: center; font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }

/* legacy classes kept for sport_detail.html compatibility */
.schedule-day { margin-bottom: 26px; }
.schedule-day-header {
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--navy);
  background: var(--bg-alt); padding: 12px 18px; border-radius: 12px 12px 0 0; border: 2px solid var(--border-soft); border-bottom: none;
}
.match-card { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-top: 1px dashed var(--border-soft); flex-wrap: wrap; gap: 10px; color: var(--navy); }
.match-teams { display: flex; align-items: center; gap: 14px; font-weight: 700; font-family: var(--font-display); }
.match-teams .vs { color: var(--orange); font-family: var(--font-display); font-size: 12px; }
.match-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 14px; flex-wrap: wrap; }

.status-badge { font-family: var(--font-display); font-weight: 700; font-size: 11px; padding: 7px 14px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 6px; }
.status-UPCOMING { background: var(--bg-soft-blue); color: var(--blue); }
.status-LIVE { background: #fef2f2; color: var(--red); }
.status-FINISHED { background: #ecfdf3; color: var(--green); }
.status-POSTPONED { background: #fff7ed; color: var(--orange); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; animation: pulseDot 1.2s infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .4; transform: scale(1.4);} }

/* ---------- RESULTS ---------- */
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.result-card-modern { background: var(--bg-white); border: 2px solid var(--border-soft); border-radius: var(--radius-card); padding: 22px; }
.result-sport-tag { font-family: var(--font-display); font-weight: 700; font-size: 12px; color: var(--purple); text-align: center; margin-bottom: 14px; letter-spacing: .5px; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-weight: 600; color: var(--text-muted); }
.result-row.is-winner { color: var(--navy); }
.result-team-name { font-family: var(--font-display); font-weight: 500; font-size: 14px; letter-spacing: 0.3px; }
.result-team-score {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 6vw, 48px);
  line-height: 1; letter-spacing: 1px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.result-row.is-winner .result-team-score { color: var(--green); }
.result-final-tag { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 10px; letter-spacing: 1px; font-weight: 700; }

/* ---------- CHAMPION ---------- */
.champion-section { text-align: center; padding: 70px 0; background: linear-gradient(180deg, var(--bg-soft-blue), var(--bg-white)); }
.champion-trophy { font-size: 76px; display: block; margin: 16px 0; filter: drop-shadow(0 10px 16px rgba(249,115,22,0.35)); animation: trophyBounce 2.2s ease-in-out infinite; }
@keyframes trophyBounce { 0%,100% { transform: translateY(0) scale(1);} 50% { transform: translateY(-10px) scale(1.05);} }
.champion-name { font-family: var(--font-display); font-weight: 700; font-size: 34px; margin: 6px 0 14px; color: var(--navy); }
.champion-stats { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.champion-empty { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text-muted); }

/* ---------- FOOTER ---------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border-soft); padding: 40px 0 26px; text-align: center; margin-top: 40px; }
.footer-rule { color: var(--border-soft); margin: 14px 0; font-size: 13px; }
.footer small { color: var(--text-muted); }

/* ---------- ANIMATIONS ---------- */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.pixel-particle { position: absolute; width: 6px; height: 6px; opacity: 0.8; pointer-events: none; animation: floatUp 6s linear infinite; border-radius: 2px; }
@keyframes floatUp { from { transform: translateY(0) rotate(0deg); opacity: .9; } to { transform: translateY(-220px) rotate(90deg); opacity: 0; } }

.flash-stack { position: fixed; top: 90px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.flash-msg { font-weight: 700; padding: 12px 18px; border-radius: 10px; border: 2px solid; min-width: 240px; box-shadow: 0 8px 20px rgba(16,24,40,0.1); background: #fff; }
.flash-success { border-color: var(--green); color: var(--green); }
.flash-danger { border-color: var(--red); color: var(--red); }
.flash-warning { border-color: var(--orange); color: var(--orange); }
.flash-info { border-color: var(--blue); color: var(--blue); }

/* ---------- PIXEL FONT CRISPNESS (non-heading elements) ---------- */
.team-name, .sport-name, .btn-pixel, .filter-chip, .navbar-links a,
.match-team span, .result-team-score, .result-team-name, .rank-cell,
.points-cell, table.standings td.team-name, table.standings td.team-name-cell,
.status-badge, .champion-name, .hero-tag, .eyebrow-tag, .nav-cta {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 260px; order: -1; }
  .hero-title { font-size: 42px; }
  .section-title { font-size: 28px; }
  .directorate-grid, .sports-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .match-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .directorate-grid, .sports-grid, .results-grid { grid-template-columns: 1fr; }
  .navbar-links { display: none; flex-direction: column; align-items: flex-start; position: absolute; top: 62px; left: 0; right: 0; background: #fff; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
  .navbar-links.open { display: flex; }
  .hamburger { display: inline-block; }
  .hero-title { font-size: 32px; letter-spacing: 0.5px; }
  .section-title { font-size: 24px; }
  .team-name, .sport-name { font-size: 16px; }
  .pixel-emoji--main { font-size: 90px; }
  .match-card { flex-direction: column; align-items: flex-start; }
  .hero-carousel { height: 300px; }
}
