:root {
  --bg: #08080f;
  --bg-deep: #050509;
  --fg: #eaf0ff;
  --fg-dim: #8a93b8;
  --muted: #4a5070;
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff2e7e;
  --neon-violet: #9d4eff;
  --neon-lime: #b8ff3d;
  --card: rgba(12, 14, 28, 0.85);
  --border: rgba(0, 240, 255, 0.12);
  --border-hot: rgba(255, 46, 126, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Chakra Petch', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  cursor: default;
}

/* ── Scanlines ── */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 3px,
    rgba(0, 0, 0, 0.06) 3px
  );
  opacity: 0.5;
}

/* ── Grid BG ── */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 80%);
}

/* ── Grain ── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 101;
  opacity: 0.15;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  z-index: 50;
  background: linear-gradient(180deg, rgba(8, 8, 15, 0.8) 0%, transparent 100%);
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: slideDown 0.6s ease 0.15s forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--neon-cyan);
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--fg);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: var(--neon-cyan);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--neon-cyan);
  border-radius: 2px;
  text-decoration: none;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: all 0.25s ease;
}

.nav-cta:hover {
  background: var(--fg);
  box-shadow: 0 0 30px var(--neon-cyan);
}

/* ── Hero Layout ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  padding: 0 48px;
  overflow: hidden;
  z-index: 10;
}

/* ── Hero BG ── */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.1);
  animation: bgReveal 1.5s ease 0.2s forwards;
}

@keyframes bgReveal {
  to { opacity: 0.3; transform: scale(1); }
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(8, 8, 15, 0.9) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, transparent 20%, transparent 70%, var(--bg) 100%),
    linear-gradient(90deg, var(--bg) 0%, transparent 40%);
}

/* ── Hero Content ── */
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 620px;
  padding: 120px 0 80px 0;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border-hot);
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--neon-magenta);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeIn 0.5s ease 0.4s forwards;
  background: rgba(255, 46, 126, 0.05);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-magenta);
  box-shadow: 0 0 10px var(--neon-magenta);
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Title with Glitch ── */
.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.title-word {
  display: block;
  opacity: 0;
  transform: translateX(-30px);
  animation: titleSlide 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.title-word:nth-child(1) { animation-delay: 0.5s; color: var(--fg); }
.title-word:nth-child(2) { animation-delay: 0.65s; color: var(--neon-cyan); text-shadow: 0 0 40px rgba(0, 240, 255, 0.3); }
.title-word:nth-child(3) { animation-delay: 0.8s; color: var(--fg-dim); }

@keyframes titleSlide {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Glitch effect */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch::before {
  color: var(--neon-magenta);
  z-index: -1;
}

.glitch::after {
  color: var(--neon-cyan);
  z-index: -2;
}

.glitch:hover::before {
  animation: glitchMag 0.4s ease;
}

.glitch:hover::after {
  animation: glitchCyan 0.4s ease;
}

@keyframes glitchMag {
  0%, 100% { opacity: 0; transform: translate(0); }
  20% { opacity: 0.8; transform: translate(-3px, 2px); }
  40% { opacity: 0.6; transform: translate(3px, -2px); }
  60% { opacity: 0.8; transform: translate(-2px, 1px); }
  80% { opacity: 0.4; transform: translate(2px, -1px); }
}

@keyframes glitchCyan {
  0%, 100% { opacity: 0; transform: translate(0); }
  20% { opacity: 0.8; transform: translate(3px, -2px); }
  40% { opacity: 0.6; transform: translate(-3px, 2px); }
  60% { opacity: 0.8; transform: translate(2px, -1px); }
  80% { opacity: 0.4; transform: translate(-2px, 1px); }
}

/* ── Subtitle ── */
.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-dim);
  max-width: 480px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeIn 0.5s ease 1s forwards;
}

/* ── CTA ── */
.cta-row {
  display: flex;
  gap: 14px;
  margin-bottom: 52px;
  opacity: 0;
  animation: fadeIn 0.5s ease 1.15s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 28px;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--neon-cyan);
  color: var(--bg);
  border: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn-primary:hover {
  background: var(--fg);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn-ghost:hover {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
  background: rgba(255, 46, 126, 0.05);
}

/* ── Stats ── */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  opacity: 0;
  animation: fadeIn 0.5s ease 1.3s forwards;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--neon-cyan);
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-divider {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
}

/* ── Live Panel ── */
.live-panel {
  position: relative;
  z-index: 20;
  max-width: 380px;
  margin-left: auto;
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  animation: panelReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.4s forwards;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 240, 255, 0.05);
}

.live-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan), var(--neon-violet));
}

@keyframes panelReveal {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.live-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--neon-magenta);
}

.live-viewers {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

.live-panel-body {
  padding: 18px;
}

.match-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.match-game {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--neon-violet);
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.team {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-right {
  flex-direction: row-reverse;
}

.team-logo {
  color: var(--fg-dim);
}

.team-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--fg);
}

.team-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--fg-dim);
}

.team-score.win {
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

.vs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.match-meta {
  display: flex;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
}

.match-status {
  color: var(--neon-magenta);
  font-weight: 700;
}

.panel-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin-top: 14px;
  border-radius: 2px;
  border: 1px solid var(--border);
}

/* ── Game Strip ── */
.game-strip {
  position: relative;
  z-index: 10;
  padding: 40px 48px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-deep) 30%);
}

.strip-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 20px;
  padding-left: 4px;
}

.strip-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.game-card {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: all 0.4s ease;
}

.game-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
  transform: translateY(-4px);
}

.game-card:hover img {
  opacity: 0.85;
  transform: scale(1.05);
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 9, 0.9) 100%);
}

.game-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fg);
}

.game-players {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--neon-lime);
  margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }

  .live-panel {
    display: none;
  }

  .nav {
    padding: 14px 20px;
  }

  .nav-right {
    gap: 16px;
  }

  .nav-link {
    display: none;
  }

  .strip-cards {
    grid-template-columns: 1fr;
  }

  .game-strip {
    padding: 30px 24px;
  }
}

@media (max-width: 500px) {
  .hero-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .stat-divider {
    display: none;
  }

  .cta-row {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    justify-content: center;
  }
}
