/* ==========================================
   INDIANS BY 3D - MAIN STYLES
   ==========================================*/

/* Base Styles */
body {
    margin: 0;
    overflow: hidden;
    font-family: sans-serif;
}

.a-enter-vr-button {
    bottom: 20px;
    right: 120px;
    /* Shifted left to make room for INFO button */
}

/* ==========================================
   LOADING SCREEN
   ==========================================*/
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 100001;
    /* Above mobile UI */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Outfit', sans-serif;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out;
    padding: 30px 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #333;
    border-top: 5px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}

.spinner.hidden {
    opacity: 0;
    display: none;
}

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

    100% {
        transform: rotate(360deg);
    }
}

#play-button:hover {
    background: #FF8C00 !important;
    transform: scale(1.05);
}

#play-button:active {
    transform: scale(0.95);
}

/* ==========================================
   INFO UI & MODAL
   ==========================================*/

/* Info Button (Top Left) */
#ui-info-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10001;
    /* Above loader */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}

#ui-info-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    #ui-info-btn {
        top: 10px;
        right: 10px;
        padding: 6px 14px;
        font-size: 11px;
        border-radius: 20px;
    }
}

/* Info Modal (Overlay) */
#ui-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10002;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#ui-info-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Content */
.info-content {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    color: #eee;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.info-content h2 {
    margin-top: 0;
    color: #FFD580;
    /* Theme Gold */
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.info-content h3 {
    color: #87CEEB;
    /* Sky Blue */
    margin-top: 20px;
}

.info-content ul {
    padding-left: 20px;
    line-height: 1.6;
}

.info-content li {
    margin-bottom: 5px;
}

.key-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-family: monospace;
    color: #fff;
}

/* Close Button */
#ui-info-close {
    display: block;
    margin-top: 30px;
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #FFD580, #FFaa00);
    border: none;
    border-radius: 10px;
    color: #333;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.1s;
}

#ui-info-close:active {
    transform: scale(0.98);
}

/* ==========================================
   MOBILE CONTROLS & UI
   ==========================================*/
#mobile-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100000;
    font-family: 'Outfit', sans-serif;
    display: none;
    /* Controlled by js/mobile-controls.js */
}

/* Hide explicitly on devices with mice (PC) */
@media (pointer: fine) {
    #mobile-controls {
        display: none !important;
    }
}

/* Force show if force-mobile class is present (e.g. from ?forceMobile) */
body.force-mobile #mobile-controls {
    display: block !important;
}

.joystick-zone {
    position: absolute;
    bottom: 40px;
    width: 160px;
    height: 160px;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .joystick-zone {
        bottom: 110px !important;
        /* Raised to clear bottom panels */
    }
}

#left-joystick-zone {
    left: 20px;
}

#right-joystick-zone {
    right: 20px;
}

/* Action Columns */
#mobile-action-column {
    position: absolute;
    bottom: 220px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Уменьшено с 12px */
    pointer-events: auto;
}

/* Mobile-specific positioning adjustments */
@media (max-width: 768px) {
    #mobile-action-column {
        bottom: 250px !important;
        left: 20px;
        gap: 8px;
    }

    #ui-info-btn {
        top: auto !important;
        bottom: 20px !important;
        right: 20px !important;
        padding: 8px 15px !important;
        font-size: 13px !important;
    }
}

.mobile-btn {
    width: 55px;
    /* Уменьшено с 65px */
    height: 55px;
    /* Уменьшено с 65px */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
}

.mobile-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.3) !important;
}

.mobile-btn.active {
    background: rgba(255, 165, 0, 0.5);
    border-color: #FFA500;
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.4);
}

/* Special style for voice button */
#mobile-voice-btn {
    font-size: 24px;
    background: rgba(255, 215, 0, 0.2);
}

#mobile-voice-btn.active {
    background: rgba(255, 215, 0, 0.6);
    border-color: #FFD700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}

/* Right Zoom Column */
#mobile-zoom-container {
    position: absolute;
    bottom: 220px;
    right: 40px;
    height: 200px;
    width: 40px;
    display: flex;
    justify-content: center;
    pointer-events: auto;
}

@media (max-width: 768px) {
    #mobile-zoom-container {
        top: 20px !important;
        bottom: auto !important;
        right: 15px !important;
        height: 140px !important;
    }

    #mobile-zoom-slider {
        margin-top: 65px !important;
        width: 130px !important;
    }
}

#mobile-zoom-slider {
    appearance: none;
    -webkit-appearance: none;
    width: 180px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    outline: none;
    transform: rotate(-90deg);
    transform-origin: center;
    margin-top: 90px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#mobile-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Emote Menu */
#mobile-emote-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 15px;
}

#mobile-emote-menu.visible {
    display: flex;
}

/* Custom style for specific buttons */
#mobile-interact-btn {
    background: rgba(255, 140, 0, 0.35);
    /* Subtle orange by default */
}

#mobile-interact-btn.active {
    background: rgba(255, 50, 50, 0.5);
    /* Red when in ride */
}

#mobile-run-toggle.active {
    background: rgba(0, 200, 0, 0.4);
    /* Green when running */
}

/* End of main styles. Character selection and branding are moved to css/character-selection.css */