/* ---------------------------------------------------------------------
   hansenrocks.com — retro-platformer theme
   Original artwork only: speed lines, rings, checkered horizons, chili
   dogs. Nothing here reproduces Sega's actual character designs or logos.
--------------------------------------------------------------------- */

:root {
    --bg: #0b1a3a;
    --bg2: #0f2358;
    --panel: #102a63;
    --panel-border: #ffd84d;
    --blue: #2f7ef0;
    --blue-light: #62a8ff;
    --gold: #ffd84d;
    --gold-dark: #e0a800;
    --red: #ff5a5a;
    --green: #3ddc84;
    --ink: #0b1a3a;
    --paper: #fef9ec;
    --text: #eef3ff;
    --muted: #b7c6ef;
    --radius: 14px;
    --shadow: 0 10px 0 rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    overflow-x: hidden;
}

body {
    background-image:
        radial-gradient(circle at 10% 15%, rgba(98,168,255,0.12), transparent 40%),
        radial-gradient(circle at 85% 70%, rgba(255,216,77,0.08), transparent 45%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
    min-height: 100vh;
    position: relative;
}

h1, h2, h3, .pixel {
    font-family: 'Press Start 2P', monospace;
    letter-spacing: 0.5px;
    line-height: 1.5;
}

a { color: var(--gold); }

.speed-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
    background: repeating-linear-gradient(
        100deg,
        transparent 0 60px,
        rgba(255,255,255,0.06) 60px 64px
    );
    animation: slide 6s linear infinite;
}
@keyframes slide {
    from { background-position: 0 0; }
    to { background-position: -400px 0; }
}

.wrap {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

/* ---- Rings ------------------------------------------------------- */
.ring {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 6px solid var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--gold-dark) inset;
    vertical-align: middle;
}
.ring-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 18px 0;
}
.ring-row .ring { animation: spin 3s linear infinite; }
.ring-row .ring:nth-child(2) { animation-delay: 0.2s; }
.ring-row .ring:nth-child(3) { animation-delay: 0.4s; }
.ring-row .ring:nth-child(4) { animation-delay: 0.6s; }
.ring-row .ring:nth-child(5) { animation-delay: 0.8s; }
@keyframes spin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); }
}

/* ---- Hero ---------------------------------------------------------- */
.hero {
    text-align: center;
    padding: 40px 10px 20px;
}
.hero .title {
    font-size: clamp(28px, 6vw, 54px);
    color: var(--gold);
    text-shadow: 4px 4px 0 var(--blue), 8px 8px 0 rgba(0,0,0,0.35);
    margin: 0 0 10px;
}
.hero .subtitle {
    font-size: clamp(13px, 2.4vw, 18px);
    color: var(--blue-light);
    margin: 0 0 18px;
}

.hedgehog {
    width: 140px;
    height: 140px;
    margin: 10px auto 0;
    position: relative;
    animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}
.hedgehog-body {
    width: 100px;
    height: 90px;
    background: var(--blue);
    border-radius: 60% 60% 55% 55%;
    position: absolute;
    left: 20px;
    top: 35px;
    box-shadow: inset -10px -10px 0 rgba(0,0,0,0.15);
}
.hedgehog-spike {
    position: absolute;
    width: 46px;
    height: 20px;
    background: var(--blue);
    border-radius: 0 50% 50% 0;
    top: 24px;
}
.hedgehog-spike.s1 { left: 10px; transform: rotate(-25deg); }
.hedgehog-spike.s2 { left: 28px; top: 14px; transform: rotate(-10deg); }
.hedgehog-spike.s3 { left: 48px; top: 10px; transform: rotate(5deg); }
.hedgehog-face {
    position: absolute;
    left: 86px;
    top: 50px;
    width: 46px;
    height: 42px;
    background: #ffe3c2;
    border-radius: 50%;
}
.hedgehog-eye {
    position: absolute;
    left: 100px;
    top: 48px;
    width: 10px;
    height: 12px;
    background: var(--ink);
    border-radius: 50%;
}
.hedgehog-shoe {
    position: absolute;
    bottom: 6px;
    left: 34px;
    width: 34px;
    height: 16px;
    background: var(--red);
    border-radius: 8px;
}

/* ---- Buttons --------------------------------------------------------- */
.btn {
    display: inline-block;
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    text-decoration: none;
    color: var(--ink);
    background: var(--gold);
    padding: 16px 26px;
    border-radius: 10px;
    border: 4px solid var(--gold-dark);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.08s ease;
}
.btn:hover { transform: translateY(2px); }
.btn:active { transform: translateY(6px); box-shadow: none; }
.btn-blue {
    background: var(--blue-light);
    border-color: var(--blue);
    color: #042049;
}
.btn-blink { animation: blink 1.4s steps(2) infinite; }

/* Arrow/flag glyphs (▶ 🏁 ⬇) aren't part of the "Press Start 2P" pixel
   font, so the browser silently substitutes a different fallback font
   just for that character — one with different vertical metrics, which
   is why it visually sits a couple pixels off from the pixel-font text
   next to it. Nudging it back up here is simpler than finding a pixel
   font with full symbol coverage. */
.btn-icon {
    display: inline-block;
    position: relative;
    top: -3px;
}
@keyframes blink { 50% { opacity: 0.55; } }

.cta-box {
    text-align: center;
    margin: 36px auto;
    padding: 26px 18px;
    background: var(--panel);
    border: 4px dashed var(--gold);
    border-radius: var(--radius);
    max-width: 520px;
}
.cta-box p { font-size: 17px; margin: 0 0 16px; }

/* ---- Panels / cards ---------------------------------------------- */
.panel {
    background: var(--panel);
    border: 4px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 24px 24px 28px;
    margin: 22px 0;
    box-shadow: var(--shadow);
}
.panel h2 {
    color: var(--gold);
    font-size: 18px;
    margin-top: 0;
}
.panel p, .panel li { color: var(--text); line-height: 1.6; }

.checker {
    height: 14px;
    background: repeating-linear-gradient(
        90deg, var(--gold) 0 18px, var(--ink) 18px 36px
    );
    border-radius: 6px;
    margin: 6px 0 28px;
}

/* ---- Bio / about ---------------------------------------------------- */
.bio {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.bio-badge {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    border: 4px solid var(--gold);
}
.bio-text { flex: 1; min-width: 220px; }
.bio-text ul { padding-left: 20px; margin: 10px 0 0; }

/* ---- Party details ---------------------------------------------------- */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 10px 0 0;
}
@media (max-width: 560px) {
    .details-grid { grid-template-columns: 1fr; }
}
.detail {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,216,77,0.4);
    border-radius: 10px;
    padding: 14px 16px;
}
.detail .label {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: var(--gold);
    display: block;
    margin-bottom: 6px;
}
.detail .value { font-size: 15px; }
.detail a { color: var(--blue-light); }

/* ---- Form ------------------------------------------------------------ */
.form-grid { display: grid; gap: 16px; }
label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--gold);
    font-size: 14px;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 3px solid var(--blue);
    background: var(--paper);
    color: var(--ink);
    font-size: 15px;
    font-family: inherit;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, textarea:focus { outline: 3px solid var(--gold); }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,216,77,0.1);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 14px 16px;
}
.checkbox-row input {
    width: 24px;
    height: 24px;
    accent-color: var(--gold);
}
.checkbox-row label { margin: 0; color: var(--text); font-weight: 600; }

.captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.captcha-question {
    font-family: 'Press Start 2P', monospace;
    background: var(--ink);
    color: var(--gold);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 15px;
}
.captcha-row input { max-width: 100px; }

.hp-field { position: absolute; left: -9999px; top: -9999px; }

.error-box {
    background: rgba(255,90,90,0.15);
    border: 3px solid var(--red);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
    color: #ffd6d6;
}

/* ---- Success / thank-you ---------------------------------------------- */
.success-box {
    text-align: center;
    padding: 10px;
}
.success-box .big-ok {
    font-size: 42px;
}
.bonus-levels {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
@media (min-width: 560px) {
    .bonus-levels { grid-template-columns: 1fr 1fr; }
}
.bonus-card {
    background: rgba(98,168,255,0.1);
    border: 3px solid var(--blue-light);
    border-radius: 12px;
    padding: 18px;
    text-align: left;
}
.bonus-card h3 { margin: 0 0 8px; font-size: 13px; color: var(--blue-light); }
.bonus-card p { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

/* ---- QR section ---------------------------------------------------- */
.qr-wrap {
    text-align: center;
}
#qrcode {
    display: inline-block;
    background: #fff;
    padding: 14px;
    border-radius: 12px;
    border: 4px solid var(--gold);
}

/* ---- Footer ---------------------------------------------------------- */
footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin-top: 40px;
    padding: 0 16px;
}

.back-link { display: block; text-align: center; margin-top: 10px; }

/* ---- "Level Up!" submission flourish ---------------------------------- */
.levelup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.5s ease;
}
.levelup-overlay--out { opacity: 0; pointer-events: none; }

.levelup-backdrop {
    position: absolute;
    inset: 0;
    background-color: #060a1c;
    background-size: cover;
    background-position: center;
    filter: blur(2px) brightness(0.45) saturate(1.3);
    transform: scale(1.1);
}

.levelup-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 24px;
    max-width: 420px;
    animation: levelup-pop 0.6s cubic-bezier(.2,1.4,.4,1);
}

.levelup-cover {
    width: 150px;
    height: auto;
    border-radius: 14px;
    border: 4px solid var(--gold);
    box-shadow: 0 0 40px rgba(255,216,77,0.5);
    margin-bottom: 18px;
}

.levelup-text {
    font-size: clamp(26px, 7vw, 44px);
    margin: 0 0 14px;
    color: var(--gold);
    animation: levelup-flash 1s ease-in-out infinite;
}

.levelup-sub {
    font-size: 14px;
    color: var(--text);
    margin: 0 0 22px;
}

.levelup-play-btn {
    font-size: 13px;
    padding: 14px 22px;
    display: block;
    margin: 0 auto 14px;
    animation: levelup-pulse 1.5s ease-in-out infinite;
}
@keyframes levelup-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.045); }
}
.levelup-skip-link {
    background: none;
    border: none;
    color: var(--muted);
    text-decoration: underline;
    font-size: 12px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    padding: 6px;
}
.levelup-skip-link:hover { color: var(--gold); }

@keyframes levelup-pop {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes levelup-flash {
    0%, 100% {
        text-shadow: 0 0 16px rgba(255,216,77,0.9), 0 0 34px rgba(255,90,90,0.6), 4px 4px 0 var(--blue);
    }
    50% {
        text-shadow: 0 0 26px rgba(98,168,255,0.9), 0 0 50px rgba(255,216,77,0.7), 4px 4px 0 var(--red);
    }
}
@media (prefers-reduced-motion: reduce) {
    .levelup-content { animation: none; }
    .levelup-text { animation: none; }
    .levelup-play-btn { animation: none; }
}

.levelup-miniplayer {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel);
    border: 3px solid var(--gold);
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: var(--shadow);
    max-width: calc(100vw - 32px);
}
/* Specificity tie with the browser's default [hidden] rule means our own
   `display: flex` above wins unless we out-specify it here explicitly. */
.levelup-miniplayer[hidden] {
    display: none !important;
}
.levelup-mini-cover {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.levelup-mini-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.levelup-mini-title {
    font-size: 10px;
    font-family: 'Press Start 2P', monospace;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.levelup-mini-sub { font-size: 11px; color: var(--muted); }
.levelup-mini-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    flex-shrink: 0;
}
.levelup-mini-btn:hover { color: var(--gold); }
