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

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

/* Glassmorphism UI Panels */
.glass-panel {
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.85) 0%, rgba(40, 40, 80, 0.75) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#info-panel {
    position: absolute;
    top: 70px;
    left: 15px;
    color: white;
    padding: 20px;
    z-index: 1500;
    max-width: 280px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    pointer-events: auto;
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

#info-panel.hidden {
    transform: translateX(-120%);
    opacity: 0;
}

#info-panel h2 {
    font-family: 'Orbitron', sans-serif;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #4ECDC4;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#info-panel p {
    margin: 8px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

#info-panel .section-title {
    color: #FF6B6B;
    font-weight: 600;
    margin-top: 15px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#info-panel kbd {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar for info panel */
#info-panel::-webkit-scrollbar {
    width: 6px;
}

#info-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#info-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    border-radius: 3px;
}

#info-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5EDDD4 0%, #54B09D 100%);
}

/* Toggle Buttons */
.toggle-btn {
    position: absolute;
    top: 15px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.9) 0%, rgba(68, 160, 141, 0.9) 100%);
    color: white;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    z-index: 1001;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toggle-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
}

.toggle-btn:active {
    transform: translateY(0) scale(0.98);
}

#toggle-info {
    left: 15px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9) 0%, rgba(200, 80, 80, 0.9) 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

#toggle-info:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

#toggle-about {
    right: 15px;
}

/* About Panel */
#about-panel {
    position: absolute;
    top: 70px;
    right: 15px;
    color: white;
    padding: 20px;
    z-index: 1000;
    max-width: 320px;
    pointer-events: none;
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

#about-panel.hidden {
    transform: translateX(120%);
    opacity: 0;
}

#about-panel h2 {
    font-family: 'Orbitron', sans-serif;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #4ECDC4;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#about-panel p {
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

#about-panel .warning {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 150, 150, 0.1) 100%);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

#about-panel .warning strong {
    color: #FF6B6B;
}

/* Score Display */
#score-display {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: linear-gradient(135deg, rgba(170, 150, 218, 0.95) 0%, rgba(130, 110, 180, 0.95) 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(170, 150, 218, 0.5);
    letter-spacing: 2px;
}

#score-display.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Combo Display */
#combo-display {
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.95) 0%, rgba(255, 150, 100, 0.95) 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    font-family: 'Orbitron', sans-serif;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

#combo-display.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

#combo-display.pulse {
    animation: comboPulse 0.2s ease-out;
}

@keyframes comboPulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.15); }
    100% { transform: translateX(-50%) scale(1); }
}

#combo-count {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

#combo-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* Orb Counter */
#orb-counter {
    position: absolute;
    top: 15px;
    right: 120px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9) 0%, rgba(255, 180, 0, 0.9) 100%);
    color: #1a1a2e;
    padding: 10px 18px;
    border-radius: 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
}

.orb-icon {
    font-size: 16px;
    animation: orbGlow 2s ease-in-out infinite;
}

@keyframes orbGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* Achievement Popup */
#achievement-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.98) 0%, rgba(255, 180, 0, 0.98) 100%);
    color: #1a1a2e;
    padding: 20px 40px;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    z-index: 2000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5),
                0 0 60px rgba(255, 215, 0, 0.3);
    text-align: center;
    pointer-events: none;
}

#achievement-popup.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.achievement-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    animation: achievementBounce 0.5s ease-out;
}

@keyframes achievementBounce {
    0% { transform: scale(0) rotate(-20deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

#achievement-text {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Fun Controls */
#fun-controls {
    position: absolute;
    bottom: 25px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.fun-button {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9) 0%, rgba(200, 80, 80, 0.9) 100%);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fun-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.fun-button:active {
    transform: translateY(0) scale(0.98);
}

.fun-button.active {
    background: linear-gradient(135deg, rgba(170, 150, 218, 0.95) 0%, rgba(130, 110, 180, 0.95) 100%);
    box-shadow: 0 4px 20px rgba(170, 150, 218, 0.5);
}

#reset-scene {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.9) 0%, rgba(68, 160, 141, 0.9) 100%);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

#reset-scene:hover {
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.5);
}

.fun-button .icon {
    font-size: 16px;
}

/* Back Button */
#back-button {
    position: absolute;
    bottom: 25px;
    left: 20px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.9) 0%, rgba(68, 160, 141, 0.9) 100%);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

#back-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.5);
}

/* Modal */
#exit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#exit-modal.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.98) 0%, rgba(50, 50, 90, 0.98) 100%);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 420px;
    margin: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#exit-modal.visible .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    font-family: 'Orbitron', sans-serif;
    color: #4ECDC4;
    margin: 0 0 15px 0;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 30px 0;
    font-size: 15px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn-yes {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9) 0%, rgba(200, 80, 80, 0.9) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.modal-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.modal-btn-no {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.9) 0%, rgba(68, 160, 141, 0.9) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.modal-btn-no:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(78, 205, 196, 0.2);
    border-top-color: #4ECDC4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-family: 'Orbitron', sans-serif;
    color: #4ECDC4;
    margin-top: 25px;
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* VR Button Styling */
.a-enter-vr-button {
    bottom: 85px !important;
    right: 20px !important;
    background: linear-gradient(135deg, rgba(170, 150, 218, 0.9) 0%, rgba(130, 110, 180, 0.9) 100%) !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 20px !important;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 15px rgba(170, 150, 218, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0;
    visibility: hidden;
}

.a-enter-vr-button.visible {
    opacity: 1;
    visibility: visible;
}

.a-enter-vr-button:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(170, 150, 218, 0.5) !important;
}

.a-enter-vr-button .vr-icon {
    font-size: 16px;
    margin-right: 6px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #info-panel, #about-panel {
        display: none;
    }

    #info-panel.visible, #about-panel.visible {
        display: block;
        max-width: calc(100% - 30px);
        left: 15px;
        right: 15px;
    }

    .toggle-btn {
        padding: 10px 14px;
        font-size: 11px;
    }

    #fun-controls {
        bottom: 80px;
        right: 10px;
        left: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .fun-button {
        padding: 10px 14px;
        font-size: 11px;
    }

    #back-button {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px 20px;
        font-size: 12px;
    }

    #back-button:hover {
        transform: translateX(-50%) translateY(-2px);
    }

    #score-display {
        font-size: 14px;
        padding: 10px 20px;
    }

    .modal-content {
        padding: 25px;
        margin: 15px;
    }

    .modal-content h2 {
        font-size: 18px;
    }

    .modal-btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    .a-enter-vr-button {
        bottom: 145px !important;
        right: 10px !important;
        padding: 10px 14px !important;
        font-size: 10px !important;
    }

    #combo-display {
        top: 55px;
        padding: 8px 16px;
    }

    #combo-count {
        font-size: 16px;
    }

    #combo-text {
        font-size: 10px;
    }

    #orb-counter {
        right: 100px;
        padding: 8px 14px;
        font-size: 12px;
    }

    #achievement-popup {
        padding: 15px 25px;
    }

    .achievement-icon {
        font-size: 30px;
    }

    #achievement-text {
        font-size: 12px;
    }
}
