/* JACK GAMES — Y2K / late-90s-early-2000s hub styles (mobile-first) */

:root {
  --bg: #0a0018;
  --bg2: #120028;
  --pink: #ff2bd6;
  --hotpink: #ff69b4;
  --cyan: #00f0ff;
  --lime: #b8ff00;
  --gold: #ffd84d;
  --chrome1: #f5f7ff;
  --chrome2: #9aa3b5;
  --chrome3: #4a5160;
  --card: #160033;
  --text: #f4f0ff;
  --muted: #c9b8e8;
  --bevel-light: #ffffff;
  --bevel-dark: #2a0a4a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Orbitron", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at top, #1a0540 0%, var(--bg) 55%, #000 100%);
  overflow-x: hidden;
  line-height: 1.45;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
button, .play-btn { font: inherit; }

/* Starfield */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 70%, #cff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 75% 55%, #fdf 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 15%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 15% 85%, #afa 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 10%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 90%, #faf 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 40%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 22% 45%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 5% 50%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 95% 75%, #cff 50%, transparent 51%);
  background-size: 100% 100%;
  animation: twinkle 4s ease-in-out infinite alternate;
  opacity: 0.85;
}

.sparkles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 43, 214, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

@keyframes twinkle {
  from { opacity: 0.55; filter: brightness(0.9); }
  to { opacity: 1; filter: brightness(1.2); }
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0 12px calc(28px + var(--safe-bottom));
}

/* Top chrome + ticker */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -12px 10px;
  padding: 0 0 6px;
  background: linear-gradient(180deg, rgba(10, 0, 24, 0.96), rgba(10, 0, 24, 0.85) 80%, transparent);
  backdrop-filter: blur(6px);
}

.chrome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  background: linear-gradient(180deg, #eef2ff 0%, #aeb6c8 45%, #6b7388 55%, #c9d0e0 100%);
  color: #1a1030;
  border-bottom: 3px solid #2a2040;
  text-shadow: 0 1px 0 #fff;
  box-shadow: inset 0 2px 0 #fff, inset 0 -2px 0 #5a6278;
}

.chrome-text {
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neon-pink { color: var(--pink); text-shadow: 0 0 6px var(--pink), 0 1px 0 #fff; }
.neon-cyan { color: #0090a8; text-shadow: 0 0 6px var(--cyan), 0 1px 0 #fff; }

.blink {
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.ticker-wrap {
  overflow: hidden;
  background: #000;
  border-top: 2px solid var(--pink);
  border-bottom: 2px solid var(--cyan);
  padding: 6px 0;
}

.ticker {
  display: flex;
  width: max-content;
  gap: 2rem;
  animation: marquee 28s linear infinite;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--lime);
  text-shadow: 0 0 6px #6f0;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Hero */
.hero { margin-top: 8px; }

.construction-tape {
  display: flex;
  gap: 1.5rem;
  overflow: hidden;
  margin: 0 -12px 12px;
  padding: 6px 0;
  background: repeating-linear-gradient(
    -45deg,
    #ffd84d,
    #ffd84d 12px,
    #111 12px,
    #111 24px
  );
  color: #111;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #000;
}
.construction-tape span {
  background: #111;
  color: #ffd84d;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.banner-wrap {
  margin: 0 auto 14px;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #8a93a8 40%, #3a4050 55%, #dfe5f5);
  box-shadow:
    0 0 0 3px #1a1030,
    0 0 24px rgba(255, 43, 214, 0.45),
    0 0 40px rgba(0, 240, 255, 0.25),
    inset 0 2px 0 #fff;
}

.hero-banner {
  width: 100%;
  border-radius: 12px;
  border: 2px solid #120028;
  background: #000;
}

.logo-plate {
  text-align: center;
  padding: 16px 14px 18px;
  border: 4px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #22004a, #100024) padding-box,
    linear-gradient(135deg, var(--cyan), var(--pink), var(--lime), var(--cyan)) border-box;
  box-shadow:
    0 0 0 3px #000,
    inset 0 0 30px rgba(0, 240, 255, 0.12),
    0 10px 30px rgba(0, 0, 0, 0.55);
}

.eyebrow {
  margin: 0 0 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(255, 216, 77, 0.7);
}

.logo {
  margin: 0;
  line-height: 0.95;
  font-family: "Audiowide", "Orbitron", sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.logo-line {
  display: block;
  font-size: clamp(2.4rem, 14vw, 3.6rem);
  background: linear-gradient(180deg, #fff 0%, #cfd6e8 35%, #7a849a 55%, #eef2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #2a2040) drop-shadow(0 0 12px rgba(0, 240, 255, 0.55));
}

.logo-games {
  font-size: clamp(2.1rem, 12vw, 3.2rem);
  background: linear-gradient(180deg, #e6ff7a 0%, var(--lime) 40%, #6a0 70%, #d4ff66 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(255, 43, 214, 0.75)) drop-shadow(0 3px 0 #3a0055);
}

.tagline {
  margin: 12px 0 8px;
  font-size: 0.92rem;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.intro {
  margin: 0 auto 14px;
  max-width: 36rem;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.98rem;
  color: var(--muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.sticker {
  display: inline-block;
  padding: 6px 10px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000, 0 0 10px rgba(255, 255, 255, 0.25);
  transform: rotate(-2deg);
  color: #111;
}
.sticker.pink { background: var(--hotpink); transform: rotate(-3deg); }
.sticker.cyan { background: var(--cyan); transform: rotate(2deg); }
.sticker.lime { background: var(--lime); transform: rotate(-1deg); }
.sticker.gold { background: var(--gold); transform: rotate(3deg); }

/* Game shelf */
.games { margin-top: 22px; }

.section-head {
  text-align: center;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(12px, 3.6vw, 16px);
  color: var(--pink);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.7), 2px 2px 0 #000;
}
.section-sub {
  margin: 8px 0 0;
  font-family: system-ui, sans-serif;
  color: var(--muted);
  font-size: 0.9rem;
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.game-card {
  position: relative;
}

.card-chrome {
  border-radius: 14px;
  padding: 8px;
  background: linear-gradient(160deg, #f7f9ff, #9aa3b8 42%, #4a5164 55%, #d5dbea);
  box-shadow: 0 8px 0 #1a1030, 0 12px 28px rgba(0, 0, 0, 0.45);
}

.card-art {
  position: relative;
  height: 140px;
  border-radius: 10px 10px 0 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #120028;
}

.card-motif {
  font-size: 3.4rem;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
  z-index: 1;
}

.card-glare {
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  animation: glare 5s linear infinite;
}
@keyframes glare {
  from { transform: translateX(-30%); }
  to { transform: translateX(30%); }
}

.dirge-art {
  background:
    radial-gradient(circle at 30% 20%, rgba(180, 80, 255, 0.45), transparent 45%),
    linear-gradient(160deg, #1a0a22, #3a1048 40%, #0a0610 100%);
}

.soon-art.a {
  background: repeating-linear-gradient(45deg, #221048, #221048 10px, #180838 10px, #180838 20px);
}
.soon-art.b {
  background: radial-gradient(circle at 70% 30%, rgba(0, 240, 255, 0.35), transparent 40%), #140830;
}
.soon-art.c {
  background: radial-gradient(circle at 40% 60%, rgba(184, 255, 0, 0.25), transparent 45%), #1a0838;
}

.new-sticker {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  background: var(--gold);
  color: #111;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000;
  transform: rotate(8deg);
}
.lime-sticker { background: var(--lime); }
.pink-sticker { background: var(--hotpink); color: #fff; }

.card-body {
  background: linear-gradient(180deg, #1c0840, #100224);
  border: 2px solid #120028;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 14px 12px 16px;
}

.card-body h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.card-blurb {
  margin: 0 0 10px;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.92rem;
  color: var(--muted);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.card-meta li {
  font-family: "Press Start 2P", monospace;
  font-size: 7px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #0a0018;
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--cyan);
}

.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  text-decoration: none;
  text-align: center;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  color: #111;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, var(--lime) 38%, #6a0 55%, #d4ff66 100%);
  box-shadow:
    inset 0 2px 0 #fff,
    inset 0 -3px 0 #4a8000,
    0 4px 0 #2a4010,
    0 0 18px rgba(184, 255, 0, 0.35);
  transition: transform 0.08s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.play-btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 #fff, 0 1px 0 #2a4010; }
.play-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

a.play-btn {
  background: linear-gradient(180deg, #fff6ff 0%, var(--hotpink) 35%, #c01890 55%, #ff9ad8 100%);
  color: #fff;
  text-shadow: 0 1px 0 #6a0048;
  box-shadow:
    inset 0 2px 0 #fff,
    inset 0 -3px 0 #8a1060,
    0 4px 0 #4a0830,
    0 0 18px rgba(255, 43, 214, 0.45);
}

.play-btn.disabled,
.play-btn:disabled {
  background: linear-gradient(180deg, #bbb, #666 45%, #444 55%, #888);
  color: #ddd;
  text-shadow: none;
  box-shadow: inset 0 2px 0 #ddd, 0 3px 0 #222;
  cursor: not-allowed;
  opacity: 0.85;
}

.now-playing,
.soon-badge {
  position: absolute;
  top: -8px;
  left: 12px;
  z-index: 3;
  padding: 6px 10px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000, 0 0 12px rgba(255, 43, 214, 0.55);
}

.now-playing {
  background: var(--pink);
  color: #fff;
}

.soon-badge {
  background: #222;
  color: var(--gold);
  left: auto;
  right: 12px;
}

.featured .card-chrome {
  box-shadow:
    0 8px 0 #1a1030,
    0 0 0 2px var(--pink),
    0 0 28px rgba(255, 43, 214, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.45);
}

/* Guestbook / counter */
.guestbook-lite {
  margin-top: 26px;
  display: grid;
  gap: 12px;
}

.counter-box {
  text-align: center;
  padding: 16px 12px;
  border-radius: 12px;
  background: #000;
  border: 3px outset #888;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.counter-label {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: var(--cyan);
}

.counter-num {
  margin: 10px 0 6px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(18px, 6vw, 28px);
  color: #0f0;
  text-shadow: 0 0 10px #0f0;
  letter-spacing: 0.12em;
}

.counter-note {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  color: #8a7aa8;
}

.webring {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2a1050, #120028);
  border: 2px solid var(--cyan);
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--muted);
}
.webring-mid { color: var(--gold); text-align: center; }
.webring-btn { color: var(--pink); }

/* Footer */
.footer {
  margin-top: 28px;
  text-align: center;
}

.footer-chrome {
  padding: 18px 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #1a0840, #0a0018);
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 0 3px #000,
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 0 24px rgba(255, 105, 180, 0.25);
  outline: 3px solid;
  outline-color: transparent;
  border-image: linear-gradient(135deg, var(--chrome1), var(--chrome2), var(--chrome3), var(--chrome1)) 1;
  border-style: solid;
}

.footer-brand {
  margin: 0 0 6px;
  font-family: "Audiowide", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #fff, #9aa3b5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-chrome p {
  margin: 0.35rem 0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-love {
  font-weight: 700;
  color: #ff69b4;
  text-shadow: 0 0 8px #ff69b4, 1px 1px 0 #fff;
  margin: 0.35rem 0 0.5rem;
  font-size: 1.05rem !important;
  font-family: "Orbitron", system-ui, sans-serif !important;
  letter-spacing: 0.03em;
}

.footer-links a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-y2k {
  font-family: "Press Start 2P", monospace !important;
  font-size: 7px !important;
  color: var(--lime) !important;
  line-height: 1.6;
  margin-top: 10px !important;
}

.footer-year {
  font-size: 0.85rem !important;
  color: #9a88b8 !important;
}

/* Wider phones / small tablets */
@media (min-width: 560px) {
  .game-grid {
    grid-template-columns: 1fr 1fr;
  }
  .featured {
    grid-column: 1 / -1;
  }
  .featured .card-chrome {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr;
    gap: 0;
  }
  .featured .card-art {
    height: 100%;
    min-height: 200px;
    border-radius: 10px 0 0 10px;
  }
  .featured .card-body {
    border: 2px solid #120028;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .page { padding-left: 16px; padding-right: 16px; }
  .topbar { margin-left: -16px; margin-right: -16px; }
  .construction-tape { margin-left: -16px; margin-right: -16px; }
}

@media (prefers-reduced-motion: reduce) {
  .blink, .ticker, .starfield, .card-glare { animation: none !important; }
}
