/* BoredKid.com - the shared look of a game page (fonts, colours, back button, title, play area, the
 * "About this game" box and the footer). New games link this instead of copying CSS into the page.
 * A game sets its own two colours on <body>:  style="--bk-accent: var(--green); --bk-accent2: var(--cyan)"
 * and puts only its own game CSS in the page. */
@font-face { font-family: 'Boogaloo'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/boogaloo-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/nunito.woff2') format('woff2'); }
:root {
  --bg: #0f0e17; --surface: #1a1828; --surface2: #232136;
  --yellow: #f9c846; --pink: #ff6b9d; --cyan: #00d4ff; --green: #3ddc84; --orange: #ff8c42; --purple: #a855f7;
  --teal: #19e3c4; --coral: #ff7a59; --amber: #ffb454; --rose: #ff6b8b;
  --text: #fffffe; --muted: #a7a9be; --radius: 20px;
  --bk-accent: var(--yellow); --bk-accent2: var(--pink);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Nunito', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
.wrap { max-width: 1680px; margin: 0 auto; padding: 12px 16px 0; }
.back-home {
  display: inline-flex; align-items: center; gap: 6px; font-family: 'Boogaloo', cursive; font-size: 15px; letter-spacing: 0.5px;
  color: var(--muted); padding: 8px 18px; margin-bottom: 12px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.12);
  background: var(--surface); text-decoration: none; transition: color .18s, border-color .18s;
}
.back-home:hover { color: var(--text); border-color: rgba(255,255,255,0.35); }
.game-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.game-title {
  font-family: 'Boogaloo', cursive; font-weight: 400; font-size: 30px;
  background: linear-gradient(135deg, var(--bk-accent), var(--bk-accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.game-title-sub { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0.5px; }

/* the play area: the game draws into a <canvas> (or anything) inside it */
.stage {
  position: relative; width: 100%; height: min(80vh, 940px); min-height: 460px; border-radius: var(--radius); overflow: hidden;
  background: #0a0f18; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.stage > canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10,9,18,0.72); z-index: 20; padding: 20px; }
.overlay[hidden] { display: none; }
.panel { background: var(--surface); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 26px 28px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.panel h2 { font-family: 'Boogaloo', cursive; font-weight: 400; font-size: 34px; color: var(--bk-accent); margin-bottom: 6px; }
.panel p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.btn {
  display: inline-block; font-family: 'Boogaloo', cursive; font-size: 20px; letter-spacing: 0.5px; padding: 10px 30px; border: 0; border-radius: 50px; cursor: pointer;
  color: #0f0e17; background: linear-gradient(135deg, var(--bk-accent), var(--bk-accent2)); transition: transform .12s;
}
.btn:active { transform: scale(0.97); }
.hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; pointer-events: none; z-index: 10; font-family: 'Boogaloo', cursive; font-size: 22px; text-shadow: 0 2px 6px rgba(0,0,0,0.6); }

/* "About this game" and the footer */
.game-info { width: 100%; max-width: 900px; margin: 26px auto 0; padding: 24px 26px; background: var(--surface); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,0.3); text-align: left; position: relative; z-index: 10; }
.game-info h2 { font-family: 'Boogaloo', cursive; font-weight: 400; font-size: 24px; line-height: 1.25; color: var(--bk-accent); margin: 24px 0 8px; }
.game-info h2:first-child { margin-top: 0; }
.game-info p, .game-info li { font-family: 'Nunito', sans-serif; font-size: 15px; line-height: 1.7; color: #dcdce8; }
.game-info p { margin: 0 0 10px; }
.game-info ul { padding-left: 20px; margin: 0 0 6px; }
.game-info li { margin: 6px 0; }
.game-info strong { color: var(--text); }
.site-footer { width: 100%; max-width: 820px; margin: 34px auto 8px; padding: 20px 14px 14px; border-top: 1px solid rgba(255,255,255,0.08); text-align: center; position: relative; z-index: 10; }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.site-footer-links a { font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0.3px; color: var(--yellow); text-decoration: none; padding: 6px 12px; }
.site-footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer-links span { color: var(--muted); }
.site-footer-copy { margin-top: 8px; font-family: 'Nunito', sans-serif; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 760px) { .stage { height: min(72vh, 640px); min-height: 380px; } }
@media (max-width: 460px) { .game-info { padding: 16px 16px; border-radius: 16px; } .wrap { padding: 8px 8px 0; } }
