/* CSS Variables for Astronomy Theme */
:root {
    /* Deep space background - dark navy with purple tones */
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1f3a;
    --bg-tertiary: #252b4a;
    
    /* Text colors - soft whites and light grays */
    --text-primary: #f0f4ff;
    --text-secondary: #b8c5e0;
    
    /* Astronomy accent colors - cosmic blues, purples, and golds */
    --accent-primary: #6b8dd6; /* Star blue */
    --accent-secondary: #9d7ce8; /* Nebula purple */
    --accent-warning: #ffd700; /* Star gold */
    --accent-nebula: #c77dff; /* Deep space purple */
    --accent-success: #4ecdc4; /* Teal */
    
    /* Borders and cards - subtle cosmic tones */
    --border-color: #2a3458;
    --card-bg: #1e2438;
    --card-hover: #2a3150;
    
    /* Shadows with subtle color tints */
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(107, 141, 214, 0.2);
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Animation speeds */
    --animation-slow: 60s;
    --animation-medium: 8s;
    --animation-fast: 4s;
}

/* 
 * Note: prefers-reduced-motion is intentionally NOT used for background animations
 * because the motion toggle button provides manual control.
 * System reduced motion preferences won't affect the cosmic background.
 */

/* Motion reduced state (toggle) - only affects cosmic background elements */
body.reduce-motion .sun,
body.reduce-motion .planet-1,
body.reduce-motion .planet-2,
body.reduce-motion .planet-3,
body.reduce-motion .planet-4,
body.reduce-motion .planet-5,
body.reduce-motion .planet-6,
body.reduce-motion .galaxy-1,
body.reduce-motion .galaxy-2,
body.reduce-motion .galaxy-3,
body.reduce-motion .orbit-container,
body.reduce-motion::before,
body.reduce-motion::after {
    animation-play-state: paused !important;
    opacity: 0.3;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    font-weight: 400;
}

/* Animated Starfield Background - More Visible */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 40% 80%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(1px 1px at 10% 60%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 70% 20%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 30% 90%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 15% 15%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(1px 1px at 35% 45%, rgba(107, 141, 214, 0.9), transparent),
        radial-gradient(1px 1px at 65% 25%, rgba(157, 124, 232, 0.8), transparent),
        radial-gradient(1px 1px at 85% 65%, rgba(107, 141, 214, 0.7), transparent),
        radial-gradient(1px 1px at 25% 85%, rgba(157, 124, 232, 0.9), transparent),
        radial-gradient(2px 2px at 55% 55%, rgba(255, 255, 255, 0.8), transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: starfield 60s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
}

/* Twinkling stars overlay - More Visible */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(1px 1px at 25% 25%, rgba(107, 141, 214, 1), transparent),
        radial-gradient(1px 1px at 75% 75%, rgba(157, 124, 232, 0.9), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(1px 1px at 10% 50%, rgba(107, 141, 214, 0.9), transparent),
        radial-gradient(1px 1px at 90% 90%, rgba(157, 124, 232, 0.8), transparent),
        radial-gradient(1px 1px at 40% 40%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(1px 1px at 60% 60%, rgba(107, 141, 214, 0.8), transparent),
        radial-gradient(1px 1px at 80% 20%, rgba(157, 124, 232, 0.9), transparent),
        radial-gradient(1px 1px at 20% 80%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 30% 30%, rgba(107, 141, 214, 1), transparent),
        radial-gradient(1px 1px at 45% 65%, rgba(157, 124, 232, 0.9), transparent),
        radial-gradient(1px 1px at 65% 35%, rgba(107, 141, 214, 0.8), transparent);
    background-size: 300% 300%;
    background-position: 0% 0%;
    animation: twinkle 8s ease-in-out infinite alternate, starfield 80s linear infinite reverse;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

@keyframes starfield {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

@keyframes twinkle {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Central Sun */
.sun {
    position: fixed;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 255, 200, 0.9) 0%,
        rgba(255, 220, 100, 0.8) 20%,
        rgba(255, 180, 50, 0.7) 40%,
        rgba(255, 140, 0, 0.6) 60%,
        rgba(255, 100, 0, 0.5) 80%,
        rgba(200, 80, 0, 0.4) 100%);
    box-shadow: 
        0 0 80px rgba(255, 255, 200, 0.8),
        0 0 120px rgba(255, 220, 100, 0.6),
        0 0 160px rgba(255, 180, 50, 0.4),
        0 0 200px rgba(255, 140, 0, 0.3),
        inset -20px -20px 40px rgba(255, 140, 0, 0.4);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    animation: sunPulse 4s ease-in-out infinite;
    filter: blur(0.5px);
}

@keyframes sunPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
}

/* Orbital Container for Planets */
.orbit-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 1px;
    pointer-events: none;
    z-index: 0;
}

/* Animated Planets - Orbital Movement */
.planet-1, .planet-2, .planet-3, .planet-4, .planet-5, .planet-6 {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform-origin: center;
}

.planet-1 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.7), rgba(255, 140, 0, 0.5), rgba(255, 100, 0, 0.3));
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.6), 0 0 100px rgba(255, 140, 0, 0.3), inset -15px -15px 30px rgba(255, 140, 0, 0.3);
    top: -60px;
    left: -60px;
    animation: orbit1 20s linear infinite;
    filter: blur(1px);
}

.planet-2 {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle at 30% 30%, rgba(157, 124, 232, 0.8), rgba(107, 141, 214, 0.6), rgba(99, 102, 241, 0.4));
    box-shadow: 0 0 50px rgba(157, 124, 232, 0.7), 0 0 80px rgba(107, 141, 214, 0.4), inset -12px -12px 25px rgba(107, 141, 214, 0.4);
    top: -45px;
    left: -45px;
    animation: orbit2 25s linear infinite;
    animation-delay: -3s;
    filter: blur(0.8px);
}

.planet-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 30% 30%, rgba(107, 141, 214, 0.7), rgba(99, 102, 241, 0.5), rgba(79, 70, 229, 0.3));
    box-shadow: 0 0 70px rgba(107, 141, 214, 0.6), 0 0 120px rgba(99, 102, 241, 0.3), inset -18px -18px 35px rgba(99, 102, 241, 0.3);
    top: -75px;
    left: -75px;
    animation: orbit3 30s linear infinite;
    animation-delay: -6s;
    filter: blur(1.2px);
}

.planet-4 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.6), rgba(255, 200, 0, 0.4), rgba(255, 180, 0, 0.3));
    box-shadow: 0 0 55px rgba(255, 215, 0, 0.5), 0 0 90px rgba(255, 200, 0, 0.3), inset -12px -12px 25px rgba(255, 200, 0, 0.25);
    top: -50px;
    left: -50px;
    animation: orbit4 22s linear infinite;
    animation-delay: -9s;
    filter: blur(0.8px);
}

.planet-5 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, rgba(236, 72, 153, 0.7), rgba(219, 39, 119, 0.5), rgba(190, 24, 93, 0.3));
    box-shadow: 0 0 45px rgba(236, 72, 153, 0.6), 0 0 75px rgba(219, 39, 119, 0.3), inset -10px -10px 20px rgba(219, 39, 119, 0.3);
    top: -40px;
    left: -40px;
    animation: orbit5 18s linear infinite;
    animation-delay: -12s;
    filter: blur(0.7px);
}

.planet-6 {
    width: 110px;
    height: 110px;
    background: radial-gradient(circle at 30% 30%, rgba(34, 197, 94, 0.6), rgba(22, 163, 74, 0.4), rgba(21, 128, 61, 0.3));
    box-shadow: 0 0 60px rgba(34, 197, 94, 0.5), 0 0 95px rgba(22, 163, 74, 0.3), inset -13px -13px 26px rgba(22, 163, 74, 0.25);
    top: -55px;
    left: -55px;
    animation: orbit6 24s linear infinite;
    animation-delay: -15s;
    filter: blur(0.9px);
}

/* Galaxies/Nebulae */
.galaxy-1, .galaxy-2, .galaxy-3 {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.galaxy-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(ellipse 60% 40% at 50% 50%, 
        rgba(157, 124, 232, 0.5) 0%, 
        rgba(107, 141, 214, 0.3) 30%, 
        rgba(99, 102, 241, 0.2) 50%, 
        transparent 70%);
    box-shadow: 0 0 100px rgba(157, 124, 232, 0.4), 0 0 150px rgba(107, 141, 214, 0.2);
    top: 5%;
    left: -200px;
    animation: galaxyMove1 40s linear infinite;
    filter: blur(3px);
    transform: rotate(45deg);
}

.galaxy-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(ellipse 50% 35% at 50% 50%, 
        rgba(236, 72, 153, 0.4) 0%, 
        rgba(219, 39, 119, 0.3) 25%, 
        rgba(190, 24, 93, 0.2) 45%, 
        transparent 65%);
    box-shadow: 0 0 90px rgba(236, 72, 153, 0.3), 0 0 130px rgba(219, 39, 119, 0.2);
    top: 50%;
    right: -200px;
    animation: galaxyMove2 45s linear infinite;
    animation-delay: -15s;
    filter: blur(2.5px);
    transform: rotate(-30deg);
}

.galaxy-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(ellipse 55% 38% at 50% 50%, 
        rgba(107, 141, 214, 0.5) 0%, 
        rgba(99, 102, 241, 0.3) 28%, 
        rgba(79, 70, 229, 0.2) 48%, 
        transparent 68%);
    box-shadow: 0 0 80px rgba(107, 141, 214, 0.4), 0 0 120px rgba(99, 102, 241, 0.2);
    top: 80%;
    left: -200px;
    animation: galaxyMove3 38s linear infinite;
    animation-delay: -20s;
    filter: blur(2px);
    transform: rotate(60deg);
}

/* Orbital Animations - Circular Orbits */
@keyframes orbit1 {
    0% { transform: rotate(0deg) translateX(250px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(250px) rotate(-360deg); }
}

@keyframes orbit2 {
    0% { transform: rotate(0deg) translateX(320px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(320px) rotate(-360deg); }
}

@keyframes orbit3 {
    0% { transform: rotate(0deg) translateX(400px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(400px) rotate(-360deg); }
}

@keyframes orbit4 {
    0% { transform: rotate(0deg) translateX(280px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(280px) rotate(-360deg); }
}

@keyframes orbit5 {
    0% { transform: rotate(0deg) translateX(200px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(200px) rotate(-360deg); }
}

@keyframes orbit6 {
    0% { transform: rotate(0deg) translateX(360px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(360px) rotate(-360deg); }
}

/* Planet Self-Rotation */
@keyframes planetRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes galaxyMove1 {
    0% { transform: translateX(0) translateY(0) rotate(45deg); }
    50% { transform: translateX(calc(100vw + 400px)) translateY(100px) rotate(225deg); }
    100% { transform: translateX(0) translateY(0) rotate(405deg); }
}

@keyframes galaxyMove2 {
    0% { transform: translateX(0) translateY(0) rotate(-30deg); }
    50% { transform: translateX(calc(-100vw - 400px)) translateY(-80px) rotate(150deg); }
    100% { transform: translateX(0) translateY(0) rotate(330deg); }
}

@keyframes galaxyMove3 {
    0% { transform: translateX(0) translateY(0) rotate(60deg); }
    50% { transform: translateX(calc(100vw + 400px)) translateY(-60px) rotate(240deg); }
    100% { transform: translateX(0) translateY(0) rotate(420deg); }
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ==========================================
   HEADER STYLES - Redesigned
   ========================================== */
.main-header {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.98) 0%, rgba(37, 43, 74, 0.98) 50%, rgba(30, 36, 56, 0.98) 100%);
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 30px rgba(107, 141, 214, 0.2), 0 0 60px rgba(157, 124, 232, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(107, 141, 214, 0.3);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

/* Condensed header on scroll */
.main-header.condensed {
    padding: 0.5rem 1.5rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.main-header.condensed .site-title {
    font-size: 1.5rem;
}

.main-header.condensed .location-subtitle {
    display: none;
}

/* Starfield background for header */
.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 15% 40%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 45% 60%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(2px 2px at 75% 30%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 25% 70%, rgba(107, 141, 214, 0.9), transparent),
        radial-gradient(1px 1px at 55% 20%, rgba(157, 124, 232, 0.8), transparent),
        radial-gradient(2px 2px at 85% 80%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 35% 50%, rgba(107, 141, 214, 0.8), transparent),
        radial-gradient(1px 1px at 65% 10%, rgba(157, 124, 232, 0.9), transparent);
    background-size: 150% 150%;
    background-position: 0% 0%;
    animation: starfield 40s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

.main-header > * {
    position: relative;
    z-index: 1;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #f0f4ff 0%, #6b8dd6 50%, #9d7ce8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    transition: font-size 0.3s ease;
}

.title-icon {
    font-size: 1.5rem;
    animation: titlePulse 2s ease-in-out infinite;
    -webkit-text-fill-color: var(--accent-warning);
}

@keyframes titlePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.location-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
}

.location-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(78, 205, 196, 0); }
}

/* Motion Toggle Button */
.motion-toggle {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.motion-toggle:hover {
    background: rgba(107, 141, 214, 0.3);
    border-color: var(--accent-primary);
}

.motion-toggle .motion-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

body.reduce-motion .motion-toggle {
    background: rgba(157, 124, 232, 0.3);
    border-color: var(--accent-secondary);
}

body.reduce-motion .motion-toggle .motion-icon {
    opacity: 0.5;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-button {
    font-family: var(--font-body);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-button .nav-icon {
    font-size: 1rem;
}

.nav-button:hover {
    background-color: rgba(107, 141, 214, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(107, 141, 214, 0.3);
    transform: translateY(-2px);
}

.nav-button.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(107, 141, 214, 0.4), 0 0 30px rgba(157, 124, 232, 0.2);
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeInSection 0.4s ease-out;
}

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

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.section-description {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==========================================
   QUICK ACTIONS BAR
   ========================================== */
.quick-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(30, 36, 56, 0.9) 0%, rgba(37, 43, 74, 0.9) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    gap: 1rem;
}

.refresh-button {
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-nebula) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(157, 124, 232, 0.3);
}

.refresh-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(157, 124, 232, 0.5);
}

.refresh-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-icon {
    transition: transform 0.3s ease;
}

.refresh-button:hover .refresh-icon {
    transform: rotate(180deg);
}

.filter-toggle-mobile {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-toggle-mobile:hover {
    background: rgba(107, 141, 214, 0.2);
    border-color: var(--accent-primary);
}

.filter-count {
    background: var(--accent-primary);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================
   CONTROLS SECTION
   ========================================== */
.controls-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.search-container {
    width: 100%;
}

.search-input {
    font-family: var(--font-body);
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    background-color: rgba(30, 36, 56, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(107, 141, 214, 0.2), 0 0 20px rgba(107, 141, 214, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ==========================================
   LOCATION CONTAINER
   ========================================== */
.location-container {
    width: 100%;
    margin-top: 0.5rem;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    width: 100%;
}

.location-status-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.location-status {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.5rem 0;
}

.location-status.location-active {
    color: var(--accent-primary);
    font-weight: 500;
}

.location-privacy {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-style: italic;
}

.location-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.location-button {
    font-family: var(--font-body);
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-button:hover:not(:disabled) {
    background-color: var(--card-bg);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 141, 214, 0.2);
}

.location-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.location-button-secondary {
    background-color: var(--bg-secondary);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* ==========================================
   EVENTS LAYOUT - Sidebar + Content
   ========================================== */
.events-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* ==========================================
   FILTER PANEL - Left Sidebar
   ========================================== */
.filter-panel {
    background: linear-gradient(180deg, rgba(30, 36, 56, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-header h2 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 1px;
}

.filter-close-mobile {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Events Content - Main Area */
.events-content {
    flex: 1;
    min-width: 0;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    position: relative;
}

.filter-checkbox:hover {
    background-color: rgba(107, 141, 214, 0.1);
}

.filter-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-color: transparent;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
    user-select: none;
    line-height: 1.3;
    font-family: var(--font-body);
}

.filter-emoji {
    font-size: 1rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.filter-action-btn {
    flex: 1;
    padding: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-action-btn:hover {
    background: rgba(107, 141, 214, 0.2);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* ==========================================
   EVENTS SECTION & CARDS
   ========================================== */
.events-section {
    margin-bottom: 2rem;
}

.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Event Card Styles - Enhanced */
.event-card {
    background: linear-gradient(145deg, rgba(30, 36, 56, 0.9) 0%, rgba(26, 31, 58, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    animation: fadeIn 0.5s ease-in;
    backdrop-filter: blur(10px);
}

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

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-nebula) 100%);
    transition: height 0.3s ease;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(107, 141, 214, 0.3), 0 0 50px rgba(157, 124, 232, 0.15);
    border-color: rgba(107, 141, 214, 0.5);
}

.event-card:hover::before {
    height: 6px;
}

/* Event card content wrapper */
.event-card > *:not(.event-image):not(.event-image-container):not(.event-video-container):not(.event-video-thumbnail) {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.event-card > *:first-child:not(.event-image):not(.event-image-container) {
    padding-top: 1.25rem;
}

.event-card > *:last-child {
    padding-bottom: 1.25rem;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.25rem !important;
}

.event-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 180px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* Enhanced Category Pills */
.event-category {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.category-meteor {
    background: linear-gradient(135deg, #9d7ce8 0%, #c77dff 100%);
    color: white;
    box-shadow: 0 3px 15px rgba(157, 124, 232, 0.5);
}

.category-planet {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #0a0e27;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.5);
}

.category-iss {
    background: linear-gradient(135deg, #6b8dd6 0%, #4a90e2 100%);
    color: white;
    box-shadow: 0 3px 15px rgba(107, 141, 214, 0.5);
}

.category-workshop {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    box-shadow: 0 3px 15px rgba(255, 107, 107, 0.5);
}

.category-apod {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 3px 15px rgba(99, 102, 241, 0.5);
}

.category-solar {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    color: white;
    box-shadow: 0 3px 15px rgba(255, 140, 66, 0.5);
}

.category-natural {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    box-shadow: 0 3px 15px rgba(78, 205, 196, 0.5);
}

.category-astronomy {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 3px 15px rgba(167, 139, 250, 0.5);
}

.event-datetime {
    font-family: var(--font-body);
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.event-countdown {
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    width: fit-content;
}

.event-time-upcoming {
    background: linear-gradient(135deg, rgba(107, 141, 214, 0.2) 0%, rgba(157, 124, 232, 0.15) 100%);
    color: var(--accent-primary);
    border: 1px solid rgba(107, 141, 214, 0.4);
}

.event-time-passed {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.2);
    opacity: 0.7;
}

.countdown-text {
    font-variant-numeric: tabular-nums;
}

.event-passed-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    background-color: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-card-passed {
    opacity: 0.75;
}

.event-card-passed::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-secondary), transparent);
    opacity: 0.3;
}

.event-description {
    font-family: var(--font-body);
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.event-location {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-visibility {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.event-visibility strong {
    color: var(--text-primary);
}

/* Event Images - Larger for APOD */
.event-image {
    width: 100%;
    border-radius: 0;
    margin-bottom: 0;
    max-height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-image {
    transform: scale(1.02);
}

.event-image-container {
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
}

.event-video-thumbnail {
    position: relative;
    display: block;
    overflow: hidden;
}

.event-video-thumbnail .event-image {
    display: block;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(107, 141, 214, 0.9) 0%, rgba(157, 124, 232, 0.9) 100%);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(107, 141, 214, 0.5);
}

.event-video-thumbnail:hover .video-play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 30px rgba(107, 141, 214, 0.7);
}

.video-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(30, 36, 56, 0.9) 100%);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-video-container {
    width: 100%;
    margin-bottom: 0;
    overflow: hidden;
}

.event-video-container video {
    width: 100%;
    max-height: 250px;
}

.event-video-link {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    text-align: center;
}

.event-video-link a {
    font-family: var(--font-body);
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.event-video-link a:hover {
    text-decoration: underline;
}

.event-source {
    margin-top: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.7;
}

.event-detail-image {
    margin-bottom: 1.5rem;
}

.event-detail-image img {
    width: 100%;
    border-radius: 12px;
    max-height: 500px;
    object-fit: contain;
    background-color: var(--bg-secondary);
}

.event-detail-video {
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--bg-secondary);
}

.event-detail-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

.event-detail-video video {
    width: 100%;
    border-radius: 12px;
    max-height: 500px;
    background-color: var(--bg-secondary);
}

.event-detail-video .external-link {
    display: block;
    margin-top: 0.5rem;
    text-align: center;
    font-family: var(--font-body);
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.event-detail-video .external-link:hover {
    text-decoration: underline;
}

.hd-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-family: var(--font-body);
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.hd-link:hover {
    text-decoration: underline;
}

/* ==========================================
   NO EVENTS / EMPTY STATE - Animated
   ========================================== */
.no-events {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-family: var(--font-body);
    background: linear-gradient(145deg, rgba(30, 36, 56, 0.5) 0%, rgba(26, 31, 58, 0.5) 100%);
    border-radius: 16px;
    border: 1px dashed var(--border-color);
}

.no-events-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-5px) rotate(5deg); }
}

.no-events p {
    margin-bottom: 0.5rem;
}

.no-events p:first-of-type {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

/* ==========================================
   GLOSSARY STYLES - Enhanced
   ========================================== */
.glossary-header {
    margin-bottom: 0;
}

.glossary-hero {
    position: relative;
    padding: 3rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
}

.glossary-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(107, 141, 214, 0.2) 0%, rgba(157, 124, 232, 0.2) 50%, rgba(199, 125, 255, 0.2) 100%);
    z-index: 0;
}

.glossary-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 80% 60%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 40% 80%, rgba(255, 255, 255, 0.5), transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
}

.glossary-hero h2,
.glossary-hero .section-description {
    position: relative;
    z-index: 1;
}

.glossary-hero h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.glossary-search-wrapper {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.glossary-search {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background: rgba(30, 36, 56, 0.9);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.glossary-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(107, 141, 214, 0.2), 0 0 30px rgba(107, 141, 214, 0.1);
}

.glossary-search::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.glossary-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.glossary-category {
    margin-bottom: 2.5rem;
}

.glossary-category h3 {
    font-family: var(--font-display);
    color: var(--accent-primary);
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.glossary-category h3::before {
    content: '◈';
    color: var(--accent-secondary);
}

.glossary-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.glossary-item {
    background: linear-gradient(145deg, rgba(30, 36, 56, 0.8) 0%, rgba(26, 31, 58, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.glossary-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(107, 141, 214, 0.2);
    border-color: rgba(107, 141, 214, 0.4);
}

.glossary-item strong {
    font-family: var(--font-display);
    color: var(--accent-secondary);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.glossary-item p {
    font-family: var(--font-body);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* ==========================================
   EVENT DETAIL SECTION
   ========================================== */
.event-detail-section {
    background: linear-gradient(145deg, rgba(30, 36, 56, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    display: none;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.event-detail-section.active {
    display: block;
    animation: slideUp 0.4s ease-out;
}

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

.event-detail-section h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.event-detail-section .event-datetime {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.event-detail-section .event-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    -webkit-line-clamp: unset;
}

/* ==========================================
   FOOTER
   ========================================== */
.main-footer {
    background: linear-gradient(180deg, rgba(26, 31, 58, 0.98) 0%, rgba(10, 14, 39, 0.98) 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(107, 141, 214, 0.2);
    margin-top: auto;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    position: relative;
    z-index: 1;
}

.main-footer p {
    font-family: var(--font-body);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.footer-credit {
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-apis {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 0.5rem;
}

/* ==========================================
   GIBS MAP SECTION
   ========================================== */
.map-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(30, 36, 56, 0.9) 0%, rgba(26, 31, 58, 0.9) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.layer-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 200px;
}

.layer-controls label {
    font-family: var(--font-body);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.layer-select {
    flex: 1;
    padding: 0.6rem 0.75rem;
    font-family: var(--font-body);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.map-button {
    font-family: var(--font-body);
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #5a7dc6 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.map-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 141, 214, 0.4);
}

/* Loading Progress Bar */
.loading-progress-container {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: linear-gradient(145deg, rgba(30, 36, 56, 0.9) 0%, rgba(26, 31, 58, 0.9) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.loading-progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-nebula));
    background-size: 200% 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-progress-text {
    text-align: center;
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.map-container,
#gibs-map {
    width: 100%;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(107, 141, 214, 0.3);
    background-color: var(--bg-secondary);
    margin-bottom: 0;
    margin-top: 1rem;
    position: relative;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4), inset 0 0 60px rgba(107, 141, 214, 0.1);
}

.map-container .leaflet-container {
    width: 100% !important;
    height: 100% !important;
    background-color: #e8f4f8 !important;
}

.map-container .leaflet-tile-container img {
    max-width: none !important;
}

.map-info {
    padding: 1rem;
    background: linear-gradient(145deg, rgba(30, 36, 56, 0.8) 0%, rgba(26, 31, 58, 0.8) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Map Info Bar */
.map-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    background: linear-gradient(145deg, rgba(20, 25, 40, 0.9) 0%, rgba(15, 20, 35, 0.9) 100%);
    border-radius: 8px;
    border: 1px solid rgba(100, 150, 255, 0.2);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.layer-info {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.layer-info small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.map-tips {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.map-buttons {
    display: flex;
    gap: 0.5rem;
}

.layer-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ==========================================
   SKY MAP SECTION - Stellarium-inspired
   ========================================== */

/* Control Bar */
.sky-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.95) 0%, rgba(10, 15, 30, 0.95) 100%);
    border-radius: 12px;
    border: 1px solid rgba(100, 150, 255, 0.2);
    backdrop-filter: blur(10px);
    align-items: center;
    row-gap: 0.75rem;
}

.sky-control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Sky Buttons */
.sky-btn {
    font-family: var(--font-body);
    padding: 0.5rem 0.9rem;
    background: rgba(100, 150, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.sky-btn:hover {
    background: rgba(100, 150, 255, 0.25);
    border-color: rgba(100, 150, 255, 0.5);
    transform: translateY(-1px);
}

.sky-btn:active {
    transform: translateY(0);
}

.sky-btn-primary {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.3) 0%, rgba(150, 100, 255, 0.3) 100%);
    border-color: rgba(100, 150, 255, 0.5);
}

.sky-btn-primary:hover {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.5) 0%, rgba(150, 100, 255, 0.5) 100%);
}

/* Direction Buttons */
.sky-directions {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem;
    border-radius: 8px;
    gap: 0.25rem;
}

.sky-dir {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Toggle Switches */
.sky-toggles {
    gap: 1rem;
}

.sky-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.sky-toggle-label:hover {
    color: var(--text-primary);
}

.sky-toggle-label input[type="checkbox"] {
    display: none;
}

.sky-toggle-switch {
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sky-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sky-toggle-label input:checked + .sky-toggle-switch {
    background: linear-gradient(135deg, #6b8dd6 0%, #9d7ce8 100%);
    border-color: transparent;
}

.sky-toggle-label input:checked + .sky-toggle-switch::after {
    left: calc(100% - 16px);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Time Controls */
.sky-time-controls {
    margin-left: auto;
    gap: 0.35rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.sky-time-btn {
    width: 36px;
    height: 32px;
    padding: 0;
    justify-content: center;
    font-size: 0.9rem;
}

.sky-time-indicator {
    padding: 0.4rem 0.7rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    color: rgba(150, 200, 255, 0.9);
    min-width: 40px;
    text-align: center;
}

/* Sky Clock Display */
.sky-clock-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(20, 30, 60, 0.95) 0%, rgba(10, 20, 40, 0.95) 100%);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 8px;
    width: 145px;
    min-width: 145px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(100, 150, 255, 0.05);
}

.sky-clock-time {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: #7dd3fc;
    text-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
    letter-spacing: 1px;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.sky-clock-date {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: rgba(150, 180, 220, 0.8);
    margin-top: 2px;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

/* Sky Map Container */
.sky-map-container {
    position: relative;
    width: 100%;
    height: 550px;
    margin-top: 0.5rem;
    border-radius: 12px;
    overflow: hidden;
    background: #0a0d1a;
    border: 2px solid rgba(100, 150, 255, 0.2);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 
                inset 0 0 100px rgba(100, 150, 255, 0.05);
}

#skyCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#skyCanvas:active {
    cursor: grabbing;
}

/* Compass Overlay */
.sky-compass {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none; /* Hidden by default, shown in compass mode */
}

.compass-n, .compass-e, .compass-s, .compass-w {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: rgba(255, 200, 100, 0.7);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Zoom Controls */
.sky-zoom-controls {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sky-zoom-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(15, 20, 40, 0.9);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sky-zoom-btn:hover {
    background: rgba(100, 150, 255, 0.2);
    border-color: rgba(100, 150, 255, 0.5);
}

/* Legend Bar */
.sky-legend {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1.25rem;
    margin-top: 0.75rem;
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.8) 0%, rgba(10, 15, 30, 0.8) 100%);
    border-radius: 8px;
    border: 1px solid rgba(100, 150, 255, 0.15);
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.star {
    background: radial-gradient(circle, #ffffff 0%, #aaccff 100%);
    box-shadow: 0 0 6px rgba(200, 220, 255, 0.5);
}

.legend-dot.planet {
    background: radial-gradient(circle, #ffd700 0%, #ff8c00 100%);
    box-shadow: 0 0 6px rgba(255, 200, 100, 0.5);
}

.legend-line {
    width: 20px;
    height: 2px;
    background: rgba(100, 180, 255, 0.5);
}

/* Responsive Sky Map */
@media (max-width: 768px) {
    .sky-controls {
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .sky-control-group {
        width: 100%;
        justify-content: center;
    }
    
    .sky-time-controls {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .sky-toggles {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sky-map-container {
        height: 400px;
    }
    
    .sky-legend {
        gap: 1rem;
    }
}

.visible-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.visible-event-item {
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    font-family: var(--font-body);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.visible-event-item strong {
    color: var(--accent-primary);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (min-width: 768px) {
    .events-container {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    }

    .site-title {
        font-size: 2.25rem;
    }

    .location-info {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Mobile and Tablet Optimizations */
@media (max-width: 767px) {
    /* Header adjustments */
    .main-header {
        padding: 1rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-content {
        align-items: center;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .location-subtitle {
        font-size: 0.85rem;
        justify-content: center;
    }

    .motion-toggle {
        top: 1rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
    }

    /* Navigation buttons */
    .main-nav {
        justify-content: center;
        width: 100%;
    }

    .nav-button {
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .nav-button .nav-text {
        display: none;
    }

    .nav-button .nav-icon {
        font-size: 1.2rem;
    }

    /* Main content */
    .main-content {
        padding: 1rem 0.75rem;
    }

    /* Quick actions bar */
    .quick-actions-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .refresh-button {
        width: 100%;
        justify-content: center;
    }

    .filter-toggle-mobile {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    /* Events layout - stack vertically on mobile */
    .events-layout {
        flex-direction: column;
        gap: 1rem;
    }

    /* Filter panel - modal on mobile */
    .filter-panel {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        z-index: 200;
        overflow-y: auto;
        padding: 1.5rem;
    }

    .filter-panel.open {
        display: block;
        animation: slideInFromBottom 0.3s ease-out;
    }

    @keyframes slideInFromBottom {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    .filter-close-mobile {
        display: block;
    }

    /* Event cards - single column */
    .events-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .event-card {
        min-height: auto;
    }

    .event-title {
        font-size: 1rem;
    }

    /* Search input */
    .search-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: 44px;
    }

    /* Location info */
    .location-info {
        flex-direction: column;
        align-items: stretch;
    }

    .location-buttons {
        width: 100%;
    }

    .location-button {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 1.4rem;
    }

    /* Map and sky map containers */
    .map-container,
    .sky-map-container {
        height: 350px;
    }

    /* Map controls */
    .map-controls,
    .sky-controls {
        flex-direction: column;
    }

    .layer-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .map-button {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    /* Glossary */
    .glossary-hero {
        padding: 2rem 1rem;
    }

    .glossary-hero h2 {
        font-size: 1.5rem;
    }

    .glossary-items {
        grid-template-columns: 1fr;
    }

    /* Event detail section */
    .event-detail-section {
        padding: 1.25rem;
    }

    .event-detail-section h2 {
        font-size: 1.4rem;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .main-content {
        padding: 1.5rem 1rem;
    }

    .events-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.25rem;
    }

    .filter-panel {
        width: 200px;
    }

    .map-container,
    .sky-map-container {
        height: 450px;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding: 2rem;
    }

    .events-container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .filter-panel {
        max-height: calc(100vh - 140px);
    }

    .map-container,
    .sky-map-container {
        height: 600px;
    }
}

@media (min-width: 1400px) {
    .events-container {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    }
}

/* ==========================================
   LOADING STATE
   ========================================== */
.loading {
    text-align: center;
    padding: 3rem;
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
