﻿.games-body {
  --arcade-bg: rgba(12, 18, 32, 0.92);
  --arcade-panel: rgba(15, 23, 39, 0.84);
  --arcade-line: rgba(120, 187, 255, 0.18);
  --arcade-cyan: #7ae0ff;
  --arcade-mint: #8cffc1;
  --arcade-amber: #ffcf6e;
  --arcade-ink: #edf7ff;
  --arcade-muted: #95aac0;
}

.games-body .site-header {
  background: rgba(10, 17, 28, 0.82);
  border-bottom-color: rgba(120, 187, 255, 0.08);
}

.games-body .site-main,
.games-body .site-footer {
  max-width: 1340px;
}

.games-body .hero-panel,
.games-body .surface-panel,
.games-body .footer-panel {
  background: linear-gradient(180deg, rgba(18, 28, 46, 0.88), rgba(8, 13, 23, 0.94));
  border-color: rgba(120, 187, 255, 0.16);
  box-shadow: 0 28px 70px rgba(4, 9, 18, 0.36);
  color: var(--arcade-ink);
}

.games-body .section-note,
.games-body .lede,
.games-body .footer-copy,
.games-body .footer-links a,
.games-body .footer-meta,
.games-body .hero-stat span {
  color: var(--arcade-muted);
}

.games-body .button-secondary {
  background: rgba(14, 23, 38, 0.84);
  border-color: rgba(122, 224, 255, 0.18);
  color: var(--arcade-ink);
}

.games-body .button-primary {
  background: linear-gradient(135deg, #1299c7 0%, #2de19d 100%);
  color: #06131d;
  box-shadow: 0 16px 30px rgba(41, 215, 168, 0.22);
}

.games-body .eyebrow {
  background: rgba(27, 49, 74, 0.76);
  color: var(--arcade-cyan);
}

.games-body .eyebrow::before {
  background: var(--arcade-mint);
}

.games-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.games-copy,
.games-stats {
  padding: clamp(22px, 4vw, 38px);
}

.games-title {
  max-width: 10ch;
}

.games-stats {
  display: grid;
  gap: 14px;
}

.games-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(122, 224, 255, 0.14);
  background:
    radial-gradient(circle at top right, rgba(122, 224, 255, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(13, 21, 34, 0.9), rgba(8, 13, 22, 0.98));
  box-shadow: 0 18px 42px rgba(4, 9, 18, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card:hover,
.game-card.is-active {
  transform: translateY(-3px);
  border-color: rgba(140, 255, 193, 0.38);
  box-shadow: 0 24px 48px rgba(4, 9, 18, 0.36);
}

.game-card--external {
  border-color: rgba(255, 207, 110, 0.24);
  background:
    radial-gradient(circle at top right, rgba(255, 207, 110, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(20, 24, 38, 0.92), rgba(10, 12, 22, 0.98));
}

.game-card h2 {
  margin: 14px 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
}

.game-card p {
  margin: 0;
  color: var(--arcade-muted);
  line-height: 1.7;
}

.game-card-meta {
  margin-bottom: 12px !important;
  font-size: 0.84rem;
  color: var(--arcade-cyan) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(24, 47, 70, 0.72);
  color: var(--arcade-amber);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.game-card-link-row a {
  text-decoration: none;
}

.games-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
}

.games-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.games-sidebar-head,
.games-story,
.games-controls-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(122, 224, 255, 0.14);
  background: rgba(8, 14, 24, 0.74);
}

.game-panel-title {
  margin-top: 12px;
}

.games-story h3,
.games-controls-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--arcade-cyan);
}

.games-story p {
  margin: 0;
  color: var(--arcade-muted);
  line-height: 1.7;
}

.games-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.games-field span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--arcade-muted);
}

.games-input {
  width: 100%;
  border: 1px solid rgba(122, 224, 255, 0.14);
  border-radius: 14px;
  background: rgba(9, 16, 27, 0.88);
  color: var(--arcade-ink);
  padding: 12px 14px;
}

.games-input:focus {
  outline: none;
  border-color: rgba(140, 255, 193, 0.34);
  box-shadow: 0 0 0 4px rgba(45, 225, 157, 0.1);
}

.games-input--mono,
.lobby-code {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.games-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.games-mode-row--stack {
  display: grid;
}

.online-panel[hidden],
.lobby-panel[hidden],
.canvas-overlay[hidden] {
  display: none;
}

.lobby-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(122, 224, 255, 0.14);
}

.lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 38, 60, 0.74);
  border: 1px solid rgba(122, 224, 255, 0.14);
  color: var(--arcade-cyan);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lobby-list,
.games-control-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.lobby-list {
  display: grid;
  gap: 10px;
}

.lobby-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(12, 21, 34, 0.9);
  border: 1px solid rgba(122, 224, 255, 0.1);
}

.games-control-list {
  display: grid;
  gap: 8px;
}

.games-control-list li,
.log-line {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(11, 20, 33, 0.88);
  color: var(--arcade-muted);
  line-height: 1.55;
}

.games-log {
  min-height: 140px;
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.games-stage {
  display: grid;
  gap: 14px;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hud-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hud-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(12, 21, 34, 0.9);
  border: 1px solid rgba(122, 224, 255, 0.1);
  color: var(--arcade-ink);
  font-size: 0.88rem;
}

.canvas-shell {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(122, 224, 255, 0.16);
  background: linear-gradient(180deg, rgba(4, 10, 18, 0.94), rgba(8, 12, 20, 0.98));
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.canvas-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at center, rgba(21, 59, 78, 0.2), rgba(3, 7, 12, 0.84)),
    linear-gradient(180deg, rgba(8, 15, 24, 0.32), rgba(8, 12, 20, 0.86));
  text-align: center;
}

.canvas-overlay h3 {
  margin: 14px 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.canvas-overlay p,
.games-caption {
  margin: 0;
  color: var(--arcade-muted);
  line-height: 1.7;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(122, 224, 255, 0.18);
  background: rgba(12, 21, 34, 0.9);
  color: var(--arcade-ink);
  transition: transform 180ms ease, border-color 180ms ease;
}

.action-chip:hover,
.action-chip.is-active {
  transform: translateY(-1px);
  border-color: rgba(140, 255, 193, 0.36);
}

@media (max-width: 1320px) {
  .games-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .games-hero-grid,
  .games-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .games-card-grid {
    grid-template-columns: 1fr;
  }

  .games-shell {
    padding: 16px;
  }

  .game-card,
  .games-sidebar-head,
  .games-story,
  .games-controls-card {
    padding: 16px;
  }

  .stage-header,
  .game-card-actions,
  .games-mode-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .canvas-overlay {
    padding: 18px;
  }
}
