/* Shared look for Lucius's Arcade pages */
:root {
  --bg: #12131a;
  --panel: #1c1e29;
  --panel-light: #262838;
  --text: #f4f4f8;
  --muted: #9a9cb0;
  --accent: #ffcc4d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(199, 125, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 900px 500px at 90% 0%, rgba(56, 244, 255, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

header.arcade-header, div.arcade-header {
  display: flex;
  flex-wrap: wrap;
  row-gap: 8px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(28, 30, 41, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.arcade-header a.back-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: text-shadow 0.15s;
}

header.arcade-header a.back-link:hover {
  text-decoration: underline;
  text-shadow: 0 0 10px var(--accent);
}

header.arcade-header h1, div.arcade-header h1 {
  font-size: 1.1rem;
  margin: 0;
  text-shadow: 0 0 16px rgba(255, 204, 77, 0.35);
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 100%, white 15%), var(--accent));
  color: #1a1a1a;
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 4px 16px color-mix(in srgb, var(--accent) 55%, transparent);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), 0 6px 20px color-mix(in srgb, var(--accent) 65%, transparent);
}

.btn:active {
  transform: scale(0.97) translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 2px 8px color-mix(in srgb, var(--accent) 55%, transparent);
}

.btn.secondary {
  background: var(--panel-light);
  color: var(--text);
  border: 2px solid var(--muted);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.btn.secondary:hover {
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), 0 0 14px rgba(255, 255, 255, 0.08);
}

/* ---- fresh look ---- */
html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: #1a1a1a; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-light); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* a gentle shimmer along the bottom of the header */
header.arcade-header, div.arcade-header { position: sticky; top: 0; z-index: 10; }
header.arcade-header::after, div.arcade-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  background-size: 220px 100%; background-repeat: no-repeat; animation: tvShimmer 4s linear infinite;
}
@keyframes tvShimmer { from { background-position: -220px 0; } to { background-position: calc(100% + 220px) 0; } }

/* game screens pop out of the page */
canvas { box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.07); }

/* start and finish screens pop in */
#ov, #ovl, .modal { animation: tvFade 0.2s ease-out; }
#ov .box, #ovb, #ovl .mb, .modal .mb { animation: tvPop 0.28s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tvFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tvPop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* buttons feel bouncy everywhere */
button { transition: transform 0.1s ease, filter 0.1s ease; }
button:not(:disabled):hover { filter: brightness(1.1); }
button:not(:disabled):active { transform: scale(0.96); }
@media (prefers-reduced-motion: reduce) {
  header.arcade-header::after, div.arcade-header::after, #ov, #ovl, .modal, #ov .box, #ovb, #ovl .mb, .modal .mb { animation: none; }
}
