@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg:       #07080f;
  --bg2:      #0c0e1a;
  --bg3:      #111525;
  --surface:  rgba(255,255,255,0.04);
  --border:   rgba(255,255,255,0.07);
  --gold:     #f5c518;
  --orange:   #ff6a00;
  --cyan:     #00e5ff;
  --purple:   #9b59ff;
  --red:      #ff2d55;
  --green:    #00ff88;
  --text:     #eef0fa;
  --muted:    #5a5f7a;
  --glass:    rgba(255,255,255,0.05);
  --radius:   16px;
  --font-head:'Barlow Condensed', sans-serif;
  --font-body:'Rajdhani', sans-serif;
  --font-mono:'Share Tech Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── NOISE OVERLAY ── */
/* z-index kept below nav (500) and paywall (9999) so overlays render correctly */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 4px; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(7,8,15,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--orange), #ff2d00);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(255,106,0,.4);
  transition: all .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,106,0,.6); }

/* ── SECTION LABEL ── */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--cyan);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--cyan);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: .95;
  margin-top: 10px;
}

/* ── GAME CARD ── */
.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg2);
  transition: transform .3s cubic-bezier(.23,1,.32,1), box-shadow .3s;
  text-decoration: none;
  color: var(--text);
  display: block;
  transform-style: preserve-3d;
}

.game-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,106,0,.3);
}

.game-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.23,1,.32,1);
}
.game-card:hover .game-card-img { transform: scale(1.06); }

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,8,15,.95) 0%, rgba(7,8,15,.4) 50%, transparent 100%);
}

.game-card-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
}

.game-card-genre {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.game-card-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 8px;
}

.game-card-desc {
  font-size: 13px;
  color: rgba(238,240,250,.6);
  line-height: 1.5;
  margin-bottom: 14px;
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-price-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}

.game-price-amount {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(245,197,24,.5);
}

.game-price-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
  line-height: 1.3;
}

.game-play-btn {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--orange), #ff2d00);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(255,106,0,.4);
}
.game-play-btn:hover { transform: scale(1.05); box-shadow: 0 6px 24px rgba(255,106,0,.6); }

/* ── RATING STARS ── */
.game-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.game-rating .stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; }
.game-rating .count { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

/* ── LIVE BADGE ── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,45,85,.15);
  border: 1px solid rgba(255,45,85,.4);
  color: var(--red);
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1s ease infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.15} }

/* ── STAT BOX ── */
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stat-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}
.stat-num {
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 30px rgba(245,197,24,.4);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ── BUTTON BASE ── */
.btn {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn:active { transform: scale(.96); }

.btn-primary {
  padding: 16px 40px;
  font-size: 18px;
  background: linear-gradient(135deg, var(--orange) 0%, #ff2d00 100%);
  color: #fff;
  box-shadow: 0 6px 30px rgba(255,106,0,.45);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(255,106,0,.65); }

.btn-ghost {
  padding: 14px 32px;
  font-size: 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); border-color: rgba(255,255,255,.2); }

.btn-gold {
  padding: 16px 40px;
  font-size: 18px;
  background: linear-gradient(135deg, var(--gold) 0%, #e0a800 100%);
  color: #000;
  box-shadow: 0 6px 30px rgba(245,197,24,.45);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(245,197,24,.65); }

/* ── GLASS PANEL ── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── TICKER ── */
.ticker-wrap {
  background: linear-gradient(90deg, var(--orange), #ff2d00);
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-inner {
  display: inline-flex;
  animation: tickerScroll 30s linear infinite;
  gap: 60px;
}
.ticker-item {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.9);
  flex-shrink: 0;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── GAME PAGE SHARED ── */
.game-page-body {
  background: var(--bg);
  min-height: 100vh;
  padding-top: 80px;
}

.game-hud {
  background: rgba(7,8,15,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hud-stat {
  text-align: center;
}
.hud-stat-val {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 20px rgba(245,197,24,.5);
}
.hud-stat-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
}

.game-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.game-canvas {
  display: block;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 0 80px rgba(0,0,0,.8), 0 0 0 1px rgba(255,106,0,.15);
}

.game-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 16px 24px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.ctrl-btn {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 14px 28px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.ctrl-btn:active { transform: scale(.88); background: rgba(255,255,255,.15); }
.ctrl-btn.primary-ctrl {
  background: linear-gradient(135deg, var(--orange), #ff2d00);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(255,106,0,.4);
}
.ctrl-btn.primary-ctrl:disabled { opacity: .3; cursor: not-allowed; }

/* ── WIN OVERLAY ── */
.win-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  z-index: 20;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 30px;
}
.win-overlay.show { display: flex; }

.win-title {
  font-family: var(--font-head);
  font-size: clamp(40px,8vw,80px);
  font-weight: 900;
  letter-spacing: 6px;
  animation: winPulse .5s ease infinite alternate;
}
@keyframes winPulse { from{transform:scale(1)} to{transform:scale(1.06)} }

.win-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.6;
}

/* ── HP BAR ── */
.hp-wrap { margin-top: 6px; }
.hp-bar {
  height: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
}
.hp-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease;
}

/* ── DAMAGE FLOAT ── */
.dmg-float {
  position: absolute;
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  pointer-events: none;
  animation: floatDmg .9s ease forwards;
  z-index: 10;
}
@keyframes floatDmg {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-70px); opacity: 0; }
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
}
.footer a { color: var(--orange); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .game-hud { padding: 10px 16px; gap: 8px; }
  .hud-stat-val { font-size: 20px; }
  .game-canvas-wrap { padding: 12px; }
  .game-controls { padding: 12px 16px 20px; }
}
