/* --- THEME & VARIABLES --- */
:root {
    --bg-deep: #050b14;
    --card-bg: rgba(13, 17, 23, 0.75);
    --border-glow: rgba(0, 229, 255, 0.2);
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --accent-cyan: #00e5ff;
    --accent-cyan-hover: #00b8cc;
    --marker-yellow: #ffeb3b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at top, #1b2838 0%, var(--bg-deep) 100%);
    color: var(--text-main);
    font-family: 'Oswald', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}

/* =========================================
   NAVBAR STYLES
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5vw;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glow);
    z-index: 1000;
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-btn {
    background: transparent !important;
    color: var(--accent-cyan) !important;
    border: 1px solid var(--accent-cyan) !important;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    width: auto !important;
    box-shadow: none !important;
}

.nav-btn:hover {
    background: rgba(0, 229, 255, 0.1) !important;
    transform: none !important;
}

/* =========================================
   MODAL STYLES (The Fixes)
   ========================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 11, 20, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(22, 27, 34, 0.95);
    border: 1px solid var(--border-glow);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    text-align: left;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    color: var(--accent-cyan);
    font-size: 1.4rem;
    margin-bottom: 10px;
    margin-top: 20px;
}

.modal-content h2:first-of-type { margin-top: 0; }

.modal-content p {
    color: var(--text-muted);
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* CRITICAL FIX: Modal Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-size: 1.5rem !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
}

.close-modal:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* =========================================
   MAIN LAYOUT CARD
   ========================================= */
.container {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: clamp(20px, 5vw, 40px);
    border-radius: 20px;
    border: 1px solid var(--border-glow);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 550px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.drop-spot {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    min-height: 1.2em;
}

/* --- STATS BAR --- */
.stats-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid var(--border-glow);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 25px;
    background: var(--accent-cyan);
    opacity: 0.2;
}

/* --- BUTTON --- */
button#get-drop {
    background: var(--accent-cyan);
    color: var(--bg-deep);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    border: none;
    padding: 16px 24px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

button#get-drop:hover:not(:disabled) {
    background: var(--accent-cyan-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.4);
}

button#get-drop:disabled {
    background: #30363d;
    color: var(--text-muted);
    cursor: not-allowed;
}

/* --- MAP & MARKER --- */
.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.05);
}

.map-image { width: 100%; height: 100%; object-fit: cover; }
.map-image.loading { filter: blur(4px) brightness(0.5); }

.map-marker {
    position: absolute;
    width: clamp(30px, 8vw, 45px);
    height: clamp(30px, 8vw, 45px);
    background-color: rgba(255, 235, 59, 0.2);
    border: 3px solid var(--marker-yellow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--marker-yellow);
    z-index: 10;
    display: none;
}

/* --- UTILS --- */
.spinner-small {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid var(--bg-deep);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

.footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9em;
    color: var(--text-muted);
}

.footer a { color: var(--accent-cyan); text-decoration: none; }

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link-item {
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.nav-link-item:hover {
    color: var(--accent-cyan);
}

/* Mobile Fix: If the navbar gets too crowded, hide the text links or stack them */
@media (max-width: 480px) {
    .nav-link-item {
        display: none; /* Hides extra links on very small phones to prevent overlap */
    }
}
.map-marker::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    border: 2px solid var(--marker-yellow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ping-pulse 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping-pulse { 
    0% { width: 100%; height: 100%; opacity: 1; } 
    100% { width: 300%; height: 300%; opacity: 0; } 
}