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

* { 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, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(160deg, #071520 0%, #0d2840 50%, #091a30 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem 1.2rem;
}

/* Screens */
.screen { display: none; animation: fadeIn 0.3s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

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

#landing-page.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 {
    text-align: center;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #FF9800;
    margin-bottom: 0.8rem;
    opacity: 0;
    animation: fadeSlideUp 0.5s ease forwards;
}

.hero-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 2rem 1.5rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    opacity: 0;
    animation: fadeSlideUp 0.6s ease 0.1s forwards;
}

.landing-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 60px rgba(255,255,255,0.06), 0 2px 4px rgba(0,0,0,0.3);
}

.landing-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    color: #FF9800;
    margin-bottom: 1.5rem;
}

/* ===== ENCOUNTER PREVIEW (Landing Hero) ===== */
.encounter-preview {
    position: relative;
    border-radius: 12px;
    padding: 2rem 0;
    overflow: hidden;
    background: rgba(0,20,40,0.6);
    border: 1px solid rgba(79,195,247,0.15);
    height: 160px;
}

.encounter-preview .sea-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(0,40,80,0.4) 0%, transparent 70%);
}

/* Animated preview vessels */
.preview-vessel {
    position: absolute;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-vessel-1 {
    top: 30px; left: 70%;
    animation: previewApproach1 4s ease-in-out infinite;
}
.preview-vessel-2 {
    top: 20px; left: 45%;
    animation: previewApproach2 5s ease-in-out infinite 1s;
}
.preview-vessel-3 {
    top: 40px; left: 20%;
    animation: previewApproach3 4.5s ease-in-out infinite 0.5s;
}
.preview-your-vessel {
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
}

@keyframes previewApproach1 {
    0%, 100% { transform: translate(0, 0); opacity: 0.6; }
    50% { transform: translate(-20px, 30px); opacity: 1; }
}
@keyframes previewApproach2 {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(0, 40px); opacity: 1; }
}
@keyframes previewApproach3 {
    0%, 100% { transform: translate(0, 0); opacity: 0.6; }
    50% { transform: translate(15px, 25px); opacity: 1; }
}

/* Preview light dots */
.preview-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    animation: lightBlink 2s ease-in-out infinite;
}
.preview-light.red { background: #ff0000; box-shadow: 0 0 8px #ff0000; }
.preview-light.green { background: #00cc00; box-shadow: 0 0 8px #00cc00; }
.preview-light.white { background: #ffffff; box-shadow: 0 0 8px #ffffff; }

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

/* Your vessel (landing) */
.your-vessel-preview {
    width: 20px;
    height: 30px;
    position: relative;
}
.your-vessel-preview::before {
    content: '';
    position: absolute;
    bottom: 0; left: 2px;
    width: 16px; height: 20px;
    background: #8899aa;
    border-radius: 50% 50% 4px 4px;
    clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
}
.your-vessel-preview .light-port {
    position: absolute; top: 6px; left: -2px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #ff0000; box-shadow: 0 0 6px #ff0000;
}
.your-vessel-preview .light-stbd {
    position: absolute; top: 6px; right: -2px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #00cc00; box-shadow: 0 0 6px #00cc00;
}

/* Question mark between vessels */
.preview-question {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: #FF9800;
    text-shadow: 0 0 20px rgba(255,152,0,0.5);
    animation: questionPulse 2s ease-in-out infinite;
}

@keyframes questionPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* Feature pills */
.landing-features {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeSlideUp 0.5s ease 0.5s 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; }
.cta-icon { font-size: 0.8rem; margin-right: 0.2rem; vertical-align: middle; }

/* 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: 360px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0a1628;
    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);
    opacity: 0;
    animation: fadeSlideUp 0.5s ease 0.35s forwards, ctaGlow 3s ease-in-out 0.85s infinite;
}
.cta-button:hover { background: #ff8555; transform: translateY(-2px); }
.cta-button:active { transform: translateY(0); }

/* ===== BRIEFING SCREEN ===== */
.briefing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.briefing-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}
.briefing-instruction {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.briefing-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.legend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}
.legend-dot {
    flex-shrink: 0;
}
.legend-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.legend-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}
.legend-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}
.briefing-practice {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1rem;
    font-style: italic;
}
.briefing-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem 2rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0a1628;
    background: linear-gradient(135deg, #FF9800 0%, #ff8f5e 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(255,152,0,0.35);
}
.briefing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255,152,0,0.45);
}

/* ===== GAME PAGE ===== */

/* Timer progress bar */
.timer-bar-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: rgba(255,255,255,0.08);
    z-index: 10000;
}

.timer-bar-fill {
    height: 100%;
    width: 100%;
    background: #4ade80;
    transition: width 1s linear, background-color 0.5s ease;
    border-radius: 0 2px 2px 0;
}

.timer-bar-fill.timer-warning {
    background: #FF9800;
}

.timer-bar-fill.timer-danger {
    background: #ef4444;
    animation: timerBarPulse 1s ease-in-out infinite;
}

.timer-bar-fill.timer-critical {
    background: #ef4444;
    animation: timerBarPulse 0.5s ease-in-out infinite;
    height: 14px;
}

@keyframes timerBarPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Game HUD */
.game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: rgba(0,20,40,0.6);
    border: 1px solid rgba(79,195,247,0.15);
    border-radius: 10px;
    margin-bottom: 0.8rem;
}
.hud-item { display: flex; flex-direction: column; align-items: center; }
.hud-label {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; color: rgba(255,255,255,0.4);
}
.hud-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem; font-weight: 700; color: #FF9800;
}
.hud-streak {
    font-size: 0.85rem; font-weight: 700; color: #FF9800;
    opacity: 0; transition: opacity 0.3s;
}
.hud-streak.visible { opacity: 1; }
.hud-streak.pulse { animation: streakPulse 0.4s ease; }

.hud-night-badge {
    display: none;
    font-size: 0.6rem; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: #4fc3f7;
    padding: 2px 8px; border: 1px solid rgba(79,195,247,0.3);
    border-radius: 4px; background: rgba(79,195,247,0.1);
}

/* Sea Display */
.sea-display {
    position: relative;
    width: 100%;
    height: 360px;
    background: linear-gradient(180deg, #001828 0%, #002040 40%, #001830 100%);
    border-radius: 12px;
    border: 2px solid rgba(79,195,247,0.2);
    overflow: hidden;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: background 0.5s ease;
}

/* Night mode */
.sea-display.night-mode {
    background: linear-gradient(180deg, #000205 0%, #000408 40%, #000205 100%);
    border-color: rgba(79,195,247,0.08);
}
.sea-display.night-mode .compass-bg { opacity: 0.08; }
.sea-display.night-mode .heading-line { opacity: 0.15; }
.sea-display.night-mode .your-vessel { opacity: 0.3; }
.sea-display.night-mode .sea-grid { opacity: 0.02; }
.sea-display.night-mode .port-zone,
.sea-display.night-mode .stbd-zone { opacity: 0.15; }

/* Sea grid */
.sea-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(79,195,247,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,195,247,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    transition: opacity 0.5s;
}

/* Compass background */
.compass-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 1px solid rgba(79,195,247,0.06);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.5s;
}
.compass-bg::before {
    content: 'N';
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem; font-weight: 700;
    color: rgba(79,195,247,0.2);
    letter-spacing: 1px;
}

/* Port / Starboard zones */
.port-zone, .stbd-zone {
    position: absolute;
    top: 0; bottom: 0;
    width: 6px;
    pointer-events: none;
    transition: opacity 0.5s;
}
.port-zone {
    left: 35%;
    background: linear-gradient(180deg, rgba(255,0,0,0.15), transparent 60%);
}
.stbd-zone {
    right: 35%;
    background: linear-gradient(180deg, rgba(0,200,0,0.15), transparent 60%);
}

/* Heading line */
.heading-line {
    position: absolute;
    left: 50%; top: 0; bottom: 60px;
    width: 2px;
    transform: translateX(-50%);
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.12) 0px, rgba(255,255,255,0.12) 6px,
        transparent 6px, transparent 12px
    );
    pointer-events: none;
    transition: opacity 0.5s;
}

/* Your vessel (game) */
.your-vessel {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 36px;
    z-index: 5;
    transition: opacity 0.5s;
}
.your-vessel::before {
    content: '';
    position: absolute;
    bottom: 0; left: 2px;
    width: 20px; height: 12px;
    background: #8899aa;
    border-radius: 0 0 10px 10px;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
}
.your-vessel::after {
    content: '';
    position: absolute;
    bottom: 10px; left: 7px;
    width: 10px; height: 20px;
    background: #aabbcc;
    clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
}
.your-vessel .my-port {
    position: absolute; bottom: 12px; left: -2px;
    width: 5px; height: 5px; border-radius: 50%;
    background: #ff0000; box-shadow: 0 0 6px #ff0000;
}
.your-vessel .my-stbd {
    position: absolute; bottom: 12px; right: -2px;
    width: 5px; height: 5px; border-radius: 50%;
    background: #00cc00; box-shadow: 0 0 6px #00cc00;
}

/* Encounter vessels — base container */
.encounter-vessel {
    position: absolute;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transform: translate(-50%, -50%);
}

/* Night vessel container */
.night-vessel {
    background: transparent;
}

/* Navigation lights (night mode) */
.nav-light {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: lightGlow 1.5s ease-in-out infinite;
}
.light-red { background: #ff0000; box-shadow: 0 0 12px 4px rgba(255,0,0,0.7); }
.light-green { background: #00cc00; box-shadow: 0 0 12px 4px rgba(0,204,0,0.7); }
.light-white { background: #ffffff; box-shadow: 0 0 12px 4px rgba(255,255,255,0.7); }

@keyframes lightGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Encounter label */
.encounter-label {
    position: absolute;
    bottom: 65px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 11;
    max-width: 90%;
    text-align: center;
}

/* ===== DAY MODE VESSEL CSS DRAWINGS ===== */

/* Power vessel — grey hull with bridge */
.vessel-power {
    width: 22px;
    height: 36px;
    position: relative;
}
.vessel-power::before {
    content: '';
    position: absolute;
    bottom: 0; left: 1px;
    width: 20px; height: 26px;
    background: #667788;
    border-radius: 4px 4px 10px 10px;
    clip-path: polygon(20% 0, 80% 0, 100% 30%, 100% 100%, 70% 100%, 50% 90%, 30% 100%, 0 100%, 0 30%);
}
.vessel-power::after {
    content: '';
    position: absolute;
    bottom: 14px; left: 5px;
    width: 12px; height: 8px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(255,255,255,0.3);
}

/* Sailing vessel — hull with triangle sail */
.vessel-sail {
    width: 24px;
    height: 40px;
    position: relative;
}
.vessel-sail::before {
    content: '';
    position: absolute;
    bottom: 0; left: 4px;
    width: 16px; height: 14px;
    background: #667788;
    border-radius: 0 0 8px 8px;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}
.vessel-sail::after {
    content: '';
    position: absolute;
    bottom: 12px; left: 8px;
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 8px solid #ffffff;
    border-bottom: 24px solid transparent;
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.3));
}

/* Fishing vessel — hull with trawl booms */
.vessel-fishing {
    width: 24px;
    height: 36px;
    position: relative;
}
.vessel-fishing::before {
    content: '';
    position: absolute;
    bottom: 0; left: 2px;
    width: 20px; height: 22px;
    background: #8B6914;
    border-radius: 4px 4px 10px 10px;
    clip-path: polygon(20% 0, 80% 0, 100% 30%, 100% 100%, 0 100%, 0 30%);
}
.vessel-fishing::after {
    content: '';
    position: absolute;
    bottom: 18px; left: 0;
    width: 24px; height: 2px;
    background: #8B6914;
    box-shadow: 0 4px 0 #8B6914;
}

/* NUC vessel — hull with two red balls */
.vessel-nuc {
    width: 24px;
    height: 40px;
    position: relative;
}
.vessel-nuc::before {
    content: '';
    position: absolute;
    bottom: 0; left: 2px;
    width: 20px; height: 20px;
    background: #667788;
    border-radius: 4px 4px 10px 10px;
    clip-path: polygon(20% 0, 80% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
}
.vessel-nuc::after {
    content: '\u25CF\u000A\u25CF';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #ff0000;
    line-height: 1.2;
    white-space: pre;
    text-shadow: 0 0 6px #ff0000;
}

/* RAM vessel — hull with ball-diamond-ball */
.vessel-ram {
    width: 24px;
    height: 42px;
    position: relative;
}
.vessel-ram::before {
    content: '';
    position: absolute;
    bottom: 0; left: 2px;
    width: 20px; height: 20px;
    background: #667788;
    border-radius: 4px 4px 10px 10px;
    clip-path: polygon(20% 0, 80% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
}
.vessel-ram::after {
    content: '\u25CF\u25C6\u25CF';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    color: #333333;
    letter-spacing: -1px;
    writing-mode: vertical-rl;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

/* Anchored vessel — hull with anchor symbol */
.vessel-anchored {
    width: 24px;
    height: 36px;
    position: relative;
}
.vessel-anchored::before {
    content: '';
    position: absolute;
    bottom: 0; left: 2px;
    width: 20px; height: 20px;
    background: #556677;
    border-radius: 4px 4px 10px 10px;
}
.vessel-anchored::after {
    content: '\u2693';
    position: absolute;
    top: 2px; left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #333;
}

/* Towing vessel — hull with tow line */
.vessel-towing {
    width: 24px;
    height: 44px;
    position: relative;
}
.vessel-towing::before {
    content: '';
    position: absolute;
    top: 0; left: 2px;
    width: 20px; height: 20px;
    background: #667788;
    border-radius: 4px 4px 10px 10px;
    clip-path: polygon(20% 0, 80% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
}
.vessel-towing::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 2px; height: 18px;
    background: repeating-linear-gradient(to bottom, #aaa 0, #aaa 3px, transparent 3px, transparent 6px);
}

/* Motorsailer — sail vessel with inverted cone */
.vessel-motorsail {
    width: 24px;
    height: 40px;
    position: relative;
}
.vessel-motorsail::before {
    content: '';
    position: absolute;
    bottom: 0; left: 4px;
    width: 16px; height: 14px;
    background: #667788;
    border-radius: 0 0 8px 8px;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}
.vessel-motorsail::after {
    content: '';
    position: absolute;
    bottom: 12px; left: 6px;
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 12px solid #ffffff;
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.3));
}

/* Approach bar */
.approach-bar-container {
    position: absolute;
    bottom: 58px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    z-index: 15;
}
.approach-bar-fill {
    height: 100%;
    width: 100%;
    background: #4caf50;
    border-radius: 3px;
    transition: width 0.1s linear, background-color 0.3s ease;
}
.approach-bar-fill.warning { background: #FF9800; }
.approach-bar-fill.critical { background: #ff4444; }

/* Decision buttons */
.decision-buttons {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}
.decision-btn {
    flex: 1;
    padding: 1rem 0.5rem;
    border: 3px solid;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: transparent;
}
.decision-btn .btn-icon { font-size: 1.5rem; line-height: 1; }
.decision-btn .btn-label { font-size: 1rem; font-weight: 800; letter-spacing: 1px; }
.decision-btn .btn-sub { font-size: 0.75rem; font-weight: 600; opacity: 0.7; }

.btn-give-way {
    border-color: #ff4444;
    color: #ff4444;
    background: rgba(255,68,68,0.08);
}
.btn-give-way:hover, .btn-give-way:active {
    background: rgba(255,68,68,0.2);
    transform: scale(0.97);
}
.btn-stand-on {
    border-color: #4caf50;
    color: #4caf50;
    background: rgba(76,175,80,0.08);
}
.btn-stand-on:hover, .btn-stand-on:active {
    background: rgba(76,175,80,0.2);
    transform: scale(0.97);
}
.decision-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.decision-btn.flash-correct { animation: btnFlashCorrect 0.5s ease; }
.decision-btn.flash-wrong { animation: btnFlashWrong 0.5s ease; }

@keyframes btnFlashCorrect {
    0% { background: rgba(76,175,80,0.6); }
    100% { background: rgba(76,175,80,0.08); }
}
@keyframes btnFlashWrong {
    0% { background: rgba(255,68,68,0.6); }
    100% { background: rgba(255,68,68,0.08); }
}

/* Game toast */
.game-toast {
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.08);
    border-left: 3px solid #FF9800;
    border-radius: 0 10px 10px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    min-height: 2.5rem;
}
.game-toast.visible { opacity: 1; transform: translateY(0); }
.game-toast.toast-correct { border-left-color: #4caf50; }
.game-toast.toast-wrong { border-left-color: #ff4444; }
.game-toast.toast-timeout { border-left-color: #FF9800; }

/* Wave banner */
.wave-banner {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,8,16,0.92);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.wave-banner.visible { opacity: 1; pointer-events: auto; }
.wave-banner-title {
    font-size: 2rem; font-weight: 800;
    color: #FF9800; text-transform: uppercase; letter-spacing: 2px;
}
.wave-banner-sub {
    font-size: 1rem; font-weight: 600;
    color: rgba(255,255,255,0.6); margin-top: 0.3rem;
}

/* Collision animations */
@keyframes collisionShake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px); }
    20% { transform: translateX(8px); }
    30% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    50% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
}
.collision-shake { animation: collisionShake 0.5s ease; }
@keyframes collisionFlash {
    0% { box-shadow: inset 0 0 60px rgba(255,68,68,0.6); }
    100% { box-shadow: inset 0 0 0 rgba(255,68,68,0); }
}
.collision-flash { animation: collisionFlash 0.4s ease; }

/* Score float */
.score-float {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem; font-weight: 700;
    color: #4caf50;
    pointer-events: none;
    z-index: 20;
    animation: floatUp 0.8s ease-out forwards;
}
.score-float.wrong { color: #ff4444; }
@keyframes floatUp {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-40px); }
}

/* ===== RESULTS PAGE ===== */
.results-title { text-align: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 1.2rem; }

.results-stats { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.results-stat { text-align: center; }
.results-stat-value { font-family: 'JetBrains Mono', monospace; font-size: 1.8rem; font-weight: 700; }
.results-stat-value.stat-correct { color: #4caf50; }
.results-stat-value.stat-wrong { color: #ff4444; }
.results-stat-value.stat-missed { color: #FF9800; }
.results-stat-label {
    font-size: 0.75rem; font-weight: 600;
    color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px;
}

.rank-display { text-align: center; margin-bottom: 0.5rem; }
.rank-title { font-size: 1.6rem; font-weight: 800; color: #FF9800; }

.score-display { text-align: center; margin-bottom: 1.5rem; padding: 1.5rem; background: rgba(255,255,255,0.06); border-radius: 16px; }
.score-number { font-size: 3.5rem; font-weight: 800; letter-spacing: -1px; }
.score-message { font-size: 1.05rem; font-weight: 500; margin-top: 0.6rem; color: rgba(255,255,255,0.8); }
.score-orange .score-number { color: #FF9800; }
.score-green .score-number { color: #4caf50; }
.score-red .score-number { color: #ff4444; }

.score-bar { width: 80%; max-width: 240px; height: 8px; background: rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; margin: 0.6rem auto; }
.score-bar-fill { height: 100%; width: 0%; border-radius: 10px; transition: width 0.8s ease; }
.score-green .score-bar-fill { background: #4caf50; }
.score-orange .score-bar-fill { background: #FF9800; }
.score-red .score-bar-fill { background: #ff4444; }

/* 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; }
.email-gate .gate-subtext { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; }
.email-gate #newsletter-form { display: flex; flex-direction: column; gap: 0.7rem; max-width: 320px; margin: 0 auto; }
.email-gate #newsletter-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 #newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }

.subscribe-button { padding: 0.9rem 1.5rem; font-size: 1.05rem; font-weight: 700; color: #0a1628; background: #FF9800; border: none; border-radius: 10px; cursor: pointer; transition: all 0.2s ease; }
.subscribe-button:hover { background: #ff8555; }

.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.6rem; font-size: 0.9rem; }
.form-message.success { color: #4caf50; }
.form-message.error { color: #ff4444; }

.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; }

/* Answer Breakdown */
.answer-breakdown { margin-bottom: 1.5rem; }
.breakdown-item { padding: 1rem; margin-bottom: 0.5rem; border-radius: 10px; background: rgba(255,255,255,0.04); border-left: 4px solid; }
.breakdown-item.was-correct { border-left-color: #4caf50; }
.breakdown-item.was-incorrect { border-left-color: #ff4444; }
.breakdown-item.was-missed { border-left-color: #FF9800; }
.breakdown-q { font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.3rem; }
.breakdown-answer { font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 0.2rem; }
.breakdown-explanation { font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.4; }

/* Twist */
.twist { text-align: center; margin-bottom: 2rem; padding: 1.5rem 1rem; background: rgba(255,107,53,0.08); border-radius: 14px; border: 1px solid rgba(255,107,53,0.2); }
.twist-headline { font-size: 1.4rem; font-weight: 800; color: #FF9800; margin-bottom: 0.5rem; line-height: 1.3; }
.twist-body { font-size: 0.95rem; color: rgba(255,255,255,0.6); line-height: 1.5; }

/* Social Sharing */
.social-sharing { background: rgba(255,255,255,0.04); border-radius: 14px; padding: 1.5rem; margin-bottom: 2rem; }
.social-sharing h3 { text-align: center; margin-bottom: 1rem; font-size: 1.1rem; }
.share-buttons { display: flex; flex-direction: column; gap: 0.6rem; }
.share-btn { padding: 0.85rem; font-size: 0.95rem; font-weight: 600; border: none; border-radius: 10px; cursor: pointer; transition: all 0.2s ease; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.linkedin { background: #0a66c2; color: #fff; }
.share-btn.native { background: #FF9800; color: #0a1628; }
.share-btn.copy { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* Explanation */
.explanation { background: rgba(255,255,255,0.04); border-left: 4px solid #FF9800; border-radius: 10px; padding: 1.5rem; margin-bottom: 2rem; }
.explanation h2 { color: #FF9800; margin-bottom: 0.8rem; font-size: 1.4rem; }
.explanation p { margin-bottom: 0.8rem; font-size: 0.95rem; line-height: 1.6; color: rgba(255,255,255,0.8); }
.insight-link { display: inline-block; margin-top: 0.5rem; padding: 0.7rem 1.2rem; color: #FF9800; text-decoration: none; border: 2px solid #FF9800; border-radius: 25px; font-weight: 600; font-size: 0.9rem; 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); }

/* Score title */
.score-title { font-size: 1.6rem; font-weight: 800; color: #FF9800; margin-bottom: 0.3rem; }

/* Gamification */
@keyframes streakPulse { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.particle { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #4caf50; pointer-events: none; animation: particleBurst 0.6s ease-out forwards; }
@keyframes particleBurst {
    0% { opacity: 1; transform: translate(0,0) scale(1); }
    100% { opacity: 0; transform: translate(calc(var(--dx) * 60px), calc(var(--dy) * 60px)) scale(0); }
}

/* GDPR consent */
.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; }

/* Mobile */
@media (max-width: 380px) {
    .container { padding: 1.2rem 1rem; }
    .landing-title { font-size: 1.8rem; }
    .landing-subtitle { font-size: 1.2rem; }
    .sea-display { height: 300px; }
    .decision-btn { min-height: 70px; padding: 0.8rem 0.4rem; }
    .decision-btn .btn-label { font-size: 0.85rem; }
    .hud-value { font-size: 1.1rem; }
    .game-hud { padding: 0.4rem 0.8rem; }
}

@media (max-width: 480px) {
    .decision-btn { min-height: 72px; }
    .cta-button, .subscribe-button, .share-btn { min-height: 48px; }
}
