/* ==========================================================
   arcade.css  -  one shared style for index.html ... index7.html
   Put this file in the EmulatorJS folder and link it in each page:
   <link rel="stylesheet" href="arcade.css">
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --cabinet: #14092e;        /* cabinet black-violet */
  --cabinet-deep: #0a041a;   /* behind the screen */
  --neon-pink: #ff2e88;
  --neon-cyan: #19e3ff;
  --coin-yellow: #ffd23f;
  --screen-glow: rgba(25, 227, 255, 0.35);
  --font-display: 'Press Start 2P', 'Courier New', monospace;
  --font-body: 'VT323', 'Courier New', monospace;
}

/* ---------- page ---------- */
html { background: var(--cabinet-deep); }

body {
  margin: 0;
  padding: 24px 12px 64px;
  min-height: 100vh;
  color: #e9e4ff;
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.4;
  text-align: center;
  background:
    linear-gradient(rgba(255, 46, 136, .10) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(25, 227, 255, .10) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(ellipse at 50% 0%, #3a1478 0%, var(--cabinet) 55%, var(--cabinet-deep) 100%);
  background-attachment: fixed;
}

/* ---------- unique title + system badge (set per page) ---------- */
.arcade-title,
h1 {
  margin: 8px auto 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 4vw, 34px);
  line-height: 1.3;
  color: var(--coin-yellow);
  text-shadow:
    3px 3px 0 var(--neon-pink),
    6px 6px 0 rgba(0, 0, 0, .55);
}

.arcade-badge {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 12px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--cabinet-deep);
  background: var(--neon-cyan);
  border-radius: 3px;
  box-shadow: 0 0 14px var(--neon-cyan);
}

/* the one moving thing on the page: a blinking prompt */
.arcade-coin {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--neon-pink);
  animation: coin-blink 1.1s steps(2, start) infinite;
}
@keyframes coin-blink { to { visibility: hidden; } }

/* ---------- the game screen ----------
   Targets the wrapper div that directly contains #game, so you
   do NOT have to edit the existing markup. */
div:has(> #game) {
  position: relative;
  margin: 0 auto 32px;
  padding: 18px;
  box-sizing: content-box;
  background: linear-gradient(145deg, #2b1458, #0e0522);
  border: 4px solid var(--neon-pink);
  border-radius: 18px;
  box-shadow:
    0 0 0 6px var(--cabinet-deep),
    0 0 0 9px var(--neon-cyan),
    0 0 40px 10px var(--screen-glow),
    0 0 90px 20px rgba(255, 46, 136, .25),
    inset 0 0 30px rgba(0, 0, 0, .8);
}

#game {
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

/* CRT scanlines laid over the screen (clicks pass through) */
div:has(> #game)::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 8px;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, .18) 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .45) 100%);
  z-index: 5;
}

/* ---------- game list (the "Projects" section) ---------- */
.resume-section,
section {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
  color: inherit;
}

h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(14px, 3vw, 20px);
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

.subheading {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--coin-yellow);
}

section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

section li { margin: 0; }

/* each game link looks like an arcade button */
section li a {
  display: block;
  padding: 14px 10px;
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 1.5;
  text-decoration: none;
  color: var(--coin-yellow);
  background: var(--cabinet);
  border: 3px solid var(--neon-pink);
  border-radius: 10px;
  box-shadow: 0 5px 0 #8a1450;
  transition: transform .08s, box-shadow .08s, background .08s, color .08s;
}

section li a:hover,
section li a:focus-visible {
  color: var(--cabinet-deep);
  background: var(--coin-yellow);
  border-color: var(--coin-yellow);
  box-shadow: 0 5px 0 #a8820a, 0 0 20px rgba(255, 210, 63, .6);
  outline: none;
}

section li a:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #8a1450;
}

/* plain links elsewhere on the page */
a { color: var(--neon-cyan); }
a:focus-visible { outline: 3px dashed var(--coin-yellow); outline-offset: 3px; }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  body { font-size: 20px; padding-top: 16px; }
  div:has(> #game) { padding: 10px; border-width: 3px; }
  div:has(> #game)::after { inset: 10px; }
}

/* ---------- respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .arcade-coin { animation: none; }
  section li a { transition: none; }
}
