﻿/* =========================================
   1. GLOBAL DEFAULTS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Inter:wght@400;600&display=swap');

:root {
    --font-main: 'Inter', sans-serif;
    --font-scifi: 'Orbitron', sans-serif;
    --bg-surface: #FFFFFF;
    --border-subtle: #EEF0F2;
    --text-heading: #111111;
    --text-body: #495057;
    --primary-black: #000000;
    --brand-blue: #2563EB;
    --brand-cyan: #00ffff;
    --radius-card: 20px;
    --radius-pill: 50px;
    --shadow-soft: 0 10px 30px rgba(0,0,0, 0.08);
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background-color: #F0F4F8;
    color: var(--text-heading);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-scifi);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyber-font {
    font-family: var(--font-scifi);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* =========================================
   2. NAVBAR & BRANDING
   ========================================= */
.navbar-brand-card {
    background: #09090b;
    border: 1px solid var(--brand-blue);
    border-radius: 8px;
    color: #fff;
    padding: 8px 16px;
    position: relative;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s ease;
}

    .navbar-brand-card::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
    }

    .navbar-brand-card:hover {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
    }

    .navbar-brand-card h4 {
        font-family: var(--font-scifi);
        font-size: 1rem;
        margin: 0;
        line-height: 1;
        font-weight: 800;
    }

/* =========================================
   2.1 NAVBAR AUTH (Home Page Fixed)
   ========================================= */
.auth-capsule-light {
    background: #fff;
    border: 2px solid #000;
    border-radius: 50px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: max-content;
}

.auth-label-light {
    color: #000;
    font-weight: 800;
    font-size: 0.75rem;
    padding-left: 8px;
    font-family: var(--font-scifi);
    letter-spacing: 1px;
    white-space: nowrap;
}

.auth-btn-circle-light {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: all 0.2s;
}

    .auth-btn-circle-light:hover {
        transform: scale(1.1);
        border-color: var(--brand-blue);
    }

    .auth-btn-circle-light svg {
        width: 16px;
        height: 16px;
        display: block;
    }

/* =========================================
   3. HERO SECTION
   ========================================= */
.scifi-hero-section {
    position: relative;
    /* HARD LIMIT: 40% of screen height */
    height: 40vh;
    /* Safety floor: Don't get smaller than 300px or it breaks */
    min-height: 300px;
    background: #09090b;
    overflow: hidden;
    padding: 0; /* Remove padding so we use all space */
}

#globe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    z-index: 0;
}

.scifi-hero-card {
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid #2563EB;
    border-radius: 20px;
    width: 90%;
    max-width: 650px;
    /* RESPONSIVE SIZING: */
    /* Padding shrinks with viewport height */
    padding: 3vh 5vw;
    /* Margin ensures it doesn't touch the very edge */
    margin: 1rem;
}

.hero-title {
    /* Font size scales with height (vh) so it fits in the short box */
    font-size: clamp(1.8rem, 6vh, 3.5rem);
    letter-spacing: 2px;
}

.hero-text {
    font-family: var(--font-main);
    /* Smaller text on small screens */
    font-size: clamp(0.8rem, 2vh, 1.1rem);
    line-height: 1.4;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.discover-btn {
    /* Button size scales slightly */
    padding: clamp(8px, 2vh, 12px) clamp(20px, 4vw, 40px);
    font-size: clamp(0.8rem, 2vh, 1rem);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

    .discover-btn:hover {
        transform: translateY(-2px);
        background: #2563EB;
        box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
    }

/* =========================================
   4. SHARED MODERN STYLES
   ========================================= */
.modern-card, .modern-blog-card {
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    font-family: var(--font-main);
}

    .modern-blog-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.08);
        border-color: #000;
    }

.modern-input-group {
    margin-bottom: 1.5rem;
}

.modern-label {
    display: block;
    font-weight: 700;
    font-size: 0.8rem;
    color: #344767;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-control {
    width: 100%;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #495057;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

    .modern-control:focus {
        background: #fff;
        border-color: #000;
        box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
        outline: none;
    }

.btn-modern-black {
    background: #000;
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 12px 30px;
    font-weight: 700;
    font-family: var(--font-main);
    border: none;
    transition: all 0.2s;
}

    .btn-modern-black:hover {
        background: #333;
        transform: translateY(-2px);
    }

/* =========================================
   5. MAP UI ELEMENTS
   ========================================= */
#map {
    height: 100vh;
    width: 100%;
    z-index: 1;
    background: #09090b;
}

.auth-overlay {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1000;
}

.map-auth-capsule {
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 5px 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    height: 44px;
    width: auto;
    min-width: max-content;
    white-space: nowrap;
}

.map-auth-text {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    color: #000;
    margin-right: 5px;
}

.auth-icon-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: transform 0.2s;
    flex-shrink: 0 !important;
    text-decoration: none;
}

    .auth-icon-btn:hover {
        transform: scale(1.1);
        background: #e9ecef;
    }

    .auth-icon-btn svg {
        width: 18px !important;
        height: 18px !important;
        display: block;
    }

.ui-overlay {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 1000;
    min-width: 220px;
    pointer-events: none;
}

    .ui-overlay > * {
        pointer-events: auto;
    }

.cyber-card {
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
    color: #fff;
    padding: 15px 25px;
    position: relative;
    text-align: center;
}

    .cyber-card::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, #ff00ff, #00ffff);
    }

.map-fab {
    background: #fff;
    color: #000;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 10px 20px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
    min-width: max-content;
}

    .map-fab:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 35px rgba(0,0,0,0.3);
        background: #f8f9fa;
    }

/* =========================================
   6. POPUPS & MODALS
   ========================================= */
.leaflet-popup-content-wrapper {
    background: rgba(15, 15, 25, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--brand-blue);
    border-radius: 4px !important;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
    padding: 0;
    color: #fff !important;
}

.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

.leaflet-popup-tip {
    background: var(--brand-blue) !important;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #fff !important;
    font-size: 1.2rem;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
}

.popup-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: transparent;
}

.popup-body {
    padding: 15px;
}

.popup-audio-player {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 12px;
}

.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    font-family: var(--font-main);
}

.modal-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem 2rem;
}

.modal-body {
    padding: 2rem;
}

.modal-title {
    font-family: var(--font-main);
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* =========================================
   7. FLOATING MAP BUTTONS
   ========================================= */
#locate-btn, #info-btn {
    position: absolute;
    right: 20px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s, color 0.2s;
    color: #333;
}

    #locate-btn:hover, #info-btn:hover {
        transform: scale(1.1);
        background-color: #f8f9fa;
        color: var(--brand-blue);
    }

    #locate-btn:active, #info-btn:active {
        transform: scale(0.95);
    }

#locate-btn {
    bottom: 20px;
}

#info-btn {
    bottom: 80px;
    font-size: 1.5rem;
}

#footer-dock:not(:empty) ~ #locate-btn {
    bottom: 90px;
}

#footer-dock:not(:empty) ~ #info-btn {
    bottom: 150px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 1s linear infinite;
    opacity: 0.5;
}

/* =========================================
   8. FOOTER DOCK & TOASTS
   ========================================= */
#footer-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    overflow: visible;
}

#ad-banner-container {
    width: 100%;
    max-width: 728px;
    margin-bottom: 8px;
    pointer-events: auto;
    display: none;
}

    #ad-banner-container:not(:empty) {
        display: flex;
        min-height: 60px;
    }

.toast {
    background: rgba(10, 10, 20, 0.9) !important;
    border: 1px solid var(--brand-blue) !important;
    backdrop-filter: blur(10px);
    color: #fff !important;
    font-family: var(--font-main);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

/* =========================================
   9. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .ui-overlay {
        top: 15px;
        left: 15px;
        min-width: auto;
    }

    .auth-overlay {
        top: 15px;
        right: 15px;
    }

    .map-auth-text {
        display: none;
    }

    .leaflet-popup-content {
        width: 240px !important;
    }

    .map-auth-capsule, .auth-capsule-light {
        padding: 4px 8px;
        gap: 5px;
        min-width: auto;
    }
}

/* =========================================
   10. SITE FOOTER (Scrollable)
   ========================================= */
.site-footer {
    background-color: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-family: var(--font-main);
}

.footer-link {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

    .footer-link:hover {
        color: #fff;
        padding-left: 5px;
        text-decoration: none;
    }

.hover-white:hover {
    color: #fff !important;
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

/* =========================================
   11. SOCIAL MINI BUTTONS
   ========================================= */
.social-mini-btn {
    width: 28px;
    height: 28px;
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

    .social-mini-btn:hover {
        transform: scale(1.15);
        background: #000;
        color: #fff;
        border-color: var(--brand-blue);
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    }

    .social-mini-btn svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
    }

.site-footer .social-mini-btn {
    background: #111;
    border-color: #333;
    color: #ccc;
}

    .site-footer .social-mini-btn:hover {
        background: #fff;
        color: #000;
    }

/* =========================================
   12. MOBILE OVERLAP FIX (Added)
   ========================================= */
@media (max-width: 576px) {
    /* Shrink the Logo Text */
    .navbar-brand-card h4 {
        font-size: 0.8rem !important;
        letter-spacing: 1px !important;
    }

    .navbar-brand-card .small {
        font-size: 0.5rem !important;
        letter-spacing: 0px !important;
        display: none; /* Hide slogan to save space */
    }

    /* Limit Widths to prevent collision */
    .ui-overlay {
        max-width: 55%;
        top: 15px;
        left: 10px;
    }

    .auth-overlay {
        max-width: 40%;
        top: 15px;
        right: 10px;
    }

    /* Adjust Menu Button Size */
    .map-fab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

        .map-fab svg {
            width: 16px;
            height: 16px;
        }

        /* Ensure Menu Icon doesn't force width */
        .map-fab span {
            display: none; /* Hide "MENU" text, show only Icon */
        }
}
