* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    overflow: hidden;
    background: #000;
    touch-action: none;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: #fff;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    margin-bottom: 10px;
    opacity: 0.8;
}

#loading-progress {
    font-size: 24px;
    font-weight: bold;
    color: #00d4ff;
}

#scene-info-bar {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

#location-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#location-transition-overlay.hidden {
    display: none;
}

#location-transition-text {
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.6);
    text-align: center;
    letter-spacing: -1px;
    opacity: 0;
    transform: scale(0.9);
}

#location-transition-overlay.show #location-transition-text {
    animation: locationFadeIn 0.6s ease forwards;
}

#location-transition-overlay.hide #location-transition-text {
    animation: locationFadeOut 0.4s ease forwards;
}

@keyframes locationFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes locationFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

#info-location-title {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

#info-scene-title {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
}

#info-tour-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#top-dock {
    position: fixed;
    top: 110px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px 8px;
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

#top-dock.hidden {
    display: none;
}

.top-dock-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.top-dock-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
}

.top-dock-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: normal;
    text-align: center;
}

.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dropdown-arrow {
    transition: transform 0.2s ease;
}

.dropdown-trigger.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 0;
    right: calc(100% + 8px);
    min-width: 260px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 110;
    animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateX(4px); }
    to { opacity: 1; transform: translateX(0); }
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-current-info {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

#dropdown-scene-name {
    color: #00d4ff;
    font-weight: 600;
}

.dropdown-scenes-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 6px 0;
}

.dropdown-scenes-list::-webkit-scrollbar {
    width: 4px;
}

.dropdown-scenes-list::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-scenes-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.dropdown-scene-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dropdown-scene-item:hover {
    background: rgba(0, 212, 255, 0.12);
    color: #00d4ff;
}

.dropdown-scene-item.active {
    background: rgba(0, 212, 255, 0.18);
    color: #00d4ff;
    font-weight: 600;
}

.dropdown-scene-item .scene-icon {
    font-size: 14px;
    opacity: 0.7;
}

.dropdown-scene-item .scene-location-tag {
    margin-left: auto;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

#ui-overlay {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#scene-indicator {
    background: transparent;
    backdrop-filter: none;
    color: #fff;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.user-menu-container {
    position: relative;
}

.user-dropdown {
    position: absolute;
    bottom: 0;
    right: calc(100% + 10px);
    min-width: 180px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 110;
    animation: dropdownFadeIn 0.15s ease;
    overflow: hidden;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateX(4px); }
    to { opacity: 1; transform: translateX(0); }
}

.user-dropdown.hidden {
    display: none;
}

.user-dropdown-info {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

#user-dropdown-name {
    color: #00d4ff;
    font-weight: 600;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.user-dropdown-item:hover {
    background: rgba(255, 70, 70, 0.12);
    color: #ff6060;
}

.user-dropdown-item svg {
    opacity: 0.7;
}

.a-enter-vr {
    display: none !important;
}

/* Scene A (current) canvas sits at z-index 1 */
#visor360 canvas {
    z-index: 1;
}

canvas.hotspot-hover {
    cursor: pointer !important;
}

/* ── Hotspot popups ─────────────────────────────────────────── */
.hotspot-popup {
    position: fixed;
    z-index: 1000;
    background: rgba(15, 20, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 14px 36px 14px 16px; /* espacio para el botón × */
    color: #fff;
    font-size: 14px;
    min-width: 180px;
    max-width: 280px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    pointer-events: auto;
}

.hotspot-popup .popup-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
    color: #fff;
}

.hotspot-popup select,
.hotspot-popup input[type="text"],
.hotspot-popup textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #fff;
    padding: 6px 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

.hotspot-popup select option {
    background: #1a1f2e;
    color: #fff;
}

.hotspot-popup .popup-buttons {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.hotspot-popup .btn-primary {
    flex: 1;
    background: #0d9be6;
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.hotspot-popup .btn-primary:hover { background: #0b87c9; }

.hotspot-popup .btn-secondary {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #ccc;
    padding: 7px 0;
    font-size: 13px;
    cursor: pointer;
}

.hotspot-popup .btn-secondary:hover { background: rgba(255,255,255,0.18); }

/* Info popup específico */
.hotspot-info-popup {
    border-color: rgba(255, 180, 0, 0.4);
}

.hotspot-info-popup .popup-description {
    font-size: 13px;
    color: #ddd;
    line-height: 1.5;
    white-space: pre-wrap;
}

.info-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.info-popup-close:hover { color: #fff; }

/* Scene B (next) canvas sits on top, invisible by default.
   Opacity is driven by JS during transitions. */
#scene-next {
    pointer-events: none;
}
#scene-next canvas {
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

/* Tiled-LOD scene transition: ELIMINADO */

[zoom] {
    cursor: zoom-in;
}

@media (max-width: 600px) {
    #ui-overlay {
        right: 12px;
        padding: 12px 10px;
        gap: 6px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }

    #scene-indicator {
        font-size: 12px;
    }

    #scene-info-bar {
        top: 14px;
        left: 14px;
    }

    #info-location-title {
        font-size: 22px;
    }

    #info-scene-title {
        font-size: 13px;
    }

    #info-tour-title {
        font-size: 10px;
    }

    #top-dock {
        top: 96px;
        right: 12px;
        padding: 10px 6px;
        gap: 4px;
    }

    .top-dock-btn {
        width: 32px;
        height: 32px;
    }

    .dropdown-trigger {
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* Modal Styles */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#modal-container {
    background: rgba(30, 30, 50, 0.95);
    border-radius: 16px;
    padding: 20px;
    min-width: 400px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

#modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

#modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#modal-close:hover {
    color: #00d4ff;
}

#modal-content input,
#modal-content select {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 14px;
}

#modal-content input:focus,
#modal-content select:focus {
    outline: none;
    border-color: #00d4ff;
}

#modal-content label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-bottom: 4px;
    display: block;
}

#modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-primary {
    background: #00d4ff;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background: #00b8e6;
}

.btn-danger {
    background: #ff4b5c;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-danger:hover {
    background: #e63946;
}

/* ── Botón activo en el dock ─────────────────────────────────── */
.control-btn.active {
    background: rgba(0, 212, 255, 0.25);
    border: 1px solid rgba(0, 212, 255, 0.7);
    color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.35);
}

.control-btn.active:hover {
    background: rgba(0, 212, 255, 0.35);
}

/* ── Scene Picker: overlay para elegir escena de destino ─────── */
.scene-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 600;
    backdrop-filter: blur(4px);
    animation: fadeInOverlay 0.15s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeInPopup {
    from { opacity: 0; transform: scale(0.92) translateY(6px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes fadeOutPopup {
    from { opacity: 1; transform: scale(1)    translateY(0); }
    to   { opacity: 0; transform: scale(0.95) translateY(4px); }
}

.hotspot-popup {
    position: fixed;
    z-index: 1000;
    background: rgba(15, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    font-size: 14px;
    width: auto;
    min-width: 200px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    pointer-events: auto;
    animation: fadeInPopup 0.2s ease forwards;
}

.hotspot-popup.closing {
    animation: fadeOutPopup 0.15s ease forwards;
}

.hotspot-hover-label {
    position: fixed;
    z-index: 999;
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 8px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: fadeInLabel 0.15s ease forwards;
}

@keyframes fadeInLabel {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.test-edit-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hotspot-edit-btn-secondary {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.hotspot-edit-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.test-question-card {
    transition: border-color 0.2s;
}

.test-question-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
}

.scene-picker-container {
    background: rgba(18, 22, 38, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
    width: min(580px, 92vw);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.18s ease;
}

@keyframes slideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.scene-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.scene-picker-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.scene-picker-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.scene-picker-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.scene-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.scene-picker-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    background: rgba(255, 255, 255, 0.04);
}

.scene-picker-item:hover {
    border-color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.25);
}

.scene-picker-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #0d1020;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scene-picker-icon {
    font-size: 28px;
    opacity: 0.6;
    /* Solo visible cuando no hay thumbnail */
}

.scene-picker-thumb[style*="background-image"] .scene-picker-icon {
    display: none;
}

.scene-picker-label {
    padding: 6px 8px;
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.scene-picker-empty {
    color: #aaa;
    font-size: 14px;
    text-align: center;
    padding: 24px 0;
}

/* ── Menú contextual de hotspot (clic derecho) ───────────────── */
.hotspot-context-menu {
    position: fixed;
    z-index: 2000;
    background: rgba(13, 17, 28, 0.97);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 10px;
    overflow: hidden;
    min-width: 155px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(14px);
    animation: ctxFadeIn 0.1s ease;
}

@keyframes ctxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.context-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #ddd;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s;
}

.context-menu-item:hover {
    background: rgba(0, 212, 255, 0.12);
    color: #00d4ff;
}

.context-menu-item.danger:hover {
    background: rgba(255, 70, 70, 0.14);
    color: #ff6060;
}

.context-menu-icon {
    font-size: 15px;
    width: 18px;
    text-align: center;
    opacity: 0.85;
}

/* ── Overlay de edición de hotspot ───────────────────────────── */
.hotspot-edit-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    animation: fadeInOverlay 0.15s ease;
}

.hotspot-edit-container {
    background: rgba(14, 18, 32, 0.98);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 14px;
    width: min(400px, 92vw);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.18s ease;
}

.hotspot-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hotspot-edit-title-text {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.hotspot-edit-close {
    background: none;
    border: none;
    color: #777;
    font-size: 17px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.hotspot-edit-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.hotspot-edit-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hotspot-edit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hotspot-edit-label {
    color: #888;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.hotspot-edit-input {
    width: 100%;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 7px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.hotspot-edit-input:focus {
    border-color: rgba(0, 212, 255, 0.5);
}

.hotspot-edit-destination {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 7px;
}

.hotspot-edit-dest-name {
    flex: 1;
    color: #e0e0e0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotspot-edit-change-btn {
    padding: 4px 11px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 5px;
    color: #00d4ff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}

.hotspot-edit-change-btn:hover {
    background: rgba(0, 212, 255, 0.25);
}

.hotspot-edit-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: flex-end;
}

.hotspot-edit-btn-cancel {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.hotspot-edit-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.hotspot-edit-btn-save {
    padding: 8px 20px;
    background: rgba(0, 212, 255, 0.18);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 7px;
    color: #00d4ff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.hotspot-edit-btn-save:hover {
    background: rgba(0, 212, 255, 0.32);
}

/* -- Info Popup: imagen y links ------------------------------- */
.popup-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.popup-links {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.popup-link {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 5px;
    color: #00d4ff;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s;
}

.popup-link:hover {
    background: rgba(0, 212, 255, 0.28);
}

/* -- Edit overlay: description textarea ----------------------- */
.hotspot-edit-textarea {
    width: 100%;
    min-height: 72px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
    padding: 8px 10px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

.hotspot-edit-textarea:focus {
    outline: none;
    border-color: rgba(0,212,255,0.5);
}

/* -- Edit overlay: image section ------------------------------ */
.hotspot-edit-image-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.hotspot-edit-image-preview {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.he-img-placeholder {
    width: 90px;
    height: 60px;
    background: rgba(255,255,255,0.06);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 11px;
    flex-shrink: 0;
}

.hotspot-edit-image-upload-btn {
    padding: 5px 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.hotspot-edit-image-upload-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.hotspot-edit-image-remove-btn {
    padding: 5px 10px;
    background: rgba(255,60,60,0.1);
    border: 1px solid rgba(255,60,60,0.35);
    border-radius: 5px;
    color: #ff6060;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.hotspot-edit-image-remove-btn:hover {
    background: rgba(255,60,60,0.25);
}

/* -- Edit overlay: links section ------------------------------ */
.hotspot-edit-label-hint {
    font-size: 11px;
    color: #666;
    margin-left: 4px;
}

.hotspot-edit-links-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
}

.hotspot-edit-link-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.hotspot-edit-link-label,
.hotspot-edit-link-url {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 12px;
    padding: 5px 8px;
    box-sizing: border-box;
}

.hotspot-edit-link-label:focus,
.hotspot-edit-link-url:focus {
    outline: none;
    border-color: rgba(0,212,255,0.5);
}

.hotspot-edit-link-remove {
    background: transparent;
    border: none;
    color: #ff6060;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.12s;
}

.hotspot-edit-link-remove:hover {
    background: rgba(255,60,60,0.15);
}

.hotspot-edit-links-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: rgba(0,212,255,0.08);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 5px;
    color: #00d4ff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.hotspot-edit-links-add:hover {
    background: rgba(0,212,255,0.2);
}

/* -- Multimedia popup ------------------------------------------- */
.popup-video {
    display: block;
    width: 100%;
    max-height: 260px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #000;
}

.popup-audio {
    display: block;
    width: 100%;
    margin: 8px 0 4px;
}

/* -- Media Edit Overlay --------------------------------------- */
.he-upload-zone {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.he-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #888;
    font-size: 13px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.he-upload-icon {
    font-size: 28px;
    opacity: 0.6;
}

.he-img-preview {
    border-radius: 8px;
    object-fit: cover;
}

/* ── Sky Rotation Dock (bottom) ────────────────────────────── */
#sky-rotation-dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(12, 12, 12, 0.88);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 24px;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    min-width: 420px;
    max-width: 90vw;
}

.sky-rot-dock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    color: #eee;
    font-size: 14px;
}

.sky-rot-dock-sliders {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.sky-rot-slider-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sky-rot-slider-group label {
    color: #aaa;
    font-size: 12px;
    white-space: nowrap;
}

.sky-rot-slider-group strong {
    color: #00d4ff;
}

.sky-rot-slider-group input[type="range"] {
    width: 100%;
    accent-color: #00d4ff;
    cursor: pointer;
}

.sky-rot-dock-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.sky-rot-dock-actions button {
    white-space: nowrap;
}

/* ── Modal active: disable background interactions ──────────── */
body.modal-active #visor360,
body.modal-active #scene-next,
body.modal-active #ui-overlay {
    pointer-events: none !important;
}

body.modal-active #visor360 canvas,
body.modal-active #scene-next canvas {
    pointer-events: none !important;
    user-select: none !important;
}


#guided-tour-dock {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 14px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 150;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#guided-tour-dock.hidden {
    display: none;
}

@media (max-width: 600px) {
    #guided-tour-dock {
        bottom: 20px;
        top: auto;
        left: 12px;
        transform: none;
        padding: 10px 16px;
        gap: 8px;
    }
    .guided-tour-btn {
        width: 40px;
        height: 40px;
    }
    #guided-tour-location {
        font-size: 12px;
        max-width: 120px;
    }
    .toggle-hotspots-btn {
        bottom: 80px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

.guided-tour-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.guided-tour-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.guided-tour-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

#guided-tour-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 120px;
}

#guided-tour-location {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guided-tour-mute-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.guided-tour-mute-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.guided-tour-mute-btn.muted {
    color: #ff6060;
}

/* ── Toggle Hotspots Button ───────────────────────────────────── */
.toggle-hotspots-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-hotspots-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
}

.toggle-hotspots-btn.hidden {
    display: none;
}

.toggle-hotspots-btn.hotspots-hidden {
    color: #ff6060;
    border-color: rgba(255, 96, 96, 0.3);
}

/* ── Guided Tour Order Drag and Drop ──────────────────────────── */
.guided-tour-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s ease;
}

.guided-tour-order-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
}

.guided-tour-order-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
}

.guided-tour-order-handle {
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    user-select: none;
    cursor: grab;
}

.guided-tour-order-item.dragging .guided-tour-order-handle {
    cursor: grabbing;
}
