/* Quiz 9: What's That Blob? — Live Radar Arcade */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&display=swap');

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root { --navy: #1e3a5f; --orange: #FF9800; --text: #ffffff; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #0a1f44 0%, #1a3a5c 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Screen Management */
.screen { display: none; animation: fadeIn 0.3s ease-in; }
.screen.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== LANDING PAGE ===== */

#landing.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.landing-badge {
    display: block;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #FF9800;
    margin-bottom: 10px;
    animation: fadeSlideUp 0.5s ease both;
}

/* AIS OFFLINE warning */
.ais-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ff4444;
    margin-bottom: 0.8rem;
    opacity: 0;
    animation: fadeSlideUp 0.5s ease forwards, aisFlash 2s ease-in-out 1s infinite;
}

.ais-warning-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
    box-shadow: 0 0 6px #ff4444;
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes aisFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 4px #ff4444; }
    50% { box-shadow: 0 0 14px #ff4444, 0 0 28px rgba(255,68,68,0.3); }
}

/* Landing Title */
.landing-title {
    text-align: center;
    font-size: 2.6rem;
    font-weight: 800;
    color: #00ff00;
    margin-bottom: 0.3rem;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 0 30px rgba(0,255,0,0.3), 0 0 80px rgba(0,255,0,0.1);
    opacity: 0;
    animation: fadeSlideUp 0.6s ease 0.1s forwards;
}

.landing-subtitle {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeSlideUp 0.6s ease 0.25s forwards;
}

/* ===== Radar Hero Display (landing) ===== */

.radar-hero {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 1.5rem;
    aspect-ratio: 1;
    opacity: 0;
    animation: fadeSlideUp 0.6s ease 0.4s forwards;
}

.radar-circle {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #0a1a0a 0%, #071207 40%, #040c04 100%);
    border: 2px solid rgba(0,200,0,0.25);
    box-shadow: 0 0 40px rgba(0,255,0,0.08), 0 0 80px rgba(0,255,0,0.04),
                inset 0 0 40px rgba(0,20,0,0.5);
    overflow: hidden;
    animation: radarGlow 4s ease-in-out infinite;
}

@keyframes radarGlow {
    0%, 100% { border-color: rgba(0,200,0,0.25); box-shadow: 0 0 40px rgba(0,255,0,0.08), 0 0 80px rgba(0,255,0,0.04), inset 0 0 40px rgba(0,20,0,0.5); }
    50% { border-color: rgba(0,200,0,0.45); box-shadow: 0 0 60px rgba(0,255,0,0.15), 0 0 100px rgba(0,255,0,0.06), inset 0 0 40px rgba(0,20,0,0.5); }
}

/* Range rings (landing hero) */
.radar-hero .radar-ring,
.radar-circle .radar-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0,200,0,0.1);
    border-radius: 50%;
}
.radar-hero .radar-ring.r1,
.radar-circle .radar-ring.r1 { width: 75%; height: 75%; }
.radar-hero .radar-ring.r2,
.radar-circle .radar-ring.r2 { width: 50%; height: 50%; }
.radar-hero .radar-ring.r3,
.radar-circle .radar-ring.r3 { width: 25%; height: 25%; }

/* Crosshairs (landing) */
.radar-crosshair-h {
    position: absolute; top: 50%; left: 0;
    width: 100%; height: 1px;
    background: rgba(0,200,0,0.07);
}
.radar-crosshair-v {
    position: absolute; top: 0; left: 50%;
    width: 1px; height: 100%;
    background: rgba(0,200,0,0.07);
}

/* Sweep line (landing hero) */
.radar-sweep-line {
    position: absolute; top: 50%; left: 50%;
    width: 50%; height: 2px;
    transform-origin: 0 0;
    background: linear-gradient(to right, rgba(0,255,0,0.6), rgba(0,255,0,0));
    animation: sweepRotate 3s linear infinite;
    z-index: 2;
}

/* Sweep afterglow trail (landing hero) */
.radar-circle::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: conic-gradient(from 0deg at 50% 50%,
        transparent 0deg, rgba(0,255,0,0.06) 15deg, rgba(0,255,0,0.03) 30deg, transparent 50deg);
    animation: sweepRotate 3s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes sweepRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Center dot (landing hero) */
.radar-circle .radar-center {
    position: absolute; top: 50%; left: 50%;
    width: 6px; height: 6px; margin: -3px;
    background: #0e0;
    border-radius: 50%;
    box-shadow: 0 0 6px #0e0, 0 0 14px rgba(0,238,0,0.3);
    z-index: 3;
}

/* Compass bearings (landing hero) */
.radar-bearing {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 0.5rem;
    font-weight: bold;
    color: rgba(0,200,0,0.3);
    z-index: 3;
}
.rb-n { top: 5%; left: 50%; transform: translateX(-50%); }
.rb-e { top: 50%; right: 5%; transform: translateY(-50%); }
.rb-s { bottom: 5%; left: 50%; transform: translateX(-50%); }
.rb-w { top: 50%; left: 5%; transform: translateY(-50%); }

/* Range label */
.radar-range {
    position: absolute; bottom: 10%; right: 10%;
    font-family: 'Courier New', monospace;
    font-size: 0.45rem;
    color: rgba(0,200,0,0.2);
    z-index: 3;
}

/* Landing hero targets */
.radar-target {
    position: absolute;
    width: 8px; height: 8px; margin: -4px;
    background: #0f0;
    border-radius: 50%;
    box-shadow: 0 0 6px #0f0, 0 0 14px rgba(0,255,0,0.25);
    opacity: 0;
    z-index: 3;
}

@keyframes targetPing {
    0% { opacity: 0; transform: scale(3); box-shadow: 0 0 20px rgba(0,255,0,0.5); }
    40% { opacity: 1; }
    100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px #0f0, 0 0 14px rgba(0,255,0,0.25); }
}

/* Landmass blob */
.rt-1 {
    left: 82%; top: 25%;
    width: 22px; height: 16px; margin: -8px -11px;
    border-radius: 40% 60% 50% 35%;
    background: rgba(0,255,0,0.35);
    box-shadow: 0 0 12px rgba(0,255,0,0.2);
}

/* Fishing vessel dot */
.rt-2 { left: 35%; top: 30%; }

/* Rain squall */
.rt-3 {
    left: 60%; top: 55%;
    width: 20px; height: 18px; margin: -9px -10px;
    border-radius: 45% 55% 50% 40%;
    background: rgba(0,200,0,0.2);
    box-shadow: 0 0 16px rgba(0,255,0,0.15), 0 0 30px rgba(0,255,0,0.06);
}

/* Container ship */
.rt-4 {
    left: 28%; top: 65%;
    width: 10px; height: 10px; margin: -5px;
    box-shadow: 0 0 8px #0f0, 0 0 18px rgba(0,255,0,0.35);
}

/* Sailboat — faint */
.rt-5 {
    left: 52%; top: 38%;
    width: 4px; height: 4px; margin: -2px;
    background: rgba(0,255,0,0.6);
    box-shadow: 0 0 4px rgba(0,255,0,0.3);
}

@keyframes blipGlow {
    0%, 100% { filter: brightness(1); }
    15% { filter: brightness(2.5); }
    50% { filter: brightness(1.2); }
}

@keyframes blipFlicker {
    0%, 100% { opacity: 1; }
    30% { opacity: 0.2; }
    35% { opacity: 0.8; }
    60% { opacity: 0.1; }
    65% { opacity: 0.7; }
    90% { opacity: 0.3; }
}

.rt-1 { animation: targetPing 0.5s ease 1.5s forwards, blipGlow 3s ease 2s infinite; }
.rt-2 { animation: targetPing 0.4s ease 2.1s forwards, blipGlow 3s ease 2.6s infinite; }
.rt-3 { animation: targetPing 0.5s ease 2.7s forwards, blipGlow 3s ease 3.2s infinite; }
.rt-4 { animation: targetPing 0.4s ease 3.3s forwards, blipGlow 3s ease 3.8s infinite; }
.rt-5 { animation: targetPing 0.4s ease 3.9s forwards, blipFlicker 2s ease 4.4s infinite; }

/* CRT scanlines */
.radar-scanlines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 4px
    );
    pointer-events: none;
    z-index: 4;
}

.radar-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 5;
}

/* Heading flash (landing hero) */
.radar-circle .radar-heading-flash {
    position: absolute;
    top: 0; left: 50%;
    width: 2px; height: 50%;
    margin-left: -1px;
    transform-origin: bottom center;
    background: linear-gradient(to top, transparent, rgba(0,255,0,0.4));
    opacity: 0;
    animation: headingFlash 3s ease infinite;
    z-index: 2;
}

@keyframes headingFlash {
    0% { opacity: 0.6; }
    5% { opacity: 0; }
    95% { opacity: 0; }
    100% { opacity: 0.6; }
}

/* Scenario text */
.scenario-text {
    text-align: center;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeSlideUp 0.6s ease 0.6s forwards;
}
.scenario-text p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.3rem;
    line-height: 1.5;
}
.scenario-highlight {
    font-size: 1.05rem;
    font-weight: 600;
    color: #FF9800;
    margin-top: 0.2rem;
}

/* CTA Button */
@keyframes ctaGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(255,107,53,0.35), 0 0 40px rgba(255,107,53,0.08); }
    50% { box-shadow: 0 6px 28px rgba(255,107,53,0.5), 0 0 60px rgba(255,107,53,0.18); }
}

.cta-button {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 0.5rem;
    padding: 1.2rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: inherit;
    color: #0a1f44;
    background: linear-gradient(135deg, #FF9800 0%, #ff8f5e 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(255,107,53,0.35);
    animation: fadeSlideUp 0.5s ease 0.8s forwards, ctaGlow 3s ease-in-out 1.3s infinite;
    opacity: 0;
}

.cta-button:hover {
    background: #ff8555;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255,107,53,0.45);
}
.cta-button:active { transform: translateY(0); }
.cta-icon { font-size: 0.8rem; margin-right: 0.2rem; vertical-align: middle; }

/* Feature pills */
.landing-features {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
    opacity: 0;
    animation: fadeSlideUp 0.5s ease 1s forwards;
}
.feature-pill {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
}
.feature-pill-dot { color: rgba(255,255,255,0.15); font-size: 0.7rem; }

/* ===== GAME SCREEN ===== */

#game {
    background: linear-gradient(135deg, #0a1f44 0%, #1a3a5c 100%);
    min-height: 100vh;
}

.game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0,10,0,0.9);
    border-bottom: 1px solid rgba(0,255,0,0.1);
}
.hud-left, .hud-right { text-align: center; min-width: 60px; }
.hud-label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(0,255,0,0.35);
}
.hud-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #00ff88;
}
.hud-center { flex: 1; text-align: center; }
.hud-status {
    font-size: 0.85rem;
    color: rgba(0,255,0,0.45);
    transition: color 0.3s;
}

/* Game Radar */
.radar {
    position: relative;
    width: 90vw;
    max-width: 500px;
    aspect-ratio: 1;
    margin: 16px auto;
    border-radius: 50%;
    background: radial-gradient(circle, #0a1a0a 0%, #040c04 100%);
    border: 2px solid rgba(0,255,0,0.15);
    overflow: hidden;
}

.radar .radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0,255,0,0.06);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.radar .radar-ring.r1 { width: 75%; height: 75%; }
.radar .radar-ring.r2 { width: 50%; height: 50%; }
.radar .radar-ring.r3 { width: 25%; height: 25%; }

.radar-sweep {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(0,255,0,0.06) 12deg, rgba(0,255,0,0.01) 35deg, transparent 50deg, transparent 360deg);
    animation: sweep 4s linear infinite;
    pointer-events: none;
}
@keyframes sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.radar .radar-center {
    position: absolute; top: 50%; left: 50%;
    width: 14px; height: 14px; margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: rgba(0,255,0,0.35);
    box-shadow: 0 0 12px rgba(0,255,0,0.25);
    pointer-events: none;
    z-index: 5;
}

.compass {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(0,255,0,0.25);
    pointer-events: none;
    z-index: 5;
}
.compass.n { top: 5%; left: 50%; transform: translateX(-50%); }
.compass.s { bottom: 5%; left: 50%; transform: translateX(-50%); }
.compass.e { right: 6%; top: 50%; transform: translateY(-50%); }
.compass.w { left: 6%; top: 50%; transform: translateY(-50%); }

.blobs-layer {
    position: absolute; inset: 0;
    z-index: 10;
}

/* ===== BLOB TYPES ===== */

.blob {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    /* default size — overridden per type */
    width: 48px;
    height: 48px;
}
.blob:active { border-color: rgba(255,255,255,0.4); }
.blob.selected {
    border-color: rgba(0,255,200,0.7);
    box-shadow: 0 0 16px rgba(0,255,200,0.25);
}

/* Landmass — large irregular blob near edge */
.blob-landmass {
    width: 48px; height: 48px;
}
.blob-landmass::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 22px; height: 16px;
    margin: -8px 0 0 -11px;
    border-radius: 40% 60% 50% 35%;
    background: rgba(0,255,0,0.55);
    box-shadow: 0 0 12px rgba(0,255,0,0.35), 0 0 24px rgba(0,255,0,0.12);
}

/* Fishing Vessel — normal green dot, zigzag movement */
.blob-fishing {
    width: 48px; height: 48px;
}
.blob-fishing::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 8px; height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: #0f0;
    box-shadow: 0 0 6px #0f0, 0 0 14px rgba(0,255,0,0.25);
}

/* Rain Squall — large fuzzy diffuse blob */
.blob-rain {
    width: 56px; height: 56px;
}
.blob-rain::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 25px; height: 22px;
    margin: -11px 0 0 -12px;
    border-radius: 45% 55% 50% 40%;
    background: rgba(0,220,0,0.35);
    box-shadow: 0 0 18px rgba(0,255,0,0.25), 0 0 35px rgba(0,255,0,0.1);
    filter: blur(2px);
}

/* Container Ship — bright strong echo with glow */
.blob-container {
    width: 48px; height: 48px;
}
.blob-container::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #0f0;
    box-shadow: 0 0 10px #0f0, 0 0 22px rgba(0,255,0,0.4), 0 0 40px rgba(0,255,0,0.15);
}

/* Sailboat — tiny, flickering intermittent */
.blob-sailboat {
    width: 48px; height: 48px;
}
.blob-sailboat::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 5px; height: 5px;
    margin: -2.5px 0 0 -2.5px;
    border-radius: 50%;
    background: rgba(0,255,0,0.85);
    box-shadow: 0 0 6px rgba(0,255,0,0.5), 0 0 14px rgba(0,255,0,0.2);
    animation: blipFlicker 2s ease infinite;
}

/* Closing Vessel — medium dot, direct approach */
.blob-closing {
    width: 48px; height: 48px;
}
.blob-closing::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #0f0;
    box-shadow: 0 0 8px #0f0, 0 0 16px rgba(0,255,0,0.3);
}

/* Blob state animations */
.blob.urgent {
    animation: blobPulse 0.6s ease infinite;
}
.blob.correct-anim {
    animation: blobCorrect 0.6s ease forwards;
}
.blob.wrong-anim {
    animation: blobWrong 0.5s ease forwards;
}
.blob.missed-anim {
    animation: blobMiss 0.8s ease forwards;
}

@keyframes blobPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(255,80,80,0.2); }
    50% { box-shadow: 0 0 18px rgba(255,80,80,0.5); border-color: rgba(255,80,80,0.4); }
}
@keyframes blobCorrect {
    0% { opacity: 1; transform: translate(-50%,-50%) scale(1); border-color: #4caf50; }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(1.6); }
}
@keyframes blobWrong {
    0% { border-color: #ff4444; background: rgba(255,0,0,0.2); }
    100% { border-color: transparent; background: transparent; opacity: 0.6; }
}
@keyframes blobMiss {
    0% { opacity: 1; }
    30% { transform: translate(-50%,-50%) scale(1.4); background: rgba(255,0,0,0.3); border-color: #ff4444; }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(0.3); }
}

/* Score Float */
.score-float {
    position: absolute;
    font-size: 0.95rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 50;
    animation: floatUp 1s ease forwards;
}
.score-float.positive { color: #00ff88; }
.score-float.negative { color: #ff4444; }

@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -35px); }
}

/* Classification Panel */
.classify-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(10,31,68,0.96);
    border-top: 2px solid rgba(0,255,0,0.15);
    padding: 12px 12px 20px;
    z-index: 100;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.classify-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 500px;
    margin: 0 auto;
}

.classify-btn {
    padding: 14px 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ddd;
    background: rgba(0,255,0,0.06);
    border: 1px solid rgba(0,255,0,0.15);
    border-radius: 10px;
    cursor: pointer;
    min-height: 48px;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.classify-btn:active {
    background: rgba(0,255,0,0.15);
    border-color: rgba(0,255,0,0.4);
}
.classify-btn.correct-flash {
    background: rgba(76,175,80,0.25);
    border-color: #4caf50;
    color: #4caf50;
}
.classify-btn.wrong-flash {
    background: rgba(255,68,68,0.2);
    border-color: #ff4444;
    color: #ff4444;
}

/* Wave Banner */
.wave-banner {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.88);
    z-index: 200;
    animation: fadeIn 0.3s ease;
}
.wave-banner h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #00ff88;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 25px rgba(0,255,136,0.4);
}
.wave-banner p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.6);
}

/* Radar shake on miss */
.radar.shake { animation: radarShake 0.3s ease; }
@keyframes radarShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ===== RESULTS PAGE ===== */

#results h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

.score-display {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.rank-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.score-number {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #fff;
}
.score-number span { font-size: 2.2rem; }

.score-breakdown {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.stat-correct { color: #4caf50; }
.stat-wrong { color: #ff6b35; }
.stat-missed { color: #ff4444; }

.score-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}
.score-bar-fill {
    height: 100%;
    background: #00cc66;
    transition: width 0.6s ease;
    border-radius: 10px;
}

/* Score / rank colors */
.score-display.rank-static .rank-title { color: #ff4444; }
.score-display.rank-static .score-bar-fill { background: #ff4444; }
.score-display.rank-spotter .rank-title { color: #ff6b35; }
.score-display.rank-spotter .score-bar-fill { background: #ff6b35; }
.score-display.rank-reader .rank-title { color: #4caf50; }
.score-display.rank-reader .score-bar-fill { background: #4caf50; }
.score-display.rank-master .rank-title { color: #ffd700; }
.score-display.rank-master .score-bar-fill { background: #ffd700; }

.score-message {
    background: rgba(255,255,255,0.05);
    border-radius: 12px; padding: 1.5rem;
    margin-bottom: 2rem; font-size: 1.1rem;
    line-height: 1.7; color: #ccc;
}

/* Email Gate */
.email-gate {
    background: rgba(255, 107, 53, 0.12);
    border: 2px solid rgba(255, 107, 53, 0.5);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 0.8rem;
}
.email-gate h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.gate-subtext { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; }
.email-gate form {
    display: flex; flex-direction: column; gap: 0.7rem;
    max-width: 320px; margin: 0 auto;
}
.email-gate form input {
    padding: 0.85rem; font-size: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}
.email-gate form input::placeholder { color: rgba(255,255,255,0.4); }

.subscribe-button {
    padding: 0.9rem 1.5rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0a1f44;
    background: #FF9800;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.subscribe-button:hover { background: #ff8555; transform: translateY(-2px); }
.subscribe-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.reassurance-text { font-size: 0.8rem; color: rgba(255,255,255,0.35); margin-top: 0.4rem; }
.reassurance-text a { color: rgba(255,255,255,0.4); }

.form-message { margin-top: 0.8rem; font-size: 0.9rem; }
.form-message.success { color: #4caf50; }
.form-message.error { color: #ff4444; }

/* Skip Link */
.skip-link { text-align: center; margin-bottom: 1.5rem; }
.skip-link a { color: rgba(255,255,255,0.5); text-decoration: underline; font-size: 0.85rem; }
.skip-link a:hover { color: rgba(255,255,255,0.7); }

.score-reveal { animation: fadeIn 0.4s ease-in; }

/* Radar Callout (was COLREGS callout in Q07) */
.radar-callout {
    background: rgba(0, 100, 0, 0.15);
    border-left: 4px solid #00ff00;
    border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem;
}
.radar-callout p { margin-bottom: 0.5rem; color: #ccc; }
.radar-callout p:last-child { margin-bottom: 0; }
.radar-callout strong { color: #00ff00; }

/* Social Sharing */
.social-sharing {
    background: rgba(255,255,255,0.05);
    border-radius: 12px; padding: 2rem; margin-bottom: 2rem;
}
.social-sharing h3 { text-align: center; margin-bottom: 1.5rem; font-size: 1.2rem; color: #fff; }
.share-buttons { display: flex; flex-direction: column; gap: 0.8rem; }
.share-btn {
    padding: 1rem; font-family: inherit; font-size: 1rem; font-weight: 600;
    border: none; border-radius: 8px; cursor: pointer; transition: all 0.2s;
    min-height: 48px;
}
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.linkedin { background: #0a66c2; color: #fff; }
.share-btn.copy { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.share-btn.native { background: #FF9800; color: #fff; }
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.5); }

/* Explanation */
.explanation {
    background: rgba(255,255,255,0.05);
    border-left: 4px solid #FF9800;
    border-radius: 0 8px 8px 0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.explanation h2 { color: #FF9800; margin-bottom: 0.8rem; font-size: 1.4rem; }
.explanation p { margin-bottom: 0.8rem; font-size: 1rem; line-height: 1.6; }
.insight-link {
    display: inline-block; margin-top: 0.8rem;
    padding: 0.7rem 1.3rem;
    color: #FF9800; text-decoration: none;
    border: 2px solid #FF9800;
    border-radius: 25px; font-size: 0.95rem;
    transition: all 0.2s ease;
}
.insight-link:hover { background: #FF9800; color: #ffffff; }

/* Second Chance */
.second-chance {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px; padding: 1.5rem;
    text-align: center; margin-bottom: 2rem;
}
.second-chance h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.second-chance p { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; }
.second-chance form {
    display: flex; flex-direction: column; gap: 0.7rem;
    max-width: 320px; margin: 0 auto;
}
.second-chance input {
    padding: 0.85rem; font-size: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}
.second-chance input::placeholder { color: rgba(255,255,255,0.4); }

.play-again { margin-top: 2rem; margin-bottom: 1rem; }

/* ===== MOBILE ===== */

@media (max-width: 380px) {
    .container { padding: 1.2rem 1rem; }
    .landing-title { font-size: 2rem; }
    .landing-subtitle { font-size: 1rem; }
    .radar-hero { max-width: 260px; }
}

@media (max-width: 480px) {
    .landing-title { font-size: 2.2rem; }
    .cta-button, .subscribe-button, .share-btn, .classify-btn { min-height: 48px; }
    .classify-grid { gap: 6px; }
    .classify-btn { padding: 12px 8px; font-size: 0.85rem; }
}

@media (max-width: 600px) {
    .container { max-width: 100%; padding: 0.5rem; }
    .radar { width: 280px; height: 280px; }
    .classify-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .cta-button, .subscribe-button { width: 100%; min-height: 48px; }
    h1 { font-size: 1.5rem; }
}

/* ===== GAMIFICATION ===== */
.streak { display:block; text-align:center; font-size:.85rem; font-weight:700; color:#4caf50; letter-spacing:1px; opacity:0; transition:all .3s ease; margin-bottom:4px; position:relative; z-index:10; }
.streak.visible { opacity:1; }
.streak.hot { color:#ff4444; animation:streakPulse .4s ease; }
@keyframes streakPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
.reaction-time { text-align:center; font-size:.8rem; font-weight:600; letter-spacing:.5px; opacity:0; transition:opacity .3s; margin-bottom:8px; position:relative; z-index:10; }
.reaction-time.visible { opacity:1; }
.reaction-time.fast { color:#4caf50; }
.reaction-time.medium { color:#ff9800; }
.reaction-time.slow { color:#ff6b6b; }
.particle { position:fixed; width:6px; height:6px; border-radius:50%; pointer-events:none; z-index:9998; animation:particleBurst .6s ease-out forwards; }
@keyframes particleBurst { 0%{transform:translate(0,0) scale(1);opacity:1} 100%{transform:translate(var(--dx),var(--dy)) scale(0);opacity:0} }

.gdpr-consent {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.75rem; color: rgba(255,255,255,0.4);
    cursor: pointer; text-align: left; line-height: 1.4;
}
.gdpr-consent input[type="checkbox"] {
    margin-top: 2px; flex-shrink: 0; accent-color: #FF9800;
    width: 16px; height: 16px; cursor: pointer;
}
.gdpr-consent a { color: rgba(255,255,255,0.5); text-decoration: underline; }
.gdpr-consent a:hover { color: #FF9800; }
