:root {
  --bg: #141414;
  --red: #e31b23;
  --red-dark: #9a0f15;
  --white: #f0e6d2;
  --black: #0a0a0a;
  --gray: #2a2a2a;
  --font-display: 'Rubik Mono One', monospace;
  --font-body: 'Space Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

#ui > * {
  pointer-events: auto;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  gap: 12px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

#hud > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#hud .label {
  font-size: 10px;
  color: rgba(244,241,234,0.6);
  margin-bottom: 4px;
}

#score, #level {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--white);
}

#paranoia-wrap {
  flex: 1;
  max-width: 220px;
  align-items: stretch !important;
}

#paranoia-bar {
  width: 100%;
  height: 10px;
  background: rgba(244,241,234,0.15);
  border: 1px solid rgba(244,241,234,0.3);
  position: relative;
  overflow: hidden;
}

#paranoia-fill {
  width: 0%;
  height: 100%;
  background: var(--red);
  transition: width 0.15s linear;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(10,10,10,0.92);
  padding: 24px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.screen.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 12vw, 110px);
  line-height: 0.9;
  color: var(--white);
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 52px);
  color: var(--red);
  margin-bottom: 18px;
  line-height: 1.1;
}

.subtitle {
  font-family: var(--font-display);
  font-size: clamp(18px, 4vw, 32px);
  color: var(--red);
  margin-bottom: 20px;
  letter-spacing: 0.2em;
}

.tagline {
  max-width: 520px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244,241,234,0.75);
  margin-bottom: 32px;
}

#tutorial ul {
  list-style: none;
  max-width: 520px;
  text-align: left;
  margin-bottom: 28px;
}

#tutorial li {
  font-size: 14px;
  line-height: 1.7;
  padding: 8px 0;
  border-bottom: 1px solid rgba(244,241,234,0.1);
}

#tutorial li strong {
  color: var(--red);
}

.btn {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
  padding: 14px 28px;
  margin: 8px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
  min-width: 200px;
}

.btn:hover {
  background: var(--white);
  color: var(--red);
  transform: scale(1.02);
}

.btn:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(244,241,234,0.4);
}

.btn-ghost:hover {
  background: rgba(244,241,234,0.08);
  color: var(--white);
  border-color: var(--white);
}

#gameover p {
  font-size: 14px;
  margin-bottom: 12px;
  color: rgba(244,241,234,0.8);
}

#go-score strong {
  color: var(--red);
  font-size: 18px;
}

#sg-fs-btn, #mute-btn {
  position: fixed;
  top: 8px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  color: var(--white);
  cursor: pointer;
  z-index: 9999;
}

#sg-fs-btn {
  right: 8px;
}

#mute-btn {
  right: 40px;
}

#sg-fs-btn:hover, #mute-btn:hover {
  background: rgba(0,0,0,0.7);
}

#sg-fs-btn svg, #mute-btn svg {
  display: block;
}

@media (max-width: 520px) {
  #hud {
    padding: 10px;
    font-size: 10px;
  }
  #score, #level {
    font-size: 14px;
  }
  .btn {
    min-width: 160px;
    padding: 12px 20px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
