* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #050f18;
  --panel: #0b2233;
  --panel-edge: #14425c;
  --ice: #59e0f5;
  --ice-soft: #7ef0ff;
  --text: #eaf7ff;
  --muted: #8fd0e8;
  --gold: #ffe08a;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg) linear-gradient(180deg, #04101e 0%, #0a2438 55%, #11455e 100%);
  color: var(--text);
  font-family: 'Courier New', monospace;
  min-height: 100vh;
}

img {
  image-rendering: pixelated;
}

a {
  color: var(--ice-soft);
}

h1, h2, .brand span, .play-btn, .nav-play {
  font-family: 'Press Start 2P', 'Courier New', monospace;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}

.nav nav a:hover {
  color: var(--ice-soft);
}

.nav nav .nav-play {
  background: var(--ice);
  color: #06222f !important;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 11px;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px 40px;
}

.hero {
  text-align: center;
  padding: 60px 0 30px;
  position: relative;
}

.hero h1 {
  font-size: clamp(26px, 5.5vw, 52px);
  line-height: 1.35;
  color: var(--text);
  text-shadow: 0 4px 0 #06222f, 0 0 34px rgba(89, 224, 245, 0.35);
}

.tagline {
  margin: 26px 0 34px;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.7;
  font-weight: bold;
}

.play-btn {
  display: inline-block;
  background: var(--ice);
  color: #06222f;
  text-decoration: none;
  font-size: clamp(14px, 2.2vw, 20px);
  padding: 20px 46px;
  border-radius: 6px;
  border-bottom: 6px solid #2fa8c9;
  animation: pulse 1.6s ease-in-out infinite;
  transition: transform 0.08s ease;
}

.play-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.play-btn:active {
  transform: translateY(3px);
  border-bottom-width: 2px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(89, 224, 245, 0.45); }
  50% { box-shadow: 0 0 0 18px rgba(89, 224, 245, 0); }
}

.subnote {
  margin-top: 20px;
  color: #5a8aa0;
  font-size: 13px;
  font-weight: bold;
}

.hunt-btn {
  display: inline-block;
  margin-top: 18px;
  color: var(--gold);
  border: 3px solid var(--gold);
  border-radius: 6px;
  padding: 12px 22px;
  text-decoration: none;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: clamp(9px, 1.4vw, 12px);
  transition: transform 0.08s ease, background 0.15s ease;
}

.hunt-btn:hover {
  background: rgba(255, 224, 138, 0.12);
  transform: translateY(-2px);
}

.hero-art {
  position: relative;
  height: 190px;
  margin-top: 30px;
}

.hero-art img {
  position: absolute;
  bottom: 0;
}

.hero-pen {
  left: calc(50% - 220px);
  animation: bob 1.8s ease-in-out infinite;
}

.hero-bear {
  left: calc(50% + 70px);
  animation: bob 2.3s ease-in-out infinite;
}

.hero-cry {
  animation: float 2.2s ease-in-out infinite;
}

.hero-cry.c1 { left: calc(50% - 60px); bottom: 90px; }
.hero-cry.c2 { left: calc(50% - 8px); bottom: 120px; animation-delay: 0.4s; }
.hero-cry.c3 { left: calc(50% + 40px); bottom: 80px; animation-delay: 0.8s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.panel {
  background: var(--panel);
  border: 3px solid var(--panel-edge);
  border-radius: 8px;
  padding: 34px clamp(18px, 4vw, 44px);
  margin: 34px 0;
}

.panel h2 {
  color: var(--ice-soft);
  font-size: clamp(13px, 2.4vw, 18px);
  text-align: center;
  margin-bottom: 24px;
  text-shadow: 0 3px 0 #06222f;
}

.board {
  list-style: none;
  max-width: 460px;
  margin: 0 auto;
}

.board li {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-weight: bold;
  font-size: 15px;
  border-bottom: 2px dashed var(--panel-edge);
}

.board li:first-child {
  color: var(--gold);
}

.board .board-loading {
  justify-content: center;
  color: var(--muted);
  border: none;
}

.panel-foot {
  text-align: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: bold;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.how-card {
  background: #0e2c40;
  border: 2px solid var(--panel-edge);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.how-card h3 {
  color: var(--ice);
  font-size: 15px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.how-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: bold;
}

kbd {
  background: #06222f;
  border: 1px solid var(--panel-edge);
  border-bottom-width: 3px;
  border-radius: 4px;
  padding: 1px 7px;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
}

.goal {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14.5px;
  font-weight: bold;
}

.goal strong {
  color: var(--text);
}

.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.features li {
  padding: 12px 14px 12px 40px;
  position: relative;
  color: var(--muted);
  font-weight: bold;
  font-size: 14px;
  background: #0e2c40;
  border-radius: 6px;
  border: 2px solid var(--panel-edge);
}

.features li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 14px;
  width: 12px;
  height: 12px;
  background: var(--ice);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

footer {
  text-align: center;
  padding: 30px 20px 44px;
  color: #5a8aa0;
  font-size: 13px;
  font-weight: bold;
}

.hero-slim {
  padding: 40px 0 10px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin: 30px 0;
}

.game-card {
  background: var(--panel);
  border: 3px solid var(--panel-edge);
  border-radius: 8px;
  padding: 30px clamp(18px, 3vw, 36px);
  text-align: center;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--ice);
}

.game-card-art {
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 18px;
  border-bottom: 3px dashed var(--panel-edge);
  padding-bottom: 14px;
}

.game-tag {
  display: inline-block;
  background: #0e2c40;
  border: 2px solid var(--panel-edge);
  border-radius: 4px;
  color: var(--gold);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 5px 10px;
  margin-bottom: 14px;
}

.game-card h2 {
  color: var(--ice-soft);
  font-size: clamp(14px, 2.4vw, 19px);
  margin-bottom: 16px;
  text-shadow: 0 3px 0 #06222f;
}

.game-card p {
  color: var(--muted);
  font-size: 14px;
  font-weight: bold;
  line-height: 1.75;
  margin-bottom: 22px;
}

.play-btn-slim {
  padding: 14px 30px;
  font-size: clamp(11px, 1.6vw, 14px);
}

.play-btn-gold {
  background: var(--gold);
  border-bottom-color: #c9a44e;
  color: #3a2c00;
}

.game-meta {
  margin: 16px 0 0;
  color: #5a8aa0;
  font-size: 12px;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.boards-grid .panel {
  margin: 0 0 34px;
}

.play-main {
  max-width: 1240px;
}

.play-title {
  text-align: center;
  font-size: clamp(15px, 2.6vw, 22px);
  margin: 30px 0 20px;
  text-shadow: 0 3px 0 #06222f;
}

.play-grid {
  display: grid;
  grid-template-columns: minmax(0, 960px) minmax(240px, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 1180px) {
  .play-grid {
    grid-template-columns: 1fr;
  }
}

.game-wrap {
  position: relative;
  border: 3px solid var(--panel-edge);
  border-radius: 8px;
  overflow: hidden;
  background: #050f18;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#game {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
}

#game:fullscreen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  background: #050f18;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game canvas {
  margin: 0 auto;
}

#hunt-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}

#fs-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 20;
  background: rgba(6, 34, 47, 0.85);
  color: var(--ice-soft);
  border: 2px solid var(--panel-edge);
  border-radius: 4px;
  font: bold 11px 'Courier New', monospace;
  letter-spacing: 1px;
  padding: 6px 10px;
  cursor: pointer;
}

#fs-btn:hover {
  border-color: var(--ice);
}

.play-hint {
  text-align: center;
  color: #5a8aa0;
  font-size: 12px;
  font-weight: bold;
  margin: 10px 0 0;
}

.play-side .panel {
  margin: 0;
}

@media (max-width: 640px) {
  .nav nav a:not(.nav-play) {
    display: none;
  }
  .hero-art {
    transform: scale(0.75);
    height: 150px;
  }
}
