@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Inter:wght@200;300;400&display=swap');

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #060d1a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Crosshair — minimal dot */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    display: none;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.15);
    font-size: 0;
}

#crosshair.visible {
    display: block;
}

/* ===== Overlay / Title Screen ===== */
#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 1.2s ease;
    overflow: hidden;
}

/* Animated gradient background — Dutch coastal sunset */
#overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(175deg,
        #0a1525 0%,
        #1a1a3a 15%,
        #3a2040 28%,
        #804060 40%,
        #d4a3b5 52%,
        #f0c890 65%,
        #e08050 78%,
        #5a2040 90%,
        #0a1525 100%
    );
    background-size: 100% 400%;
    animation: skyShift 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes skyShift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

/* Subtle noise texture overlay */
#overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    pointer-events: none;
}

#overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#overlay-content {
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInContent 2s ease;
}

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

#overlay-content h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 4.5rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
}

#overlay-content .subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 200;
    letter-spacing: 0.25em;
    opacity: 0.65;
    margin-bottom: 3.5rem;
    text-transform: uppercase;
}

#play-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: #fff;
    padding: 0.9rem 3rem;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.5s ease;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

#play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.6s ease;
}

#play-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.02);
}

#play-btn:hover::before {
    left: 100%;
}

.controls-info {
    margin-top: 2.5rem;
    opacity: 0.3;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    font-weight: 200;
}

/* ===== HUD ===== */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
    font-family: 'Inter', sans-serif;
}

#hud.visible {
    display: block;
}

/* ===== Radio Panel ===== */
.radio-header {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    opacity: 0.4;
    margin-bottom: 10px;
    font-weight: 300;
    text-transform: uppercase;
}

.radio-incident {
    font-size: 0.95rem;
    margin-bottom: 14px;
    font-weight: 300;
}

.radio-actions {
    display: flex;
    gap: 10px;
}

.radio-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    padding: 7px 18px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: 0.05em;
    transition: all 0.3s;
}

.radio-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.report-btn {
    border-color: rgba(140, 200, 140, 0.3);
}

.radio-message {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #a8d8a8;
    min-height: 1.2em;
    font-weight: 300;
}

/* ===== Binocular overlay ===== */
#binocular-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* ===== Touch Controls ===== */
#touch-controls {
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 15;
}

#touch-controls.visible {
    display: block;
}

.touch-joystick {
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: auto;
    touch-action: none;
}

.touch-joystick-knob {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.15s ease;
}

.touch-action-bar {
    position: absolute;
    bottom: 40px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

.touch-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.touch-btn:active, .touch-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}


/* ===== Responsive — Tablet (≤768px) ===== */
@media (max-width: 768px) {
    #overlay-content h1 {
        font-size: 3rem;
        letter-spacing: 0.2em;
    }

    #overlay-content .subtitle {
        font-size: 0.7rem;
        margin-bottom: 2.5rem;
    }

    #play-btn {
        padding: 0.8rem 2.5rem;
        font-size: 0.8rem;
    }

    .controls-info {
        font-size: 0.55rem;
        margin-top: 1.5rem;
        padding: 0 20px;
    }

    .radio-incident {
        font-size: 0.85rem;
    }

    .radio-btn {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
}

/* ===== Responsive — Mobile (≤480px) ===== */
@media (max-width: 480px) {
    #overlay-content h1 {
        font-size: 2.2rem;
        letter-spacing: 0.15em;
    }

    #overlay-content .subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.15em;
        margin-bottom: 2rem;
    }

    #play-btn {
        padding: 0.7rem 2rem;
        font-size: 0.75rem;
    }

    .controls-info {
        display: none;
    }

    .radio-incident {
        font-size: 0.8rem;
    }

    .radio-btn {
        padding: 5px 12px;
        font-size: 0.7rem;
    }

    .touch-joystick {
        bottom: 28px;
        left: 24px;
        width: 100px;
        height: 100px;
    }

    .touch-joystick-knob {
        width: 38px;
        height: 38px;
    }

    .touch-btn {
        width: 46px;
        height: 46px;
        font-size: 0.55rem;
    }

    .touch-action-bar {
        bottom: 28px;
        right: 16px;
        gap: 10px;
    }
}
