:root {
  --bg: #07070d;
  --panel: #10101c;
  --line: #22223a;
  --text: #e8e8f5;
  --muted: #8a8aa8;
  --cyan: #00f0ff;
  --pink: #ff2bd6;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
#stars { position: fixed; inset: 0; z-index: -1; }
h2 { font-family: var(--mono); font-size: clamp(24px, 3vw, 34px); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.cyan { color: var(--cyan); }

.nav { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; gap: 28px; padding: 18px 5vw; background: linear-gradient(var(--bg), transparent); }
.logo { font-family: var(--mono); font-weight: 800; font-size: 20px; letter-spacing: .08em; margin-right: auto; }
.logo span { color: var(--pink); margin: 0 4px; }
.links { display: flex; gap: 26px; font-family: var(--mono); text-transform: uppercase; font-size: 14px; letter-spacing: .1em; }
.links a:hover { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
.burger { display: none; background: none; border: 0; color: var(--text); font-size: 30px; cursor: pointer; }

.btn-neon { display: inline-block; padding: 14px 28px; border: 0; cursor: pointer; font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #000; background: var(--cyan); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); box-shadow: 0 0 24px rgba(0, 240, 255, .5); transition: background .2s, box-shadow .2s; }
.btn-neon:hover { background: var(--pink); box-shadow: 0 0 30px rgba(255, 43, 214, .6); }
.btn-neon.small, .btn-ghost.small { padding: 9px 18px; font-size: 13px; }
.btn-ghost { display: inline-block; padding: 13px 26px; border: 1px solid var(--cyan); color: var(--cyan); font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; background: none; cursor: pointer; transition: background .2s; }
.btn-ghost:hover { background: rgba(0, 240, 255, .1); }

.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 5vw 60px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.hero-inner { position: relative; max-width: 760px; }
.glitch { position: relative; display: inline-block; font-family: var(--mono); color: var(--cyan); letter-spacing: .3em; font-size: 14px; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; }
.glitch::before { color: var(--pink); animation: glitch 2.4s infinite steps(2); clip-path: inset(0 0 60% 0); }
.glitch::after { color: #7cff4f; animation: glitch 3s infinite steps(2) reverse; clip-path: inset(50% 0 0 0); }
@keyframes glitch { 0%, 90%, 100% { transform: none; } 92% { transform: translate(-3px, 1px); } 95% { transform: translate(3px, -1px); } }
.hero h1 { font-size: clamp(46px, 8vw, 110px); line-height: .95; text-transform: uppercase; font-weight: 900; letter-spacing: -.02em; margin: 18px 0; }
.hero h1 span { background: linear-gradient(90deg, var(--cyan), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 19px; max-width: 520px; }
.hero-btns { display: flex; gap: 14px; margin: 32px 0; flex-wrap: wrap; }
.online { font-family: var(--mono); color: var(--muted); display: flex; align-items: center; gap: 10px; }
.online b { color: #7cff4f; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #7cff4f; box-shadow: 0 0 0 0 rgba(124, 255, 79, .7); animation: pulse 1.6s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 14px rgba(124, 255, 79, 0); } }

.games, .board, .tournament, .join { padding: 90px 5vw; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.genre { display: flex; gap: 6px; }
.genre button { background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 8px 16px; cursor: pointer; font-family: var(--mono); }
.genre button.on { border-color: var(--pink); color: var(--pink); box-shadow: inset 0 0 12px rgba(255, 43, 214, .3); }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.game { position: relative; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/5; background: var(--panel); transition: transform .3s, border-color .3s, box-shadow .3s; }
.game.hide { display: none; }
.game img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.game > div { position: absolute; inset: auto 0 0; padding: 22px; background: linear-gradient(transparent, rgba(0, 0, 0, .92)); }
.game span { font-family: var(--mono); font-size: 12px; color: var(--cyan); }
.game h3 { font-size: 26px; text-transform: uppercase; }
.game p { color: var(--muted); }
.game:hover { transform: translateY(-6px); border-color: var(--cyan); box-shadow: 0 0 30px rgba(0, 240, 255, .25); }
.game:hover img { transform: scale(1.08); }

.tournament { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: center; background: var(--panel); border-block: 1px solid var(--line); }
.label { font-family: var(--mono); color: var(--pink); margin-bottom: 8px; }
.tournament h2 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 8px; }
.countdown { display: flex; gap: 12px; margin: 30px 0; }
.countdown div { min-width: 86px; padding: 16px 10px; text-align: center; border: 1px solid var(--line); background: var(--bg); }
.countdown b { display: block; font-family: var(--mono); font-size: 40px; color: var(--cyan); text-shadow: 0 0 12px rgba(0, 240, 255, .6); }
.countdown span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.slot-bar { height: 8px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 8px; }
.slot-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); }
.slots small { color: var(--muted); font-family: var(--mono); }
.prizes { list-style: none; display: grid; gap: 12px; }
.prizes li { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border: 1px solid var(--line); background: var(--bg); font-family: var(--mono); font-size: 24px; }
.prizes li:first-child { border-color: #ffd400; box-shadow: 0 0 20px rgba(255, 212, 0, .2); }

table { width: 100%; border-collapse: collapse; font-family: var(--mono); }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; text-transform: uppercase; padding: 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); transition: background .4s; }
tr.up td { background: rgba(124, 255, 79, .08); }
td:first-child { color: var(--cyan); font-weight: 700; }
td:last-child { color: var(--pink); font-weight: 700; }

.join { text-align: center; }
.join form { display: flex; gap: 10px; max-width: 560px; margin: 26px auto 0; }
.join input { flex: 1; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-family: var(--mono); }
.join input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 12px rgba(0, 240, 255, .3); }
.join p { margin-top: 14px; color: #7cff4f; font-family: var(--mono); min-height: 1.4em; }
.footer { text-align: center; padding: 30px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr 1fr; }
  .tournament { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--panel); display: none; border-bottom: 1px solid var(--line); }
  .links.open { display: flex; }
  .links a { padding: 16px 5vw; }
  .burger { display: block; }
  .nav .btn-neon { display: none; }
  .game-grid { grid-template-columns: 1fr; }
  .countdown div { min-width: 0; flex: 1; }
  .countdown b { font-size: 28px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  .join form { flex-direction: column; }
}
