:root {
  --bg: #0a0c10;
  --bg-elevated: #12151c;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --muted: #8b92a8;
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --danger: #fb7185;
  --radius: 14px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(110, 231, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  font-size: 2rem;
  filter: drop-shadow(0 0 12px rgba(110, 231, 255, 0.4));
}

.brand-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 28rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.hero-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.hero-card {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.08), rgba(167, 139, 250, 0.06));
  overflow: hidden;
  min-height: 200px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
}

@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }
}

.hero-title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-desc {
  margin: 0.75rem 0 0;
  color: var(--muted);
  max-width: 36ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #041018;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.btn-play:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.hero-art {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 4rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.section-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--mono);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.game-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.15s, transform 0.15s;
}

.game-card:hover {
  border-color: rgba(110, 231, 255, 0.35);
  transform: translateY(-2px);
}

.game-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.game-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1;
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.game-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.btn-ghost {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.btn-ghost:hover {
  background: rgba(110, 231, 255, 0.08);
}

.about {
  margin-top: 3rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(18, 21, 28, 0.6);
}

.about h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.about p {
  margin: 0;
  color: var(--muted);
}

.deploy-steps {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.deploy-steps code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-2);
}

.play-modal {
  width: min(96vw, 920px);
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  background: var(--bg-elevated);
  color: var(--text);
}

.play-modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-emoji {
  font-size: 1.5rem;
}

.modal-date {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--mono);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

#gameFrame {
  width: 100%;
  height: min(70vh, 560px);
  border: none;
  background: #000;
}

.modal-hint {
  margin: 0;
  padding: 0.6rem 1rem 0.85rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.hero-placeholder {
  padding: 2rem;
  color: var(--muted);
}