/* CRT cabinet chrome shared by all game pages */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pink: #ff2d95;
  --cyan: #00f0ff;
  --yellow: #ffe600;
  --green: #39ff14;
  --bg: #05010d;
}

html, body { height: 100%; }

body {
  background:
    radial-gradient(ellipse at 50% -20%, #1a0b33 0%, transparent 60%),
    radial-gradient(ellipse at 50% 120%, #2a0a2e 0%, transparent 55%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  color: var(--cyan);
  overflow: hidden;
}

.cab {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 12px;
  background: linear-gradient(180deg, #12082a 0%, #0a0418 100%);
  border: 2px solid #2a1a55;
  border-radius: 14px;
  box-shadow:
    0 0 40px rgba(123, 45, 255, 0.25),
    inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.cab-top, .cab-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 2px;
  color: #5a4a9b;
  padding: 0 4px;
}

.cab-top .home {
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}
.cab-top .home:hover { color: var(--yellow); }

.cab-name {
  color: var(--pink);
  text-shadow: 0 0 10px rgba(255, 45, 149, 0.7);
  font-weight: bold;
}

.cab-coins { color: var(--yellow); text-shadow: 0 0 8px rgba(255, 230, 0, 0.5); }

.screen {
  position: relative;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 3px solid #000;
  box-shadow:
    0 0 25px rgba(0, 240, 255, 0.18),
    inset 0 0 18px rgba(0, 0, 0, 0.9);
  background: #000;
}

canvas#game {
  width: min(88vw, 820px);
  height: auto;
  aspect-ratio: 480 / 420;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* scanlines */
.crt::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 3;
}

/* vignette + curvature glow */
.crt::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.5) 100%),
    radial-gradient(ellipse at center, rgba(120, 220, 255, 0.05) 0%, transparent 40%);
  z-index: 4;
}

/* subtle flicker */
@keyframes crt-flicker {
  0%   { opacity: 0.97; }
  50%  { opacity: 1; }
  52%  { opacity: 0.96; }
  100% { opacity: 1; }
}
.screen { animation: crt-flicker 4s infinite; }

@media (max-width: 640px) {
  .cab { padding: 10px; }
  .cab-top, .cab-bottom { font-size: 9px; }
}
