@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg: #000000;
  --panel: #0a0a0a;
  --panel-2: #111111;
  --line: transparent;
  --text: #ffea00;
  --muted: #c9a800;
  --accent: #ffea00;
  --accent-2: #ffffff;
  --ok: #7cff7c;
  --err: #ff5555;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #000000;
  color: var(--text);
  font-family: 'Press Start 2P', cursive;
  line-height: 1.8;
  font-size: 10px;
}
a { color: var(--accent-2); }

.shell { max-width: 860px; margin: 0 auto; padding: 40px 20px 64px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand h1 { font-size: 22px; line-height: 1.3; margin: 0; color: var(--text); text-shadow: 2px 2px 0 #000, 0 0 8px rgba(255,234,0,0.3); }
.brand .flame { font-size: 28px; filter: drop-shadow(0 0 10px rgba(255,234,0,0.7)); }
.tagline { color: var(--muted); margin: 0 0 28px; font-size: 10px; }.card {
  background: var(--panel);
  border: none;
  border-radius: 0;
  padding: 22px;
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 12px; font-size: 14px; color: var(--text); }
.card p.hint { margin: 0 0 16px; color: var(--muted); font-size: 9px; line-height: 1.8; }

label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-2); margin-bottom: 6px; }
input[type='text'] {
  width: 100%; padding: 12px 14px; border-radius: 0; border: none;
  background: #111; color: var(--text); font-size: 10px; font-family: 'Press Start 2P', cursive; margin-bottom: 14px;
}
input[type='text']::placeholder { color: #666; }
input[type='text']:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.btn {
  appearance: none; border: none; border-radius: 0; padding: 12px 16px; font-size: 10px;
  font-family: 'Press Start 2P', cursive; cursor: pointer; color: #000; background: var(--accent);
  transition: transform 0.06s ease, filter 0.15s ease; line-height: 1.6;
}
.btn:hover { filter: brightness(1.1); background: var(--accent-2); color: #000; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #111; color: var(--text); border: none; }
.btn.secondary:hover { background: var(--accent); color: #000; }
.btn.ghost { background: transparent; color: var(--accent-2); border: none; padding: 8px 10px; font-size: 9px; }
.btn.ghost:hover { background: var(--accent-2); color: #000; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.status { font-size: 9px; color: var(--muted); min-height: 20px; line-height: 1.8; }
.status.error { color: var(--err); }
.status.ok { color: var(--ok); }.share {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 0;
  background: #111;
  border: none;
  font-size: 9px;
  word-break: break-all;
  color: var(--muted);
}
.share code { color: var(--accent-2); font-size: 9px; }

footer.credits { margin-top: 34px; color: var(--muted); font-size: 8px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: center; line-height: 1.8; }

.donate-block { display: flex; flex-direction: column; gap: 10px; }
.donate-head { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); text-align: center; width: 100%; }
.donate-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 240px; align-items: start; }
.donate-rail .donate-grid { grid-template-columns: minmax(0, 1fr); }
.donate-lobby { display: flex; flex-direction: column; gap: 16px; padding: 16px; max-width: 860px; margin: 0 auto; align-items: center; }
.donate-lobby-body { display: flex; flex-direction: column; gap: 16px; width: 100%; text-align: center; margin: 0 auto; align-items: center; }.donate-video-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11px;
}
.donate-lobby .donate-meta-column { order: 1; align-self: stretch; }
.donate-lobby .donate-qr-column { order: 2; justify-content: center; align-items: center; }
.donate-video-container { display: flex; align-items: center; justify-content: center; padding: 16px 0; }.donate-intro-video {
  max-width: 100%;
  width: min(640px, 90%);
  border-radius: 0;
  border: none;
  background: #000;
}
.donate-frame-wrap { position: relative; width: 100%; overflow: hidden; border-radius: 0; background: transparent; }
.donate-frame { display: block; width: 100%; border: 0; background: transparent; }
.donate-meta-frame { height: 200px; }
.donate-qr-frame { height: 320px; }
.donate-qr { max-width: 240px; margin: 0 auto; }
.donate-qr-column, .donate-meta-column { display: flex; flex-direction: column; gap: 8px; min-width: 0; justify-content: center; align-items: center; width: 100%; }
.donate-link { font-size: 9px; padding: 10px 14px; text-align: center; text-decoration: none; }
.donate-note { margin: 0; font-size: 8px; color: var(--muted); text-align: center; line-height: 1.8; }
.donate-note a { color: var(--accent-2); text-decoration: underline; }
@media (max-width: 640px) {
  .donate-grid { grid-template-columns: minmax(0, 1fr); }
  .donate-qr { max-width: 200px; }
}
.badge { display: inline-block; padding: 4px 8px; border-radius: 0; background: #111; border: none; font-size: 8px; color: var(--accent-2); vertical-align: middle; }

#netplay-hud {
  position: fixed; left: 12px; bottom: 12px; z-index: 50; font-size: 8px;
  font-family: 'Press Start 2P', cursive; background: rgba(0,0,0,0.9); border: none;
  border-radius: 0; padding: 10px; color: var(--text); max-width: 340px; line-height: 1.8;
}
#netplay-hud .title { color: var(--accent-2); letter-spacing: 0.06em; text-transform: uppercase; font-size: 8px; margin-bottom: 6px; }
#netplay-hud .line { display: flex; justify-content: space-between; gap: 10px; }
#netplay-hud .slot { color: var(--muted); }
#netplay-hud .rtt.good { color: var(--ok); }
#netplay-hud .rtt.bad { color: var(--err); }
#netplay-hud a { color: var(--accent-2); }

.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 9px; color: var(--muted); line-height: 1.8; }
.steps code { padding: 2px 5px; border-radius: 0; background: #111; border: none; color: var(--accent-2); }
.session-preview { margin: 2px 0 14px; font-size: 9px; color: var(--muted); }
.session-preview strong { color: var(--accent-2); font-weight: 400; }

.video-layer { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,0.96); }
.video-layer-inner { width: min(960px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 0; border: none; background: #000; box-shadow: none; }
.video-layer header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.video-layer h3 { margin: 0; font-size: 12px; letter-spacing: 0.02em; color: var(--text); }
.video-layer video { width: 100%; max-height: 66vh; border-radius: 0; border: none; background: #000; }
.video-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.video-note { margin: 0; font-size: 8px; color: var(--muted); line-height: 1.8; }

.guest-body { overflow: hidden; background: #000; }
#remote-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; image-rendering: pixelated; }
#guest-ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#guest-top {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.85); border: none; border-radius: 0; padding: 8px 14px;
  font-size: 8px; color: var(--text); pointer-events: auto; display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; justify-content: center; max-width: calc(100% - 20px);
}
#guest-pad, #guest-buttons { position: absolute; bottom: 18px; pointer-events: auto; user-select: none; touch-action: none; }
#guest-pad { left: 18px; width: 168px; height: 168px; }
#guest-buttons { right: 18px; display: grid; grid-template-columns: repeat(2, 78px); gap: 12px; }
.tbtn {
  display: flex; align-items: center; justify-content: center; border-radius: 0; border: none;
  background: rgba(0,0,0,0.7); color: var(--accent); font-size: 10px; font-family: 'Press Start 2P', cursive;
  width: 78px; height: 78px;
}
.tbtn.active { background: var(--accent); color: #000; }
.dpad { position: relative; width: 100%; height: 100%; }
.dpad .tbtn { position: absolute; width: 54px; height: 54px; }
.dpad .up { top: 0; left: 57px; }
.dpad .down { bottom: 0; left: 57px; }
.dpad .left { top: 57px; left: 0; }
.dpad .right { top: 57px; right: 0; }
@media (min-width: 900px) { #guest-pad, #guest-buttons { opacity: 0.7; } }

.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.92); }
.modal-content {
  position: relative; background-color: #000; margin: 10% auto; padding: 20px; border: none;
  width: 80%; max-width: 600px; text-align: center; color: var(--text);
}
.close-btn { color: var(--accent-2); float: right; font-size: 20px; cursor: pointer; line-height: 1; }
.close-btn:hover, .close-btn:focus { color: var(--accent); text-decoration: none; }
.modal-image { max-width: 100%; height: auto; border-radius: 0; border: none; }
.modal-caption { margin: 15px 0 0; font-size: 10px; color: var(--text); clear: both; }
