/* =====================================================================
   Oldmill Arcade — 80's arcade-stijl voor het gamegedeelte
   Eén donkere wereld (bewust single-theme): neon op nachtblauw, CRT-scanlijnen,
   pixel-letters (Press Start 2P) en terminal-tekst (VT323).
   ===================================================================== */
:root {
  --a-bg: #0D0B22;
  --a-bg-2: #17143A;
  --a-bg-3: #231E55;
  --a-pink: #FF2E88;
  --a-cyan: #22E4FF;
  --a-yellow: #FFD23F;
  --a-green: #39FF8E;
  --a-text: #EDEBFF;
  --a-dim: #9C98D6;
  --f-pixel: "Press Start 2P", "Courier New", ui-monospace, monospace;
  --f-term: "VT323", "Courier New", ui-monospace, monospace;
}

.arcade {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, var(--a-bg-3) 0%, var(--a-bg) 60%);
  color: var(--a-text); font-family: var(--f-term); font-size: 1.45rem; line-height: 1.25;
}
/* scanlijnen + vignet */
.arcade::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 30;
  background:
    repeating-linear-gradient(0deg, rgb(0 0 0 / .22) 0 1px, transparent 1px 3px),
    radial-gradient(120% 100% at 50% 50%, transparent 60%, rgb(0 0 0 / .55) 100%);
  mix-blend-mode: multiply;
}
.arcade .stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
/* synthwave-vloer */
.arcade .floor {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 46%; z-index: -1;
  background:
    linear-gradient(to top, transparent 0, var(--a-bg) 92%),
    repeating-linear-gradient(90deg, rgb(255 46 136 / .55) 0 2px, transparent 2px 80px),
    repeating-linear-gradient(0deg, rgb(255 46 136 / .55) 0 2px, transparent 2px 60px);
  transform: perspective(380px) rotateX(62deg); transform-origin: 50% 100%;
  animation: floor 3s linear infinite; opacity: .55;
}
.arcade .floor { background-blend-mode: normal; }
@keyframes floor { to { background-position: 0 0, 0 0, 0 60px; } }

.px { font-family: var(--f-pixel); line-height: 1.5; letter-spacing: 0; font-weight: 400; }
.px-title {
  font-family: var(--f-pixel); font-weight: 400; letter-spacing: 0; line-height: 1.25;
  font-size: clamp(1.5rem, .8rem + 3.2vw, 3.4rem); color: var(--a-yellow);
  text-shadow: 3px 3px 0 var(--a-pink), 6px 6px 0 rgb(34 228 255 / .55);
  text-wrap: balance;
}
.px-sub { font-family: var(--f-pixel); font-size: .78rem; color: var(--a-cyan); letter-spacing: .06em; line-height: 1.8; }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.arcade p { max-width: 58ch; color: var(--a-dim); }
.arcade strong { color: var(--a-text); font-weight: 400; }

.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .8em; cursor: pointer; text-decoration: none;
  font-family: var(--f-pixel); font-size: .78rem; line-height: 1; color: var(--a-bg); background: var(--a-yellow);
  padding: 1.05em 1.4em; border: 0; min-height: 46px;
  box-shadow: 0 4px 0 #B8901A, 4px 4px 0 4px rgb(0 0 0 / .35);
  clip-path: polygon(0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px));
  transition: transform .08s steps(2);
}
.a-btn:hover { transform: translateY(-2px); }
.a-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #B8901A; }
.a-btn--pink { background: var(--a-pink); color: #fff; box-shadow: 0 4px 0 #A3155A; }
.a-btn--ghost { background: transparent; color: var(--a-cyan); box-shadow: inset 0 0 0 3px var(--a-cyan); clip-path: none; }
.a-btn:focus-visible { outline: 3px solid var(--a-cyan); outline-offset: 4px; }

/* ---------- home: games-sectie ---------- */
.games-section { padding-block: clamp(80px, 10vw, 140px) clamp(90px, 11vw, 160px); }
.games-head { display: grid; gap: 18px; justify-items: start; margin-bottom: clamp(36px, 5vw, 60px); position: relative; z-index: 2; }
.games-head .coin { font-family: var(--f-pixel); font-size: .75rem; color: var(--a-green); }
.games-foot { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; margin-top: clamp(36px, 5vw, 56px); position: relative; z-index: 2; }
.commission { display: grid; gap: 8px; max-width: 60ch; }
.commission .px-sub { color: var(--a-pink); }

/* ---------- game-kaarten ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 26px; position: relative; z-index: 2; }
.game-card {
  --glow: var(--a-cyan);
  position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--a-bg-2); text-decoration: none; color: inherit;
  box-shadow: 0 0 0 3px var(--a-bg-3), 0 0 0 6px var(--glow), 0 0 28px 4px rgb(34 228 255 / .25);
  transition: transform .15s steps(3), box-shadow .2s ease;
}
.game-card:nth-child(3n+2) { --glow: var(--a-pink); }
.game-card:nth-child(3n+3) { --glow: var(--a-yellow); }
.game-card:hover, .game-card:focus-visible { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--a-bg-3), 0 0 0 6px var(--glow), 0 0 44px 10px color-mix(in srgb, var(--glow) 45%, transparent); outline: none; }
.game-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; filter: saturate(1.15) contrast(1.05); transition: transform .4s ease; }
.game-cover::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .25) 0 1px, transparent 1px 3px); }
.game-card:hover .game-cover img { transform: scale(1.04); }
.game-cover .badge { position: absolute; z-index: 2; left: 10px; top: 10px; font-family: var(--f-pixel); font-size: .55rem; padding: .7em .8em; background: var(--a-bg); color: var(--glow); box-shadow: 0 0 0 2px var(--glow); }
.game-info { padding: 18px 18px 20px; display: grid; gap: 10px; align-content: start; }
.game-info h3 { font-family: var(--f-pixel); font-weight: 400; font-size: .92rem; line-height: 1.45; color: var(--a-text); letter-spacing: 0; }
.game-info p { font-size: 1.25rem; line-height: 1.2; color: var(--a-dim); }
.game-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; font-family: var(--f-pixel); font-size: .58rem; color: var(--a-dim); }
.game-meta .play { color: var(--glow); }
.game-card:hover .game-meta .play { animation: blink .6s steps(1) infinite; }
.game-empty { font-family: var(--f-pixel); font-size: .8rem; color: var(--a-dim); padding: 40px 0; line-height: 1.8; }

/* ---------- games.html ---------- */
.arcade-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.a-header { position: relative; z-index: 20; }
.a-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.a-header img { height: 50px; width: auto; }
.a-header nav { display: flex; gap: 10px; flex-wrap: wrap; }
.a-header nav a { font-family: var(--f-pixel); font-size: .6rem; color: var(--a-cyan); text-decoration: none; padding: .9em 1em; box-shadow: inset 0 0 0 2px rgb(34 228 255 / .4); }
.a-header nav a:hover { box-shadow: inset 0 0 0 2px var(--a-cyan); }
.marquee { text-align: center; display: grid; justify-items: center; gap: 18px; padding-block: clamp(30px, 6vw, 70px) clamp(30px, 5vw, 56px); position: relative; z-index: 2; }
.marquee p { margin-inline: auto; text-align: center; }
.hud { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--f-pixel); font-size: .62rem; color: var(--a-pink); max-width: 760px; width: 100%; }
.hud b { color: var(--a-text); font-weight: 400; }
.hiscore { margin: clamp(50px, 7vw, 90px) auto 0; max-width: 620px; position: relative; z-index: 2; display: grid; gap: 14px; }
.hiscore h2 { font-family: var(--f-pixel); font-weight: 400; font-size: .9rem; color: var(--a-pink); text-align: center; letter-spacing: .1em; }
.hiscore ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-family: var(--f-pixel); font-size: .66rem; }
.hiscore li { display: grid; grid-template-columns: 4ch 1fr auto; gap: 14px; color: var(--a-text); align-items: baseline; }
.hiscore li span:first-child { color: var(--a-yellow); }
.hiscore li span:last-child { color: var(--a-cyan); }
.hiscore li:nth-child(odd) span:nth-child(2) { color: var(--a-green); }
.a-footer { position: relative; z-index: 20; font-family: var(--f-pixel); font-size: .55rem; color: var(--a-dim); }
.a-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.a-footer a { color: var(--a-cyan); }

/* ---------- play.html: de kast ---------- */
.cabinet { position: relative; z-index: 2; width: min(100%, 1100px); margin: 10px auto 0; display: grid; gap: 0; }
.cab-marquee {
  background: linear-gradient(180deg, #2A1F66, #160F3D); padding: 18px 20px; text-align: center; border-radius: 14px 14px 0 0;
  box-shadow: inset 0 0 0 3px var(--a-pink), inset 0 0 40px rgb(255 46 136 / .35);
}
.cab-marquee h1 { font-family: var(--f-pixel); font-weight: 400; font-size: clamp(.9rem, .6rem + 1.6vw, 1.7rem); color: var(--a-yellow); text-shadow: 2px 2px 0 var(--a-pink), 0 0 20px rgb(255 210 63 / .5); line-height: 1.4; letter-spacing: 0; }
.cab-bezel { background: #07060F; padding: clamp(10px, 2vw, 26px); box-shadow: inset 0 0 0 3px #2A2550; }
.cab-screen { position: relative; aspect-ratio: 16 / 10; background: #000; overflow: hidden; border-radius: 10px; box-shadow: inset 0 0 60px rgb(34 228 255 / .12), 0 0 0 2px #1A1740; }
.cab-screen canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; outline: none; background: #000; }
.cab-overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; align-content: center; gap: 22px; text-align: center; padding: 20px; background: radial-gradient(circle at 50% 50%, rgb(23 20 58 / .55), rgb(7 6 15 / .92)); }
.cab-overlay[hidden] { display: none; }
.cab-overlay .cover-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; filter: blur(2px) brightness(.45) saturate(1.2); }
.cab-overlay p { color: var(--a-text); font-size: 1.4rem; margin-inline: auto; }
.cab-overlay .err { color: var(--a-pink); }
.load-bar { width: min(420px, 80%); height: 26px; box-shadow: 0 0 0 3px var(--a-cyan); padding: 4px; display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; }
.load-bar i { background: transparent; }
.load-bar i.on { background: var(--a-cyan); box-shadow: 0 0 8px var(--a-cyan); }
.cab-deck {
  background: linear-gradient(180deg, #221B57, #120E33); padding: 20px clamp(16px, 3vw, 34px) 26px; border-radius: 0 0 22px 22px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; box-shadow: inset 0 3px 0 #3A3290;
}
@media (max-width: 760px) { .cab-deck { grid-template-columns: 1fr; } .stick { display: none; } }
.stick { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 50% 55%, #0A0820 40%, #2C2670 42%); position: relative; }
.stick::before { content: ""; position: absolute; left: 50%; top: -18px; width: 10px; height: 52px; background: #CFCBE8; transform: translateX(-50%); border-radius: 5px; }
.stick::after { content: ""; position: absolute; left: 50%; top: -34px; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF7DB3, var(--a-pink) 55%, #A3155A); transform: translateX(-50%); }
.controls { display: grid; gap: 8px; min-width: 0; }
.controls .px-sub { color: var(--a-pink); }
.controls p { color: var(--a-text); font-size: 1.3rem; max-width: none; }
.deck-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.game-about { position: relative; z-index: 2; width: min(100%, 1100px); margin: 34px auto 0; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
@media (max-width: 700px) { .game-about { grid-template-columns: 1fr; } }
.game-about p { color: var(--a-dim); font-size: 1.4rem; }
.mobile-note { font-family: var(--f-pixel); font-size: .6rem; color: var(--a-yellow); line-height: 1.8; }

@media (prefers-reduced-motion: reduce) {
  .arcade .floor, .blink { animation: none !important; }
}
.arcade.is-off .floor { animation-play-state: paused; }
