/* ======================================
   AR SHOWCASE - Neutrální šedý design
   ====================================== */

/* === ZÁKLADNÍ NASTAVENÍ === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.showcase-body {
    font-family: Arial, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* === iOS LOADING SCREENS === */
#ios-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    text-align: center;
}

#ios-loading-text {
    font-size: 1.2rem;
    margin-top: 2rem;
    max-width: 300px;
    line-height: 1.5;
}

.ios-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: iosSpinner 1s linear infinite;
}

@keyframes iosSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#ios-error-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    text-align: center;
    padding: 2rem;
}

#ios-error-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 350px;
    line-height: 1.6;
}

.ios-retry-button, .ios-back-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    margin: 0.5rem;
    transition: all 0.3s ease;
}

a-scene.ios-hidden {
    display: none;
}

/* === OVLÁDACÍ PRVKY - NÁVRAT K PŮVODNÍMU STYLU === */
.showcase-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.model-selector-container {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.model-dropdown {
    width: 100%;
    padding: 12px 16px;
    background: rgba(40, 40, 40, 0.95);
    border: 1px solid #666;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.model-dropdown:hover {
    border-color: #4a90e2;
    background: rgba(50, 50, 50, 0.95);
}

.model-dropdown:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

.control-buttons {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.control-btn {
    padding: 12px 20px;
    background: rgba(60, 60, 60, 0.9);
    border: 1px solid #666;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.control-btn:hover {
    background: rgba(80, 80, 80, 0.95);
    border-color: #888;
    transform: translateY(-1px);
}

.back-btn {
    background: rgba(220, 53, 69, 0.8);
    border-color: #dc3545;
}

.back-btn:hover {
    background: rgba(220, 53, 69, 0.95);
}

.reset-btn {
    background: rgba(74, 144, 226, 0.8);
    border-color: #4a90e2;
}

.reset-btn:hover {
    background: rgba(74, 144, 226, 0.95);
}

/* === ROTATION HINT - VYCENTROVÁNO === */
.rotation-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(40, 40, 40, 0.95);
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 25px;
    border: 1px solid #666;
    font-size: 16px;
    font-weight: 500;
    z-index: 1200;
    pointer-events: none;
    opacity: 0.9;
    animation: rotationHintPulse 2s ease-in-out infinite;
    text-align: center; /* PŘIDÁNO - vycentrování textu */
    white-space: nowrap; /* PŘIDÁNO - text na jednom řádku */
}

.rotation-hint.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: all 0.25s ease; /* ZMĚNA - z 0.5s na 0.25s (o polovinu rychlejší) */
}

@keyframes rotationHintPulse {
    0%, 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

/* === MODEL INFO - ROZKLIKNUTELNÝ PANEL === */
.model-info {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 160px);
    max-width: 500px;
    background: rgba(40, 40, 40, 0.95);
    border-radius: 12px;
    border: 1px solid #666;
    z-index: 1000;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
}

.model-info.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

/* Collapsed state - malý panel */
.model-info.collapsed {
    height: 60px;
    padding: 15px 20px;
}

/* Expanded state - velký panel */
.model-info.expanded {
    height: auto;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.model-info h3 {
    margin: 0 0 8px 0;
    color: #4a90e2;
    font-size: 1.3em;
    transition: all 0.3s ease;
}

/* V collapsed stavu skryj vše kromě názvu */
.model-info.collapsed .model-description,
.model-info.collapsed .expand-hint {
    display: none;
}

.model-info.collapsed h3 {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.2;
}

/* Expand hint - indikátor že se dá kliknout */
.expand-hint {
    color: #888;
    font-size: 12px;
    margin-top: 10px;
    font-style: italic;
    opacity: 0.8;
}

.model-info.collapsed .expand-hint {
    display: none;
}

.model-info.expanded .expand-hint {
    display: block;
}

/* Hover efekt pro collapsed stav */
.model-info.collapsed:hover {
    background: rgba(50, 50, 50, 0.95);
    transform: translateX(-50%) translateY(-2px);
}

/* Description container */
.model-description {
    transition: all 0.3s ease;
}

.model-info.expanded .model-description {
    opacity: 1;
    margin-top: 10px;
}

/* === INLINE ROTAČNÍ OVLÁDÁNÍ - ZŮSTÁVÁ VYCENTROVÁNO === */
.inline-rotation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.inline-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}

.rotate-left-btn,
.rotate-right-btn {
    background: rgba(74, 144, 226, 0.9);
    color: white;
}

.rotate-left-btn:hover,
.rotate-right-btn:hover,
.rotate-left-btn:active,
.rotate-right-btn:active {
    background: rgba(74, 144, 226, 1);
    transform: scale(1.1);
}

.inline-label {
    font-size: 14px;
    color: #cccccc;
    font-weight: 500;
}

/* === ZOOM POSUVNÍK - ZŮSTÁVÁ VLEVO === */
.zoom-slider {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-slider.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.zoom-track {
    width: 6px;
    height: 200px;
    background: rgba(100, 100, 100, 0.5);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.zoom-handle {
    width: 20px;
    height: 20px;
    background: rgba(74, 144, 226, 0.9);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: grab;
    transition: background 0.2s ease;
    border: 2px solid white;
}

.zoom-handle:hover,
.zoom-handle:active {
    background: rgba(74, 144, 226, 1);
    cursor: grabbing;
}

.zoom-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 200px;
    margin-left: 5px;
}

.zoom-label-top,
.zoom-label-bottom {
    color: #cccccc;
    font-size: 18px;
    font-weight: bold;
    user-select: none;
}

/* === MOBILNÍ RESPONSIVE === */
@media (max-width: 768px) {
    .showcase-controls {
        top: 15px;
        left: 15px;
        right: 15px;
        gap: 10px;
    }
    
    .model-selector-container {
        min-width: 200px;
        max-width: 280px;
    }
    
    .control-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .rotation-hint {
        font-size: 14px;
        padding: 12px 20px;
        text-align: center; /* PŘIDÁNO - vycentrování i na mobilu */
    }
    
    .model-info {
        bottom: 15px;
        width: calc(100vw - 120px);
        max-width: 400px;
        padding: 15px;
    }
    
    .zoom-slider {
        left: 15px;
    }
    
    .zoom-track {
        height: 150px;
    }
    
    .zoom-labels {
        height: 150px;
    }
    
    .zoom-handle {
        width: 18px;
        height: 18px;
    }
    
    .inline-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .inline-rotation-controls {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .showcase-controls {
        flex-direction: column;
        gap: 8px;
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .model-selector-container {
        min-width: 180px;
        order: 1;
        width: 100%;
    }
    
    .control-buttons {
        order: 2;
        gap: 8px;
        width: 100%;
        justify-content: center;
    }
    
    .control-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .model-info {
        width: calc(100vw - 100px);
        max-width: 320px;
        padding: 12px;
    }
    
    .rotation-hint {
        font-size: 13px;
        padding: 10px 18px;
        text-align: center; /* PŘIDÁNO - vycentrování i na malých mobilech */
    }
}

/* === ODSTRANĚNÍ STARÝCH MOBILNÍCH OVLÁDÁNÍ === */
.mobile-controls {
    display: none;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .rotation-hint {
        animation: none;
    }
    
    .control-btn:hover {
        transform: none;
    }
    
    @keyframes rotationHintPulse {
        0%, 100% { opacity: 0.9; }
        50% { opacity: 1; }
    }
}



/* === PROFILOVÉ DETAILY JEDNOTEK === */
.unit-profile-details {
    text-align: left;
    margin-top: 10px;
}

.unit-type-badge {
    background: rgba(74, 144, 226, 0.2);
    color: #4a90e2;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.unit-stats-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #ffffff;
}

.stat-icon {
    font-size: 16px;
}

.unit-special-showcase {
    background: rgba(50, 50, 50, 0.3);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #4a90e2;
}

.special-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #4a90e2;
}

.special-name {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 6px;
    font-size: 14px;
}

.special-desc {
    color: #cccccc;
    font-size: 13px;
    line-height: 1.4;
}

/* === MOBILNÍ RESPONSIVE PRO PROFILOVÉ DETAILY === */
@media (max-width: 768px) {
    .unit-stats-showcase {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .stat-item {
        font-size: 13px;
    }
    
    .unit-special-showcase {
        padding: 10px;
    }
    
    .special-name {
        font-size: 13px;
    }
    
    .special-desc {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .unit-type-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .stat-item {
        font-size: 12px;
    }
    
    .stat-icon {
        font-size: 14px;
    }
    
    .special-title {
        font-size: 13px;
    }
    
    .special-name {
        font-size: 12px;
    }
    
    .special-desc {
        font-size: 11px;
    }
}

/* === ODSTRANĚNÍ STARÝCH ROTAČNÍCH OVLÁDÁNÍ === */
.inline-rotation-controls {
    display: none;
}

.inline-btn {
    display: none;
}

.inline-label {
    display: none;
}