* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #84cc16 100%);
    color: #334155;
    overflow-x: hidden;
    position: relative;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(132, 204, 22, 0.3);
    padding: 1rem 2rem;
    text-align: center;
    position: relative;
    z-index: 100;
    box-shadow: 0 8px 32px 0 rgba(6, 182, 212, 0.37);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, #84cc16, #06b6d4, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px rgba(132, 204, 22, 0.5)); }
    to { filter: drop-shadow(0 0 15px rgba(132, 204, 22, 0.8)); }
}

.header p {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

#searchInput {
    flex: 1;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(132, 204, 22, 0.3);
    border-radius: 25px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    font-size: 1rem;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #84cc16;
    background: rgba(15, 23, 42, 0.9);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(132, 204, 22, 0.3);
}

.mode-toggle {
    display: flex;
    gap: 0.5rem;
}

.mode-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(132, 204, 22, 0.3);
    border-radius: 25px;
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mode-btn:hover {
    background: rgba(132, 204, 22, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(132, 204, 22, 0.3);
}

.mode-btn.active {
    background: linear-gradient(45deg, #84cc16, #06b6d4);
    color: #0f172a;
    border-color: #84cc16;
    box-shadow: 0 0 20px rgba(132, 204, 22, 0.5);
}

#scene-container {
    flex: 1;
    position: relative;
    min-height: 60vh;
}

#scene-container canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.pixel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: 
        linear-gradient(0deg, transparent 50%, rgba(6, 182, 212, 0.03) 50%),
        linear-gradient(90deg, transparent 50%, rgba(6, 182, 212, 0.03) 50%);
    background-size: 4px 4px;
    z-index: 10;
    display: none;
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 4px 4px; }
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

.compass {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    color: #84cc16;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(132, 204, 22, 0.3);
    z-index: 20;
}

.speedometer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    color: #06b6d4;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(6, 182, 212, 0.3);
    z-index: 20;
}

.sidebar {
    position: fixed;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(132, 204, 22, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    z-index: 50;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px 0 rgba(6, 182, 212, 0.37);
}

.control-section {
    margin-bottom: 1.5rem;
}

.control-section h3 {
    color: #84cc16;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(132, 204, 22, 0.5);
}

.category-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-btn, .view-btn, .control-btn, .nav-btn {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(132, 204, 22, 0.3);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.category-btn:hover, .view-btn:hover, .control-btn:hover, .nav-btn:hover {
    background: rgba(132, 204, 22, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(132, 204, 22, 0.2);
}

.category-btn.active, .view-btn.active {
    background: linear-gradient(45deg, #84cc16, #06b6d4);
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(132, 204, 22, 0.4);
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.control-group input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #84cc16;
}

#timeSlider {
    width: 100%;
    margin-bottom: 0.5rem;
    accent-color: #84cc16;
}

#timeLabel {
    color: #06b6d4;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(6, 182, 212, 0.5);
}

#weatherSelect, #scaleSelect {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(132, 204, 22, 0.3);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.info-panel {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.2), rgba(132, 204, 22, 0.1));
    border: 2px solid rgba(132, 204, 22, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.info-panel h3 {
    color: #84cc16;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(132, 204, 22, 0.5);
}

.info-panel p {
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.landmark-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category, .pixel-magic {
    background: rgba(132, 204, 22, 0.2);
    color: #84cc16;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(132, 204, 22, 0.3);
}

.pixel-magic {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
    border-color: rgba(6, 182, 212, 0.3);
}

.pixel-achievements h4 {
    color: #f59e0b;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
}

.achievement {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    margin: 0.2rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.achievement.locked {
    background: rgba(100, 116, 139, 0.2);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.achievement.unlocked {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    animation: pulse 2s infinite;
}

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

.bottom-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(132, 204, 22, 0.3);
    flex-wrap: wrap;
}

.walk-controls, .fly-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(132, 204, 22, 0.1);
    border: 1px solid rgba(132, 204, 22, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.movement-indicator, .altitude-indicator {
    color: #84cc16;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.control-btn, .nav-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 20px;
    background: linear-gradient(45deg, #f59e0b, #84cc16);
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.control-btn:hover, .nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
    background: linear-gradient(45deg, #d97706, #65a30d);
}

.control-btn:active, .nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.4);
}

.footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    text-align: center;
    padding: 1rem;
    border-top: 2px solid rgba(132, 204, 22, 0.3);
}

.footer p {
    color: #94a3b8;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.footer a {
    color: #84cc16;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    text-shadow: 0 0 5px rgba(132, 204, 22, 0.5);
}

.footer a:hover {
    color: #65a30d;
    text-shadow: 0 0 10px rgba(132, 204, 22, 0.8);
}

.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #f59e0b, #84cc16);
    color: #0f172a;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.5);
    z-index: 1000;
    animation: slideIn 0.5s ease-out, slideOut 0.5s ease-out 2.5s;
}

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

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mode-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .sidebar {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        margin: 1rem;
        margin-bottom: 0;
        max-height: none;
    }
    
    #scene-container {
        min-height: 50vh;
    }
    
    .bottom-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .walk-controls, .fly-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .compass, .speedometer {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        margin: 0.5rem;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .sidebar {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .category-buttons {
        gap: 0.3rem;
    }
    
    .control-btn, .nav-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #84cc16, #06b6d4);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #65a30d, #0891b2);
}

/* Enhanced pixel effects */
.pixel-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #84cc16;
    animation: sparkle 1s ease-out infinite;
}

@keyframes sparkle {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(0); }
}

/* Glassmorphism effects enhanced */
.header, .sidebar, .bottom-toolbar, .footer {
    box-shadow: 
        0 8px 32px 0 rgba(15, 23, 42, 0.37),
        0 0 50px rgba(132, 204, 22, 0.1);
}

/* Enhanced focus states for accessibility */
button:focus, input:focus, select:focus {
    outline: 3px solid #84cc16;
    outline-offset: 2px;
}

/* Retro mode enhancements */
body.retro-mode {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

body.retro-mode * {
    text-rendering: geometricPrecision;
}