/**
 * Rdata: The Freedom Quest - Enhanced Game Styles
 * Mobile-First Responsive Design with Gamification
 */

/* ============================================
   MOBILE-FIRST BASE STYLES
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    z-index: -1;
}

/* ============================================
   NAVIGATION - MOBILE FIRST
   ============================================ */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    z-index: 2000;
    animation: slideDown 0.5s ease-out;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

nav ul li a {
    color: #00ffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 5px;
    display: inline-block;
}

nav ul li a:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

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

/* ============================================
   LOADING SCREEN
   ============================================ */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loading-screen p {
    font-size: 1.5rem;
    color: #00ffff;
    margin-top: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#loading-screen::after {
    content: '';
    border: 4px solid rgba(0, 255, 255, 0.2);
    border-top: 4px solid #00ffff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   GLOBE CONTAINER
   ============================================ */

#globe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ============================================
   MISSION BANNER - COMPACT MOBILE
   ============================================ */

.mission-banner {
    position: fixed;
    top: 52px;
    left: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 12px;
    padding: 12px;
    z-index: 1500;
    animation: slideInFromTop 0.5s ease-out;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.2);
}

.mission-banner.minimized {
    padding: 8px 12px;
    max-height: 45px;
    overflow: hidden;
}

.mission-banner.minimized .mission-content {
    display: none;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mission-banner-toggle {
    position: absolute;
    top: 8px;
    right: 12px;
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid rgba(0, 255, 255, 0.5);
    color: #00ffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
}

.mission-banner-toggle:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
    transform: scale(1.1);
}

.mission-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.mission-pillar {
    text-align: center;
    padding: 10px 8px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.mission-pillar:nth-child(1) { animation-delay: 0.05s; }
.mission-pillar:nth-child(2) { animation-delay: 0.1s; }
.mission-pillar:nth-child(3) { animation-delay: 0.15s; }
.mission-pillar:nth-child(4) { animation-delay: 0.2s; }

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

.mission-pillar:active {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.5);
    transform: scale(0.98);
}

.pillar-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.mission-pillar h3 {
    color: #00ffff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mission-pillar p {
    color: #ffffff;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ============================================
   GAME PANELS - MOBILE OPTIMIZED
   ============================================ */

/* Peace Dashboard */
.peace-dashboard {
    position: fixed;
    top: 125px;
    left: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out 0.3s both;
}

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

.dashboard-title {
    margin: 0 0 12px 0;
    font-size: 1.1em;
    text-align: center;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    font-weight: 700;
}

.global-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

.stat-icon {
    font-size: 1.3em;
    text-align: center;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.65em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    font-size: 0.85em;
    font-weight: bold;
    color: #fff;
}

/* Peace Progress Bar - Enhanced Gamification */
.peace-progress {
    margin-top: 12px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(76, 175, 80, 0.3);
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #4CAF50);
    background-size: 200% 100%;
    border-radius: 12px;
    transition: width 0.8s ease;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    animation: shimmer 2s ease-in-out infinite;
    position: relative;
}

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

/* Add sparkling effect when progress increases */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.progress-hint {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: 6px;
    font-style: italic;
}

/* ============================================
   PLAYER PROFILE - GAMIFIED
   ============================================ */

.player-profile {
    position: fixed;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(156, 39, 176, 0.4);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.2);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out 0.4s both;
    max-height: 45vh;
    overflow-y: auto;
}

.player-profile.minimized {
    max-height: 50px;
    overflow: hidden;
}

.player-profile.minimized .profile-content {
    display: none;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.profile-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #9C27B0;
    font-weight: 700;
}

.profile-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.profile-toggle:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.profile-info {
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.profile-value {
    font-size: 0.85em;
    color: #fff;
    font-weight: bold;
}

/* Gamification: Achievement Badges */
.achievement-badge {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    color: #000;
    margin-left: 6px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
   MISSION CONTROL - MOBILE OPTIMIZED
   ============================================ */

.mission-control {
    display: none; /* Hidden by default on mobile, show when needed */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(33, 150, 243, 0.4);
    border-radius: 15px;
    padding: 18px;
    width: calc(100% - 32px);
    max-width: 400px;
    max-height: 70vh;
    color: #fff;
    z-index: 2500;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.mission-control.active {
    display: block;
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(33, 150, 243, 0.3);
}

.mission-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2196F3;
    font-weight: 700;
}

.mission-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mission-toggle:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.mission-list {
    max-height: calc(70vh - 140px);
    overflow-y: auto;
    margin-bottom: 12px;
}

/* Mission Cards - Enhanced Gamification */
.mission-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--mission-color, #2196F3);
    transition: width 0.3s ease;
}

.mission-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.1);
}

.mission-card:active::before {
    width: 8px;
}

.mission-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mission-icon {
    font-size: 1.8em;
    min-width: 40px;
    text-align: center;
}

.mission-info {
    flex: 1;
}

.mission-type {
    font-size: 0.75em;
    font-weight: 700;
    color: var(--mission-color, #2196F3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.mission-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.mission-description {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    margin-bottom: 8px;
}

.mission-reward {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8em;
    color: #FFD700;
    font-weight: 600;
}

.mission-reward::before {
    content: '⭐';
}

/* No missions state */
.no-missions {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.no-missions p {
    margin-bottom: 10px;
    font-size: 0.9em;
}

/* ============================================
   BUTTONS - GAMIFIED
   ============================================ */

.btn-primary {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: 2px solid #2196F3;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

/* ============================================
   GLOBAL AWARENESS LEGEND - COMPACT
   ============================================ */

.global-awareness-legend {
    position: fixed;
    top: 300px;
    left: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px;
    z-index: 999;
    animation: fadeIn 0.5s ease-out 0.5s both;
    max-height: 35vh;
    overflow-y: auto;
}

.legend-title {
    font-size: 1em;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-layers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-layer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legend-layer:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

.legend-layer.active {
    background: rgba(0, 255, 255, 0.15);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.layer-icon {
    font-size: 1.5em;
    min-width: 30px;
    text-align: center;
}

.layer-name {
    flex: 1;
    font-size: 0.85em;
    font-weight: 600;
    color: #fff;
}

/* ============================================
   HUD (NASA Toolkit) - COMPACT
   ============================================ */

#hud {
    position: fixed;
    bottom: 50vh;
    left: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px;
    z-index: 998;
    animation: fadeIn 0.5s ease-out 0.6s both;
    max-height: 40vh;
    overflow-y: auto;
    display: none; /* Hidden by default on mobile */
}

#hud.active {
    display: block;
}

#hud-title,
#nasa-title {
    font-size: 1em;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    text-align: center;
}

#nasa-subtitle {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 10px;
    font-style: italic;
}

#hud-row,
#nasa-row,
#nasa-search-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

#nasa-key,
#nasa-search {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 0.85em;
}

button {
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 6px;
    color: #00ffff;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:active {
    background: rgba(0, 255, 255, 0.3);
    transform: scale(0.98);
}

#nasa-results {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

/* ============================================
   FOOTER - MOBILE FRIENDLY
   ============================================ */

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px 16px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
    text-align: center;
    z-index: 500;
    pointer-events: none;
}

footer > * {
    pointer-events: auto;
}

.footer-mission-sections {
    display: none; /* Hide detailed footer on mobile */
}

.footer-copyright {
    font-size: 0.7rem;
    color: rgba(0, 255, 255, 0.7);
    margin: 0;
}

/* ============================================
   MOBILE RESPONSIVE (below 768px)
   ============================================ */

@media (max-width: 767px) {
    /* Fix navigation for mobile - change from fixed to relative */
    nav {
        position: relative;
        padding: 10px 15px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 5px;
        align-items: stretch;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    /* Fix footer for mobile - change from fixed to relative */
    footer {
        position: relative;
        bottom: auto;
        padding: 15px;
        background: rgba(0, 0, 0, 0.95);
        margin-top: 20px;
    }
    
    /* Ensure body content doesn't get squished */
    body {
        overflow-x: hidden;
        padding-top: 0;
        padding-bottom: 0;
    }
    
    /* Adjust main content area */
    main {
        margin-top: 0;
        padding: 15px;
    }
}

/* ============================================
   TABLET RESPONSIVE (768px+)
   ============================================ */

@media (min-width: 768px) {
    nav {
        padding: 15px 30px;
    }
    
    nav ul li a {
        font-size: 1rem;
    }
    
    .mission-banner {
        top: 70px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 90%;
        max-width: 800px;
        padding: 16px;
    }
    
    .mission-content {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .mission-pillar {
        padding: 12px;
    }
    
    .pillar-icon {
        font-size: 2.2rem;
    }
    
    .mission-pillar h3 {
        font-size: 0.95rem;
    }
    
    .peace-dashboard {
        top: 160px;
        right: 20px;
        left: auto;
        width: 320px;
    }
    
    .global-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        flex-direction: row;
        padding: 10px;
    }
    
    .stat-content {
        align-items: flex-start;
        text-align: left;
    }
    
    .player-profile {
        bottom: auto;
        top: 160px;
        left: 20px;
        right: auto;
        width: 280px;
        max-height: 60vh;
    }
    
    .global-awareness-legend {
        top: calc(160px + 350px);
        left: 20px;
        right: auto;
        width: 280px;
        max-height: 300px;
    }
    
    .legend-layers {
        gap: 10px;
    }
    
    #hud {
        bottom: auto;
        top: calc(160px + 350px);
        right: 20px;
        left: auto;
        width: 320px;
        max-height: 300px;
        display: block;
    }
    
    .mission-control {
        position: fixed;
        top: auto;
        bottom: 20px;
        left: 20px;
        transform: none;
        width: 380px;
        max-height: 500px;
        display: block;
    }
    
    .footer-mission-sections {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        margin-bottom: 20px;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
    }
}

/* ============================================
   DESKTOP RESPONSIVE (1024px+)
   ============================================ */

@media (min-width: 1024px) {
    nav {
        padding: 15px 40px;
    }
    
    nav ul li a {
        font-size: 1.1rem;
        padding: 8px 16px;
    }
    
    .mission-banner {
        max-width: 900px;
        padding: 20px;
    }
    
    .mission-content {
        gap: 15px;
    }
    
    .mission-pillar {
        padding: 15px;
    }
    
    .mission-pillar:hover {
        background: rgba(0, 255, 255, 0.1);
        border-color: rgba(0, 255, 255, 0.5);
        transform: translateY(-5px);
        box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
    }
    
    .pillar-icon {
        font-size: 2.5rem;
    }
    
    .mission-pillar h3 {
        font-size: 1.1rem;
    }
    
    .mission-pillar p {
        font-size: 0.9rem;
    }
    
    .stat-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .legend-layer:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(5px);
    }
    
    .mission-card:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    }
    
    button:hover {
        background: rgba(0, 255, 255, 0.3);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Hide marker history on mobile - it's less critical */
#marker-history {
    display: none;
}

@media (min-width: 1024px) {
    #marker-history {
        display: block;
        position: fixed;
        bottom: 540px;
        left: 20px;
        width: 200px;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(10px);
        border: 2px solid rgba(0, 255, 255, 0.3);
        border-radius: 12px;
        padding: 12px;
        z-index: 500;
    }
}

.hidden {
    display: none !important;
}

.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Smooth scrollbar for panels */
.mission-list::-webkit-scrollbar,
.global-awareness-legend::-webkit-scrollbar,
#hud::-webkit-scrollbar,
#nasa-results::-webkit-scrollbar,
.player-profile::-webkit-scrollbar {
    width: 6px;
}

.mission-list::-webkit-scrollbar-track,
.global-awareness-legend::-webkit-scrollbar-track,
#hud::-webkit-scrollbar-track,
#nasa-results::-webkit-scrollbar-track,
.player-profile::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.mission-list::-webkit-scrollbar-thumb,
.global-awareness-legend::-webkit-scrollbar-thumb,
#hud::-webkit-scrollbar-thumb,
#nasa-results::-webkit-scrollbar-thumb,
.player-profile::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

.mission-list::-webkit-scrollbar-thumb:hover,
.global-awareness-legend::-webkit-scrollbar-thumb:hover,
#hud::-webkit-scrollbar-thumb:hover,
#nasa-results::-webkit-scrollbar-thumb:hover,
.player-profile::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

/* ============================================
   LEVEL UP ANIMATION
   ============================================ */

@keyframes levelUp {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.6);
    z-index: 3000;
    animation: levelUp 0.6s ease-out;
    font-size: 1.5em;
    font-weight: bold;
    color: #000;
    text-align: center;
}

/* ============================================
   PARTICLE EFFECTS (Optional Enhancement)
   ============================================ */

.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #00ffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    animation: particleFloat 3s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-200px) scale(0);
        opacity: 0;
    }
}
