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

body {
    overflow: hidden;
    font-family: 'Space Mono', monospace;
    background: #1a0033;
}

#scene-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

.ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.header {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #FFB6C1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(14px, 3vw, 24px);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.header .subtitle {
    font-size: clamp(10px, 2vw, 14px);
    opacity: 0.9;
    letter-spacing: 4px;
}

.nav-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    max-width: 300px;
    pointer-events: auto;
}

.nav-btn {
    background: #8A2BE2;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-family: 'Space Mono', monospace;
    font-size: clamp(10px, 1.5vw, 12px);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-btn:hover {
    background: #9B4DCA;
    transform: scale(1.05);
}

.nav-btn.active {
    background: #FFB6C1;
    color: #4A0072;
}

.controls-hint {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(10px, 1.5vw, 12px);
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
}

.mobile-hint {
    display: none;
}

.footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
}

.footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #FFB6C1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .header {
        top: 10px;
        left: 10px;
    }
    
    .nav-buttons {
        top: auto;
        bottom: 100px;
        right: 10px;
        left: 10px;
        max-width: none;
        justify-content: center;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 10px;
    }
    
    .controls-hint {
        bottom: 50px;
    }
    
    .desktop-hint {
        display: none;
    }
    
    .mobile-hint {
        display: inline;
    }
}

/* Touch device optimization */
@media (hover: none) {
    .nav-btn:hover {
        transform: none;
    }
    
    .nav-btn:active {
        transform: scale(0.95);
    }
}