/* GLOBAL DESIGN TOKENS */
:root {
    --bg-deep: #020617;
    --card-glass: rgba(15, 23, 42, 0.8);
    --accent-glow: #22d3ee;
    --hero-gradient: linear-gradient(180deg, rgba(2,6,23,0) 0%, rgba(2,6,23,0.3) 100%);
    --text-main: #f8fafc;
    --text-dim: #64748b;
    --tooltip-bg: #1e293b;
    
    /* Official Kp/G-Scale Colors */
    --kp-quiet: #4ade80;   /* Green (Kp 0-4) */
    --kp-g1: #facc15;      /* Yellow (Kp 5) */
    --kp-g2: #fb923c;      /* Orange (Kp 6) */
    --kp-g3: #f87171;      /* Red (Kp 7) */
    --kp-g4: #e11d48;      /* Deep Red (Kp 8) */
    --kp-g5: #a855f7;      /* Purple (Kp 9) */
}

/* BASE STYLES */
body { background-color: var(--bg-deep); color: var(--text-main); font-family: 'Inter', sans-serif; margin: 0; overflow-x: hidden; }

/* NAVIGATION */
nav { padding: 1.5rem 5%; display: flex; align-items: center; position: absolute; width: 100%; z-index: 10; box-sizing: border-box; }
.brand { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-size: 1.6rem; 
    font-weight: 800; 
    color: #fff; 
    text-decoration: none; 
    font-family: 'Orbitron', sans-serif; 
    letter-spacing: 2px;
}



/* Navigation & "Learn Science" Button Effect */
.learn-btn {
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    background: rgba(34, 211, 238, 0.1); 
    border: 1px solid var(--accent-glow); 
    padding: 8px 16px; 
    border-radius: 12px; 
    color: var(--accent-glow); 
    font-family: 'Orbitron'; 
    font-size: 0.75rem; 
    transition: all 0.3s ease;
}

.learn-btn:hover {
    background: var(--accent-glow);
    color: var(--bg-deep);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
    transform: translateY(-2px);
}



/* ANIMATED LOGO */
.aurora-icon {
    color: var(--accent-glow);
    filter: drop-shadow(0 0 8px var(--accent-glow));
    animation: aurora-pulse 3s infinite ease-in-out;
}

@keyframes aurora-pulse {
    0%, 100% { filter: drop-shadow(0 0 5px var(--accent-glow)); opacity: 0.8; }
    50% { filter: drop-shadow(0 0 15px #4ade80); opacity: 1; }
}

/* HERO HEADER */
.hero { height: 35vh; position: relative; background: url('aurora-header2.jpg') center/cover no-repeat; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5rem; }
.hero-overlay { position: absolute; inset: 0; background: var(--hero-gradient); }
.hero-content { position: relative; z-index: 2; text-align: center; }
.hero-content h1 { font-family: 'Orbitron', sans-serif; letter-spacing: 1px; margin-bottom: 0.5rem; }

/* MAIN CONTAINER & GRID */
.container { max-width: 1200px; margin: -4rem auto 4rem; padding: 0 20px; position: relative; z-index: 5; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }

/* CARD GLASSMORPHISM */
.card { 
    background: var(--card-glass); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 24px; 
    padding: 1.5rem; 
    backdrop-filter: blur(15px); 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: border-color 0.3s ease;
    cursor: pointer;
}
.card:hover { border-color: var(--accent-glow); }

/* DECORATIVE ICONS */
.info-icon { position: absolute; top: 1.2rem; right: 1.2rem; color: var(--text-dim); opacity: 0.5; z-index: 2; }
.card-status-icon { position: absolute; bottom: 1.2rem; right: 1.2rem; color: var(--text-dim); opacity: 0.3; pointer-events: none; }

/* TOOLTIP SYSTEM */
.tooltip-box {
    visibility: hidden; opacity: 0; position: absolute; bottom: 115%; left: 50%;
    transform: translateX(-50%) translateY(10px); width: 280px; background: var(--tooltip-bg);
    border: 1px solid var(--accent-glow); border-radius: 16px; padding: 1.2rem;
    color: #f8fafc; font-size: 0.85rem; line-height: 1.5; z-index: 1000; transition: all 0.3s ease;
}

/* RESPONSIVE TOOLTIPS */
@media (max-width: 768px) {
    .card.active .tooltip-box { visibility: visible; opacity: 1; position: fixed; bottom: 20px; left: 20px; right: 20px; width: auto; transform: none; }
}
@media (min-width: 769px) {
    .card:hover .tooltip-box { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* DATA DISPLAY */
.card-header { display: flex; justify-content: space-between; align-items: center; color: var(--text-dim); font-size: 0.95rem; font-weight: 700; text-transform: uppercase; }
.data-value { font-size: 2.8rem; font-weight: 800; margin: 0.8rem 0; line-height: 1; }
.unit { font-size: 0.9rem; color: var(--text-dim); font-weight: 400; }

/* CHART LEGEND */
.legend-container { display: flex; gap: 0.8rem; margin-top: 1.2rem; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.7rem; color: var(--text-dim); font-weight: 700; }
.legend-color { width: 10px; height: 10px; border-radius: 2px; }






/* SATELLITE MAP CARD */
.map-card { background: var(--card-glass); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; padding: 1.5rem; text-align: center; margin-bottom: 1.5rem; }
.map-container { width: 100%; border-radius: 16px; overflow: hidden; margin-top: 1rem; background: #000; }
.map-container img { width: 100%; height: auto; display: block; }

/* CITY PROBABILITY GRID */
.city-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.city-card { background: rgba(255,255,255,0.03); padding: 1rem; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s ease; }
.city-card.high-prob { border-color: rgba(249, 115, 22, 0.6); box-shadow: 0 0 15px rgba(249, 115, 22, 0.1); }
.progress-bg { width: 100%; background: #0f172a; height: 6px; border-radius: 10px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #22d3ee); border-radius: 10px; transition: width 1s ease-in-out; }

/* DATA ATTRIBUTION SECTION */
.attribution-card { background: var(--card-glass); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; padding: 1.5rem; backdrop-filter: blur(15px); }
.attribution-title { color: var(--accent-glow); font-size: 1rem; font-weight: 800; margin-bottom: 0.5rem; }
.attribution-text { color: var(--text-dim); font-size: 0.85rem; line-height: 1.6; }
.attribution-link { color: var(--accent-glow); text-decoration: none; font-weight: 700; }

/* FOOTER */
/*footer { text-align: center; padding: 4rem; color: #334155; font-size: 0.75rem; }*/
footer { text-align: center; padding: 4rem; color: #d3dae3; font-size: 0.85rem; }

/* MODAL / ANIMATION OVERLAY */
#animation-overlay {
    display: none; position: fixed; inset: 0; background: rgba(2, 6, 23, 0.9);
    z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(10px);
}
.modal-content {
    width: 90%; max-width: 900px; background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(34, 211, 238, 0.3); border-radius: 24px; padding: 2rem; position: relative;
}
.close-modal {
    position: absolute; top: 1.5rem; right: 1.5rem; cursor: pointer; color: var(--text-dim);
    background: none; border: none; font-size: 1.5rem;
}
.close-modal:hover { color: #fff; }
canvas#fieldCanvas { width: 100%; height: auto; max-height: 400px; background: #000; border-radius: 16px; border: 1px solid #1e293b; }
.anim-legend { display: flex; justify-content: center; gap: 20px; margin-top: 1rem; font-size: 0.8rem; color: #64748b; }
.anim-legend-item { display: flex; align-items: center; gap: 8px; }
.anim-dot { width: 8px; height: 8px; border-radius: 50%; }




/* Container to hold buttons in a row */
.nav-buttons-container {
    display: flex;
    gap: 8px;
    margin-left: auto; /* Pushes everything to the right on desktop */
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    nav {
        flex-direction: column; /* Brand on top, buttons below */
        align-items: center;
        padding: 1rem;
        gap: 12px;
        position: relative; /* Keeps it from overlapping hero text */
    }

    .nav-buttons-container {
        margin-left: 0; /* Centers buttons on mobile */
        width: 100%;
        justify-content: center;
    }

    .learn-btn {
        flex: 1; /* Makes both buttons equal width */
        justify-content: center;
        font-size: 0.7rem;
        padding: 8px 5px;
        white-space: nowrap; /* Prevents text from breaking into two lines */
    }
}




