/* Reset and basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    background-color: #001122;
}

/* VR Scene container */
a-scene {
    width: 100vw;
    height: 100vh;
    display: block;
    position: relative;
}

/* Loading screen customization */
.a-loader-title {
    color: white !important;
    font-size: 2rem !important;
}

/* VR Mode UI customization */
.a-enter-vr-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: linear-gradient(45deg, #3498db, #2980b9) !important;
    border: none !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: bold !important;
    padding: 15px 25px !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4) !important;
    transition: all 0.3s ease !important;
    z-index: 9999 !important;
}

.a-enter-vr-button:hover {
    background: linear-gradient(45deg, #2980b9, #3498db) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6) !important;
}

.a-enter-vr-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.4) !important;
}

/* Mobile touch feedback */
@media (max-width: 768px) {
    .a-enter-vr-button {
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        width: calc(100% - 20px) !important;
        text-align: center !important;
    }
}

/* Custom cursor animation */
a-cursor {
    z-index: 1000;
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { opacity: 0.8; }
}

.loading-pulse {
    animation: pulse 2s infinite;
}

/* Touch interaction improvements for mobile VR */
@media (hover: none) and (pointer: coarse) {
    /* Mobile/Touch specific styles */
    .a-enter-vr-button {
        font-size: 16px !important;
        padding: 20px 30px !important;
        touch-action: manipulation !important;
    }
}

/* Hide default A-Frame UI elements we don't need */
.a-orientation-modal {
    display: none !important;
}

/* Custom VR instructions overlay */
.vr-instructions {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 17, 34, 0.9);
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 300px;
    z-index: 1000;
    border: 1px solid #3498db;
    backdrop-filter: blur(10px);
}

.vr-instructions h3 {
    margin-bottom: 10px;
    color: #3498db;
}

.vr-instructions ul {
    list-style: none;
    padding-left: 0;
}

.vr-instructions li {
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.vr-instructions li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #3498db;
}

/* Fullscreen mode */
.a-enter-vr-button[data-a-enter-vr-modal] {
    display: none !important;
}

/* Performance optimizations */
a-scene {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* CORS and hosting optimizations */
/* Assets timeout handled via JavaScript */

/* Responsive design for different screen sizes */
@media (max-width: 480px) {
    .vr-instructions {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        font-size: 12px;
    }
}

/* High DPI display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .a-enter-vr-button {
        font-size: 16px !important;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animation performance */
* {
    will-change: auto;
}

.nav-button {
    will-change: transform, opacity;
}
