:root {
  --bg:      #050a0e;
  --bg2:     #0a1520;
  --card:    #0d1f2d;
  --card2:   #112233;
  --accent:  #00d4ff;
  --accent2: #00ff9d;
  --muted:   #6a8fa8;
  --text:    #e8f4f8;
  --border:  rgba(0,212,255,0.15);
  --glow:    rgba(0,212,255,0.08);
  --red:     #ff4d6d;
  --yellow:  #ffd166;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ── GRID BACKGROUND ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0,212,255,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 90%, rgba(0,255,157,0.05) 0%, transparent 60%),
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: auto, auto, 60px 60px, 60px 60px;
  pointer-events: none; z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(5,10,14,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: opacity .2s;
}
.nav-logo:hover { opacity: .75; }
.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .5px;
  transition: color .2s;
}
.nav-back:hover { color: var(--accent); }
.nav-back svg { transition: transform .2s; }
.nav-back:hover svg { transform: translateX(-3px); }
.nav-tag {
  font-family: 'Space Mono', monospace;
  font-size: 11px; letter-spacing: 2px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 100px;
}

/* ── MAIN ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 60px;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.game-header { text-align: center; }
.game-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px; letter-spacing: 3px;
  color: var(--accent2); text-transform: uppercase;
  margin-bottom: 10px;
}
.game-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800; letter-spacing: -1.5px;
  color: #fff; line-height: 1.05;
}
.game-title span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.game-sub {
  font-size: 14px; color: var(--muted);
  margin-top: 10px; line-height: 1.6;
}
.game-sub code {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  background: var(--glow);
  border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 5px;
}

/* ── TERMINAL WINDOW ── */
.term {
  width: 100%;
  background: #071019;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px rgba(0,212,255,.05);
}

/* barra de título estilo janela */
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-dot.r { background: var(--red); }
.term-dot.y { background: var(--yellow); }
.term-dot.g { background: var(--accent2); }
.term-bar-title {
  flex: 1; text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 11px; letter-spacing: 1px;
  color: var(--muted);
}

/* corpo do terminal */
.term-body {
  padding: 18px;
  height: 420px;
  overflow-y: auto;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,212,255,.25) transparent;
}
.term-body::-webkit-scrollbar { width: 6px; }
.term-body::-webkit-scrollbar-thumb { background: rgba(0,212,255,.25); border-radius: 100px; }

.t-line { white-space: pre-wrap; word-break: break-word; animation: lineIn .12s ease both; }
@keyframes lineIn { from { opacity: 0; } to { opacity: 1; } }

.t-muted  { color: var(--muted); }
.t-cyan   { color: var(--accent); }
.t-green  { color: var(--accent2); }
.t-red    { color: var(--red); }
.t-yellow { color: var(--yellow); }
.t-white  { color: #fff; }

.t-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.t-link:hover { color: var(--accent2); }

/* linha do prompt */
.t-input-row { display: flex; align-items: baseline; gap: 8px; }
.t-prompt { color: var(--accent2); flex-shrink: 0; }
.t-prompt b { color: var(--accent); font-weight: 400; }
.t-field {
  flex: 1;
  background: none; border: none; outline: none;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text);
  caret-color: var(--accent);
  min-width: 40px;
}

/* chips de comando (atalho pro mobile) */
.chips {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.chip {
  font-family: 'Space Mono', monospace;
  font-size: 11px; letter-spacing: 1px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--glow); }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 28px 40px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  nav { padding: 10px 16px; }
  .nav-tag { display: none; }
  main { padding: 20px 12px 36px; gap: 16px; }
  .game-title { font-size: 28px; }
  .game-sub { font-size: 12px; }
  .term-body { height: 380px; padding: 14px 12px; font-size: 12px; }
  .t-field { font-size: 12px; }
  .chip { padding: 6px 11px; font-size: 10px; }
  footer { padding: 18px 16px; font-size: 11px; }
}
