:root {
  color-scheme: dark;
  --page: #17191f;
  --surface: #22252d;
  --line: rgba(255,255,255,.09);
  --text: #f4f5f7;
  --muted: #9da3af;
  --accent: #8b6cff;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #29243d 0, var(--page) 48%);
  color: var(--text);
  font: 14px/1.45 Arial, Helvetica, sans-serif;
}
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { display: flex; flex-direction: column; width: 100%; height: 100vh; height: 100dvh; }
.topbar {
  z-index: 2;
  display: flex;
  flex: 0 0 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: rgba(23,25,31,.92);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 13px; letter-spacing: 1.4px; }
.brand-logo { width: 27px; height: 27px; object-fit: contain; }
.brand b { color: #b7a7ff; font-weight: 800; }
.fullscreen-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.fullscreen-button:hover { background: #302b43; border-color: rgba(183,167,255,.5); }
.fullscreen-button:active { transform: scale(.96); }
.fullscreen-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.game-area { display: flex; flex: 1 1 auto; min-height: 0; justify-content: center; align-items: stretch; padding: 12px; }
.game-frame { position: relative; width: 100%; height: 100%; overflow: hidden; background: #111; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 55px rgba(0,0,0,.3); }
.game-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #111; }
.footer { display: flex; flex: 0 0 30px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; color: var(--muted); font-size: 11px; }
.game-frame:fullscreen { border: 0; border-radius: 0; }
.game-frame:fullscreen iframe { width: 100vw; height: 100vh; }
@media (max-width: 600px) {
  body { background: #111; }
  .topbar { flex-basis: 48px; padding: 0 12px; }
  .brand { font-size: 11px; letter-spacing: 1px; }
  .brand-logo { width: 23px; height: 23px; }
  .fullscreen-button { min-height: 32px; padding: 0 9px; font-size: 11px; }
  .game-area { padding: 0; }
  .game-frame { border: 0; border-radius: 0; }
  .footer { flex-basis: 25px; padding: 0 12px; font-size: 10px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .topbar, .footer { display: none; }
  .game-area { padding: 0; }
  .game-frame { border: 0; border-radius: 0; }
}
