:root {
  --arcade-header-h: 44px;
  --arcade-bg: #050508;
  --arcade-text: #ccc;
  --arcade-accent: #ffcc00;
  --arcade-accent-glow: #ffcc0044;
}

/* ── Site header (injected on game pages) ── */
.arcade-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--arcade-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(5, 5, 12, 0.92);
  border-bottom: 1px solid rgba(255, 204, 0, 0.25);
  backdrop-filter: blur(8px);
  z-index: 100000;
  font-family: monospace;
}

.arcade-header__brand {
  color: var(--arcade-accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  text-shadow: 0 0 12px var(--arcade-accent-glow);
  white-space: nowrap;
}

.arcade-header__brand:hover {
  color: #ffe566;
}

.arcade-header__game {
  color: #666;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50%;
  text-align: right;
}

html.arcade-has-header body {
  padding-top: var(--arcade-header-h);
}

/* Fullscreen canvas games */
html.arcade-has-header canvas#c {
  height: calc(100vh - var(--arcade-header-h)) !important;
}

html.arcade-has-header #hud,
html.arcade-has-header #levelbar {
  top: calc(12px + var(--arcade-header-h));
}

html.arcade-has-header #ctrl {
  top: calc(10px + var(--arcade-header-h));
}

html.arcade-has-header #tbtn-inv {
  top: calc(16px + var(--arcade-header-h));
}

html.arcade-has-header #tbtn-shop {
  top: calc(72px + var(--arcade-header-h));
}

html.arcade-has-header #tbtn-pause {
  top: calc(128px + var(--arcade-header-h));
}

/* ── Homepage ── */
.arcade-home {
  min-height: 100vh;
  background: var(--arcade-bg);
  color: var(--arcade-text);
  font-family: monospace;
}

.arcade-home__hero {
  text-align: center;
  padding: 48px 20px 32px;
}

.arcade-home__title {
  font-size: clamp(28px, 6vw, 48px);
  color: var(--arcade-accent);
  letter-spacing: 4px;
  text-shadow: 0 0 20px var(--arcade-accent-glow), 0 0 40px var(--arcade-accent-glow);
  margin-bottom: 8px;
}

.arcade-home__subtitle {
  color: #555;
  font-size: 13px;
  letter-spacing: 2px;
}

.arcade-home__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.game-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #222;
  background: #0a0a12;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #444;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.game-card__preview {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.game-card__preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

.game-card__headline {
  position: relative;
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.2;
  white-space: pre-line;
  margin-bottom: 16px;
}

.game-card__start {
  position: relative;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 8px 20px;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: 0.85;
}

.game-card__info {
  padding: 14px 16px;
  border-top: 1px solid #1a1a22;
}

.game-card__name {
  color: #eee;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.game-card__tagline {
  color: #555;
  font-size: 11px;
  line-height: 1.4;
}

.arcade-home__footer {
  text-align: center;
  padding: 0 20px 32px;
  color: #333;
  font-size: 10px;
  letter-spacing: 1px;
}
