:root {
  --bg-top: #0b2342;
  --bg-mid: #0d3e69;
  --bg-bottom: #051328;
  --panel: rgba(7, 29, 58, 0.86);
  --panel-soft: rgba(11, 41, 76, 0.86);
  --line: rgba(90, 168, 232, 0.34);
  --text: #eef8ff;
  --muted: #a4c7e3;
  --accent: #7fd8ff;
  --accent-soft: #75f5d2;
  --gold: #ffd569;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body.focus-mode-active {
  overflow: hidden;
}

body {
  font-family: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 50% -160px, rgba(108, 184, 255, 0.18), transparent 58%),
    radial-gradient(900px 380px at 82% 100%, rgba(108, 255, 215, 0.12), transparent 65%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 36%, var(--bg-bottom) 100%);
  line-height: 1.5;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

body::before {
  inset: 0;
  background:
    radial-gradient(ellipse 260px 26px at 18% 28%, rgba(160, 220, 255, 0.11), transparent 65%),
    radial-gradient(ellipse 340px 30px at 48% 20%, rgba(160, 220, 255, 0.09), transparent 65%),
    radial-gradient(ellipse 280px 24px at 76% 26%, rgba(160, 220, 255, 0.1), transparent 65%);
  animation: causticSweep 18s ease-in-out infinite alternate;
}

body::after {
  top: 0;
  right: 0;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at 50% 50%, rgba(127, 216, 255, 0.2), transparent 72%);
  filter: blur(6px);
  opacity: 0.55;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background:
    linear-gradient(180deg, rgba(5, 21, 44, 0.88), rgba(8, 29, 54, 0.8));
  border-bottom: 1px solid rgba(124, 194, 245, 0.28);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-inner,
.footer-inner,
.site-main {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.header-inner {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

h1 {
  margin: 0;
  font-family: "Fredoka", "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px rgba(143, 212, 255, 0.28);
}

.tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.header-btn,
.header-link {
  border: 1px solid rgba(123, 196, 250, 0.45);
  background: linear-gradient(180deg, rgba(15, 50, 90, 0.92), rgba(10, 32, 64, 0.92));
  color: var(--text);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-btn {
  cursor: pointer;
}

.header-btn:hover,
.header-link:hover {
  background: linear-gradient(180deg, rgba(24, 68, 116, 0.98), rgba(13, 43, 81, 0.95));
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(129, 211, 255, 0.24), 0 8px 20px rgba(15, 93, 155, 0.26);
}

.site-main {
  padding: 24px 0 52px;
}

.play-section {
  margin-bottom: 30px;
}

.section-heading {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.game-window {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  border: 1px solid rgba(124, 194, 245, 0.42);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 29, 58, 0.95), rgba(5, 18, 36, 0.9));
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(117, 200, 255, 0.18),
    inset 0 1px 0 rgba(176, 225, 255, 0.15);
}

.game-window:fullscreen,
.game-window:-webkit-full-screen {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
  border: 0;
}

.game-window.focus-mode {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  border-radius: 0;
  border: 0;
  margin: 0;
}

.game-window-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(20, 58, 102, 0.98), rgba(10, 33, 64, 0.96));
  border-bottom: 1px solid rgba(139, 206, 255, 0.4);
}

.game-window-title {
  font-weight: 600;
  color: #e9f7ff;
  text-shadow: 0 0 14px rgba(117, 196, 255, 0.3);
}

.game-window-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

kbd {
  border: 1px solid rgba(125, 175, 219, 0.65);
  border-radius: 6px;
  padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: #dff3ff;
  background: rgba(11, 28, 51, 0.85);
}

.game-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(76vh, 760px);
}

.game-window:fullscreen .game-frame,
.game-window:-webkit-full-screen .game-frame {
  aspect-ratio: auto;
  height: calc(100dvh - 47px);
  max-height: none;
}

.game-window.focus-mode .game-frame {
  aspect-ratio: auto;
  height: calc(100dvh - 47px);
  max-height: none;
}

@supports not (height: 100dvh) {
  .game-window:fullscreen,
  .game-window:-webkit-full-screen,
  .game-window.focus-mode {
    height: 100vh;
  }

  .game-window:fullscreen .game-frame,
  .game-window:-webkit-full-screen .game-frame,
  .game-window.focus-mode .game-frame {
    height: calc(100vh - 47px);
  }
}

#gameEmbed {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #071529;
}

.content-section {
  margin-top: 16px;
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
  border: 1px solid rgba(114, 179, 228, 0.28);
  border-radius: 14px;
  padding: 16px 16px 15px;
  box-shadow:
    inset 0 1px 0 rgba(171, 223, 255, 0.12),
    0 10px 28px rgba(2, 11, 24, 0.28);
}

.content-section h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-family: "Fredoka", "Bricolage Grotesque", sans-serif;
  letter-spacing: 0.01em;
}

.content-section p {
  margin: 0 0 9px;
  color: var(--muted);
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section a {
  color: #8dd4ff;
}

.site-footer {
  border-top: 1px solid rgba(116, 179, 229, 0.28);
  background: linear-gradient(180deg, rgba(7, 25, 47, 0.9), rgba(4, 14, 29, 0.92));
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-links a {
  color: #9ed8ff;
  text-decoration: none;
}

.footer-links a:hover {
  color: #c2edff;
}

@keyframes causticSweep {
  from {
    transform: translateX(-8px) scaleX(1);
    opacity: 0.58;
  }
  to {
    transform: translateX(10px) scaleX(1.04);
    opacity: 0.92;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .game-window-hint {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .header-btn,
  .header-link {
    padding: 7px 11px;
    font-size: 0.82rem;
  }

  .site-main {
    padding-top: 18px;
  }

  .content-section {
    padding: 13px;
  }
}
