* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: system-ui, sans-serif;
            background: #0d1117;
            color: #e6edf3;
            overflow: hidden;
            height: 100vh;
            height: 100dvh;
            touch-action: manipulation;
        }

        .app {
            display: flex;
            height: 100vh;
            height: 100dvh;
        }

        /* Sidebar */
        .sidebar {
            width: 280px;
            background: #161b22;
            border-right: 1px solid #30363d;
            display: flex;
            flex-direction: column;
            z-index: 100;
            transition: transform 0.3s ease;
        }

        .sidebar-header {
            padding: 14px;
            background: linear-gradient(135deg, #238636, #1f6feb);
        }

        .sidebar-header .header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .sidebar-header h1 {
            font-size: 1rem;
        }

        .sidebar-header small {
            opacity: 0.85;
            font-size: 0.65rem;
            display: block;
            margin-top: 2px;
        }

        .lang-select {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            color: white;
            font-size: 0.7rem;
            padding: 3px 6px;
            cursor: pointer;
        }

        .lang-select option {
            background: #21262d;
            color: white;
        }

        /* Mobile toggle */
        .sidebar-toggle {
            display: none;
            position: fixed;
            top: 10px;
            left: 10px;
            z-index: 200;
            width: 44px;
            height: 44px;
            background: #238636;
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 1.4rem;
            cursor: pointer;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
        }

        .upload-section {
            padding: 10px;
            border-bottom: 1px solid #30363d;
        }

        .btn-tour-rapido {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            background: linear-gradient(135deg, #238636, #2ea043);
            border: none;
            border-radius: 10px;
            color: white;
            cursor: pointer;
            transition: all 0.2s;
            text-align: left;
        }

        .btn-tour-rapido:hover {
            background: linear-gradient(135deg, #2ea043, #3fb950);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(46, 160, 67, 0.4);
        }

        .btn-tour-rapido .tour-icon {
            font-size: 1.8rem;
        }

        .btn-tour-rapido .tour-text {
            display: flex;
            flex-direction: column;
        }

        .btn-tour-rapido .tour-text strong {
            font-size: 0.95rem;
        }

        .btn-tour-rapido .tour-text small {
            font-size: 0.7rem;
            opacity: 0.85;
        }

        .upload-divider {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 10px 0;
            color: #6e7681;
            font-size: 0.7rem;
        }

        .upload-divider::before,
        .upload-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: #30363d;
        }

        .upload-area {
            border: 2px dashed #30363d;
            border-radius: 8px;
            padding: 14px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .upload-area:hover,
        .upload-area.dragover {
            border-color: #58a6ff;
            background: rgba(88, 166, 255, 0.1);
        }

        .upload-icon {
            font-size: 1.4rem;
        }

        .upload-text {
            font-size: 0.7rem;
            color: #8b949e;
            margin-top: 4px;
        }

        #fileInput {
            display: none;
        }

        .scenes-section {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
            min-height: 0;
        }

        .section-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #8b949e;
            margin-bottom: 8px;
        }

        .drag-hint {
            font-size: 0.55rem;
            color: #58a6ff;
            font-weight: normal;
            text-transform: none;
            margin-left: 6px;
        }

        .scene-list {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .scene-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 8px;
            background: #21262d;
            border-radius: 6px;
            cursor: grab;
            border: 2px solid transparent;
            transition: all 0.15s;
            user-select: none;
            -webkit-user-select: none;
            position: relative;
        }

        .scene-item:hover {
            background: #30363d;
        }

        .scene-item.active {
            border-color: #58a6ff;
            background: rgba(88, 166, 255, 0.15);
        }

        .scene-item.dragging {
            opacity: 0.5;
            transform: scale(0.95);
        }

        .scene-item.drag-over-top {
            border-top: 2px solid #58a6ff;
        }

        .scene-item.drag-over-bottom {
            border-bottom: 2px solid #58a6ff;
        }

        .drag-handle {
            color: #8b949e;
            font-size: 10px;
            cursor: grab;
            padding: 0 2px;
            opacity: 0.5;
            transition: opacity 0.15s;
            letter-spacing: -2px;
        }

        .scene-item:hover .drag-handle {
            opacity: 1;
        }

        .scene-thumb {
            width: 40px;
            height: 26px;
            border-radius: 4px;
            object-fit: cover;
            background: #30363d;
            pointer-events: none;
        }

        .scene-info {
            flex: 1;
            min-width: 0;
            pointer-events: none;
        }

        .scene-name {
            font-size: 0.75rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .scene-meta {
            font-size: 0.6rem;
            color: #8b949e;
        }

        .scene-delete {
            width: 24px;
            height: 24px;
            border: none;
            background: transparent;
            color: #8b949e;
            cursor: pointer;
            border-radius: 4px;
            opacity: 0;
            flex-shrink: 0;
            font-size: 0.9rem;
        }

        .scene-item:hover .scene-delete {
            opacity: 1;
        }

        .scene-delete:hover {
            background: #da3633;
            color: white;
        }

        .scene-edit-name {
            width: 24px;
            height: 24px;
            border: none;
            background: transparent;
            color: #8b949e;
            cursor: pointer;
            border-radius: 4px;
            opacity: 0;
            flex-shrink: 0;
            font-size: 0.75rem;
        }

        .scene-item:hover .scene-edit-name {
            opacity: 1;
        }

        .scene-edit-name:hover {
            background: #58a6ff;
            color: white;
        }

        .scene-name {
            cursor: default;
        }

        .scene-name-input {
            background: #21262d;
            border: 1px solid #58a6ff;
            color: white;
            font-size: 0.8rem;
            padding: 2px 5px;
            border-radius: 4px;
            width: 100%;
            outline: none;
        }

        .hotspots-section {
            padding: 10px;
            border-top: 1px solid #30363d;
            max-height: 150px;
            overflow-y: auto;
        }

        .hotspots-section .section-label {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .hotspots-section .section-label small {
            font-size: 0.55rem;
            color: #58a6ff;
            font-weight: normal;
        }

        .hotspot-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .hotspot-item {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 5px 6px;
            background: #21262d;
            border-radius: 5px;
            font-size: 0.7rem;
        }

        .hotspot-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #3fb950;
            flex-shrink: 0;
        }

        .hotspot-item span {
            flex: 1;
            color: #8b949e;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }

        .hotspot-item button {
            background: none;
            border: none;
            color: #8b949e;
            cursor: pointer;
            padding: 2px 4px;
            font-size: 0.7rem;
            border-radius: 4px;
            flex-shrink: 0;
        }

        .hotspot-item button:hover {
            color: #fff;
        }

        .hotspot-item .hs-edit-btn {
            background: #21262d;
        }

        .hotspot-item .hs-edit-btn:hover {
            background: #58a6ff;
        }

        .hotspot-item .hs-del-btn:hover {
            background: #da3633;
        }

        .actions-section {
            padding: 10px;
            border-top: 1px solid #30363d;
        }

        .setting-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 0.75rem;
        }

        .setting-row select {
            background: #21262d;
            border: 1px solid #30363d;
            border-radius: 4px;
            padding: 5px 8px;
            color: #e6edf3;
            font-size: 0.7rem;
            flex: 1;
            margin-left: 8px;
        }

        .btn {
            width: 100%;
            padding: 10px 12px;
            border-radius: 6px;
            border: none;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin-bottom: 5px;
        }

        .btn:last-child {
            margin-bottom: 0;
        }

        .btn-primary {
            background: #238636;
            color: white;
        }

        .btn-primary:hover:not(:disabled) {
            background: #2ea043;
        }

        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .btn-primary.active {
            background: #f0883e;
        }

        .btn-primary.active:hover {
            background: #d77a2e;
        }

        .btn-secondary {
            background: #21262d;
            color: #e6edf3;
            border: 1px solid #30363d;
        }

        .btn-secondary:hover {
            background: #30363d;
        }

        /* Viewer */
        .viewer-area {
            flex: 1;
            position: relative;
            background: #010409;
            min-width: 0;
            overflow: hidden;
        }

        #viewer {
            width: 100%;
            height: 100%;
            display: block;
            touch-action: none;
        }

        .empty-state {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: #8b949e;
            padding: 20px;
        }

        .empty-state .icon {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }

        .empty-state h2 {
            font-size: 1.1rem;
            color: #e6edf3;
            margin-bottom: 6px;
        }

        .empty-state p {
            font-size: 0.8rem;
        }

        /* Mode badges */
        .mode-badge {
            position: absolute;
            top: 12px;
            left: 50%;
            transform: translateX(-50%);
            padding: 8px 16px;
            background: #8957e5;
            border-radius: 20px;
            font-size: 0.75rem;
            z-index: 50;
            display: none;
            white-space: nowrap;
            box-shadow: 0 2px 12px rgba(137, 87, 229, 0.4);
        }

        .mode-badge.show {
            display: block;
        }

        /* Drop zone indicator */
        .drop-zone-active {
            position: absolute;
            inset: 0;
            background: rgba(88, 166, 255, 0.15);
            border: 3px dashed #58a6ff;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 40;
            pointer-events: none;
        }

        .drop-zone-active.show {
            display: flex;
        }

        .drop-zone-active span {
            background: #58a6ff;
            color: white;
            padding: 12px 24px;
            border-radius: 10px;
            font-size: 0.9rem;
            font-weight: 500;
        }

        /* Hotspot markers */
        .hotspot-marker {
            position: absolute;
            transform: translate(-50%, -50%);
            cursor: pointer;
            pointer-events: auto;
            z-index: 30;
            transition: opacity 0.2s;
        }

        .hotspot-marker.editable {
            cursor: grab;
        }

        .hotspot-marker.editable:active {
            cursor: grabbing;
        }

        .hotspot-marker.playing .inner {
            animation: audio-pulse 1s ease-in-out infinite !important;
            box-shadow: 0 0 20px #06b6d4 !important;
        }

        @keyframes audio-pulse {

            0%,
            100% {
                transform: scale(1);
                box-shadow: 0 0 10px #06b6d4;
            }

            50% {
                transform: scale(1.1);
                box-shadow: 0 0 25px #06b6d4;
            }
        }

        body.edit-mode .hotspot-marker {
            animation: edit-glow 2s ease-in-out infinite;
        }

        @keyframes edit-glow {

            0%,
            100% {
                filter: drop-shadow(0 0 4px #f0883e);
            }

            50% {
                filter: drop-shadow(0 0 10px #f0883e);
            }
        }

        @keyframes editing-pulse {

            0%,
            100% {
                box-shadow: 0 0 0 4px rgba(240, 136, 62, 0.4);
            }

            50% {
                box-shadow: 0 0 0 8px rgba(240, 136, 62, 0.6);
            }
        }

        @keyframes hs-float {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-5px);
            }
        }

        @keyframes hs-pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.08);
            }
        }

        @keyframes hs-bounce {

            0%,
            100% {
                transform: translateY(0);
            }

            40% {
                transform: translateY(-8px);
            }

            60% {
                transform: translateY(-4px);
            }
        }

        @keyframes hs-rotate {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        /* Modals */
        .modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.85);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 300;
            padding: 20px;
        }

        .modal-backdrop.show {
            display: flex;
        }

        .modal {
            background: #161b22;
            border: 1px solid #30363d;
            border-radius: 12px;
            padding: 16px;
            width: 100%;
            max-width: 360px;
            max-height: 80vh;
            overflow-y: auto;
        }

        .modal h3 {
            text-align: center;
            margin-bottom: 12px;
            font-size: 1rem;
        }

        .modal-scenes {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-bottom: 12px;
        }

        .modal-scene {
            aspect-ratio: 16/10;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.15s;
            position: relative;
        }

        .modal-scene:hover {
            border-color: #58a6ff;
        }

        .modal-scene img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .modal-scene .name {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 4px 6px;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
            font-size: 0.65rem;
        }

        /* Config Modal */
        .config-modal {
            max-width: 440px;
        }

        .config-type-tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 12px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .config-tab {
            padding: 6px 10px;
            border-radius: 8px;
            background: #21262d;
            border: 2px solid transparent;
            color: #8b949e;
            cursor: pointer;
            font-size: 0.7rem;
            transition: all 0.2s;
        }

        .config-tab:hover {
            background: #30363d;
            color: white;
        }

        .config-tab.active {
            background: #58a6ff;
            border-color: #58a6ff;
            color: white;
        }

        .config-content {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .config-section {
            background: #21262d;
            border-radius: 8px;
            padding: 10px;
        }

        .config-section .section-title {
            font-size: 0.7rem;
            font-weight: 600;
            color: #58a6ff;
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .config-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 6px;
        }

        .config-row:last-child {
            margin-bottom: 0;
        }

        .config-row label {
            flex: 0 0 85px;
            font-size: 0.7rem;
            color: #8b949e;
        }

        .config-row input[type="range"] {
            flex: 1;
            height: 4px;
            -webkit-appearance: none;
            background: #30363d;
            border-radius: 2px;
        }

        .config-row input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: #58a6ff;
            border-radius: 50%;
            cursor: pointer;
        }

        .config-row input[type="color"] {
            width: 36px;
            height: 26px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            background: transparent;
        }

        .config-row input[type="text"] {
            flex: 1;
            background: #0d1117;
            border: 1px solid #30363d;
            border-radius: 4px;
            padding: 5px 8px;
            color: #e6edf3;
            font-size: 0.7rem;
        }

        .config-row select {
            flex: 1;
            background: #0d1117;
            border: 1px solid #30363d;
            border-radius: 4px;
            padding: 5px 8px;
            color: #e6edf3;
            font-size: 0.7rem;
        }

        .config-row span {
            width: 30px;
            font-size: 0.65rem;
            color: #8b949e;
            text-align: right;
        }

        .config-row input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: #58a6ff;
        }

        /* Toggle Switch */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background: #30363d;
            border-radius: 24px;
            transition: 0.3s;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background: white;
            border-radius: 50%;
            transition: 0.3s;
        }

        .toggle-switch input:checked+.toggle-slider {
            background: #58a6ff;
        }

        .toggle-switch input:checked+.toggle-slider:before {
            transform: translateX(20px);
        }

        .config-actions {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .config-actions .btn {
            flex: 1;
        }

        /* Infospot Modal */
        .infospot-modal {
            max-width: 400px;
        }

        .infospot-types {
            display: flex;
            gap: 6px;
            margin-bottom: 15px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .infospot-type {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 10px 12px;
            border-radius: 10px;
            background: #21262d;
            border: 2px solid transparent;
            color: white;
            cursor: pointer;
            transition: all 0.2s;
            min-width: 65px;
        }

        .infospot-type:hover {
            border-color: #30363d;
        }

        .infospot-type.active {
            border-color: #58a6ff;
            background: rgba(88, 166, 255, 0.15);
        }

        .infospot-type .type-icon {
            font-size: 1.3rem;
        }

        .infospot-type .type-label {
            font-size: 0.65rem;
            opacity: 0.8;
        }

        .infospot-content {
            margin-bottom: 15px;
        }

        .infospot-content label {
            display: block;
            font-size: 0.75rem;
            color: #8b949e;
            margin-bottom: 6px;
            margin-top: 10px;
        }

        .infospot-content label:first-child {
            margin-top: 0;
        }

        .infospot-content input,
        .infospot-content textarea {
            width: 100%;
            padding: 10px;
            background: #21262d;
            border: 1px solid #30363d;
            border-radius: 8px;
            color: white;
            font-size: 0.85rem;
            resize: vertical;
        }

        .infospot-content input:focus,
        .infospot-content textarea:focus {
            outline: none;
            border-color: #58a6ff;
        }

        .infospot-scenes {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            max-height: 150px;
            overflow-y: auto;
        }

        .infospot-scene {
            width: 70px;
            cursor: pointer;
            border-radius: 8px;
            overflow: hidden;
            border: 2px solid transparent;
            transition: all 0.2s;
        }

        .infospot-scene:hover {
            border-color: #58a6ff;
        }

        .infospot-scene.selected {
            border-color: #58a6ff;
            box-shadow: 0 0 8px rgba(88, 166, 255, 0.5);
        }

        .infospot-scene img {
            width: 100%;
            height: 45px;
            object-fit: cover;
            display: block;
        }

        .infospot-scene .name {
            font-size: 0.6rem;
            padding: 3px;
            text-align: center;
            background: #21262d;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .infospot-upload-btn {
            padding: 12px;
            background: #21262d;
            border: 2px dashed #30363d;
            border-radius: 8px;
            text-align: center;
            cursor: pointer;
            font-size: 0.85rem;
        }

        .infospot-upload-btn:hover {
            border-color: #58a6ff;
        }

        .infospot-image-preview {
            margin-top: 10px;
            text-align: center;
        }

        .infospot-image-preview img {
            max-width: 100%;
            max-height: 120px;
            border-radius: 8px;
        }

        /* Audio options inline in infospot modal */
        .audio-options-inline {
            margin-top: 15px;
            padding: 12px;
            background: #21262d;
            border-radius: 8px;
        }

        .audio-option-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }

        .audio-option-row:last-child {
            margin-bottom: 0;
        }

        .audio-option-row label {
            flex: 0 0 160px;
            font-size: 0.8rem;
            color: #8b949e;
        }

        .audio-option-row input[type="range"] {
            flex: 1;
            height: 4px;
            -webkit-appearance: none;
            background: #30363d;
            border-radius: 2px;
        }

        .audio-option-row input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: #58a6ff;
            border-radius: 50%;
            cursor: pointer;
        }

        .audio-option-row input[type="checkbox"] {
            width: 20px;
            height: 20px;
            accent-color: #58a6ff;
        }

        .audio-option-row span {
            font-size: 0.75rem;
            color: #58a6ff;
            min-width: 35px;
        }

        /* Rotation control for nav hotspots */
        .rotation-control {
            margin-top: 15px;
            padding: 12px;
            background: #21262d;
            border-radius: 8px;
        }

        .rotation-control>label {
            display: block;
            font-size: 0.8rem;
            color: #8b949e;
            margin-bottom: 8px;
        }

        .rotation-slider-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .rotation-slider-row input[type="range"] {
            flex: 1;
            height: 4px;
            -webkit-appearance: none;
            background: #30363d;
            border-radius: 2px;
        }

        .rotation-slider-row input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: #58a6ff;
            border-radius: 50%;
            cursor: pointer;
        }

        .rotation-slider-row span {
            font-size: 0.8rem;
            color: #58a6ff;
            min-width: 35px;
            text-align: right;
        }

        .rotation-preview {
            display: flex;
            justify-content: center;
            margin-bottom: 10px;
        }

        .rotation-preview-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #58a6ff, #8957e5);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: white;
            transition: transform 0.2s;
            border: 3px solid white;
        }

        .rotation-presets {
            display: flex;
            gap: 4px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .rotation-presets button {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            background: #30363d;
            border: 1px solid #30363d;
            color: white;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .rotation-presets button:hover {
            background: #58a6ff;
            border-color: #58a6ff;
        }

        /* Radial Edit Menu - Marzipano style */
        .radial-menu {
            position: fixed;
            z-index: 3000;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.12s;
        }

        .radial-menu.show {
            pointer-events: auto;
            opacity: 1;
        }

        .radial-center {
            position: absolute;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            color: white;
            transform: translate(-50%, -50%);
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
            z-index: 2;
            border: 3px solid white;
        }

        .radial-center .radial-icon {
            display: inline-block;
            transition: transform 0.15s;
        }

        .radial-options {
            position: absolute;
            transform: translate(-50%, -50%);
        }

        .radial-option {
            position: absolute;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            color: white;
            cursor: pointer;
            transition: all 0.12s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
            border: 2px solid rgba(255, 255, 255, 0.8);
        }

        .radial-option:hover {
            transform: scale(1.18);
            border-color: white;
            box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
        }

        .radial-option.opt-rotate {
            background: #6b7fd4;
        }

        .radial-option.opt-target {
            background: #808080;
        }

        .radial-option.opt-edit {
            background: #e08850;
        }

        .radial-option.opt-delete {
            background: #d64541;
        }

        .radial-option-label {
            position: absolute;
            white-space: nowrap;
            background: rgba(0, 0, 0, 0.85);
            color: white;
            padding: 3px 7px;
            border-radius: 4px;
            font-size: 10px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.12s;
        }

        .radial-option:hover .radial-option-label {
            opacity: 1;
        }

        .radial-backdrop {
            position: fixed;
            inset: 0;
            z-index: 2999;
        }

        .infospot-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }

        /* Custom icon upload */
        .custom-icon-upload {
            display: flex;
            gap: 6px;
            flex: 1;
        }

        .custom-icon-upload input {
            flex: 1;
        }

        .upload-icon-btn {
            padding: 6px 12px;
            background: #30363d;
            border: 1px solid #30363d;
            border-radius: 6px;
            color: white;
            cursor: pointer;
        }

        .upload-icon-btn:hover {
            background: #58a6ff;
        }

        /* Video preview */
        .infospot-video-preview {
            margin-top: 10px;
            text-align: center;
        }

        /* Infospot Popup - Resizable */
        .infospot-popup {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #161b22;
            border: 1px solid #30363d;
            border-radius: 16px;
            padding: 20px;
            min-width: 280px;
            min-height: 150px;
            max-width: 90vw;
            max-height: 85vh;
            overflow: hidden;
            z-index: 500;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            resize: both;
        }

        .infospot-popup.show {
            display: flex;
            flex-direction: column;
        }

        .infospot-popup h4 {
            margin: 0 0 12px;
            font-size: 1rem;
            color: white;
            padding-right: 30px;
        }

        .infospot-popup .popup-body {
            flex: 1;
            overflow: auto;
        }

        .infospot-popup p {
            color: #c9d1d9;
            font-size: 0.9rem;
            line-height: 1.6;
            margin: 0;
            white-space: pre-wrap;
        }

        .infospot-popup img {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            display: block;
        }

        .infospot-popup video {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            display: block;
        }

        .infospot-popup iframe {
            width: 100%;
            aspect-ratio: 16/9;
            border-radius: 8px;
            border: none;
        }

        .popup-close {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: #30363d;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 1rem;
            z-index: 10;
        }

        .popup-close:hover {
            background: #da3633;
        }

        .popup-link {
            display: inline-block;
            margin-top: 10px;
            padding: 12px 24px;
            background: linear-gradient(135deg, #58a6ff, #8957e5);
            color: white;
            text-decoration: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
        }

        .popup-link:hover {
            opacity: 0.9;
        }

        /* Resize handle indicator */
        .infospot-popup::after {
            content: '';
            position: absolute;
            bottom: 4px;
            right: 4px;
            width: 12px;
            height: 12px;
            border-right: 2px solid #58a6ff;
            border-bottom: 2px solid #58a6ff;
            opacity: 0.5;
            pointer-events: none;
        }

        /* Popup backdrop */
        .popup-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 499;
        }

        .popup-backdrop.show {
            display: block;
        }

        .hotspot-preview-container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 70px;
            background: #0d1117;
            border-radius: 6px;
        }

        .hotspot-preview {
            position: relative;
        }

        .hotspot-preview .inner {
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .hotspot-preview .tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-bottom: 6px;
            white-space: nowrap;
            padding: 4px 10px;
        }

        .toast {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(60px);
            padding: 10px 20px;
            background: #21262d;
            border: 1px solid #30363d;
            border-radius: 8px;
            font-size: 0.8rem;
            z-index: 400;
            opacity: 0;
            transition: all 0.25s;
        }

        .toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        /* Logo overlay */
        .logo-overlay {
            position: absolute;
            z-index: 60;
            pointer-events: none;
        }

        .logo-overlay img {
            display: block;
            pointer-events: none;
        }

        .logo-overlay .logo-delete-btn {
            display: none;
            position: absolute;
            top: -10px;
            right: -10px;
            width: 24px;
            height: 24px;
            background: #da3633;
            border: 2px solid white;
            border-radius: 50%;
            color: white;
            font-size: 12px;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            pointer-events: auto;
        }

        body.edit-mode .logo-overlay {
            pointer-events: auto;
            cursor: move;
        }

        body.edit-mode .logo-overlay:hover {
            outline: 2px dashed #58a6ff;
            outline-offset: 4px;
        }

        body.edit-mode .logo-overlay.dragging {
            outline: 2px solid #58a6ff;
        }

        body.edit-mode .logo-overlay .logo-delete-btn {
            display: flex;
        }

        /* Welcome Popup */
        .welcome-popup {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(145deg, #1a1f2e, #0d1117);
            border: 1px solid #30363d;
            border-radius: 20px;
            padding: 40px;
            text-align: center;
            z-index: 500;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            max-width: 90%;
            width: 400px;
        }

        .welcome-close {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            color: #8b949e;
            font-size: 1.2rem;
            cursor: pointer;
            padding: 5px 10px;
            border-radius: 5px;
            transition: all 0.2s;
        }

        .welcome-close:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.1);
        }

        .welcome-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }

        .welcome-icon {
            font-size: 3.5rem;
            margin-bottom: 5px;
        }

        .welcome-popup h2 {
            color: #fff;
            font-size: 1.4rem;
            margin: 0;
        }

        .welcome-popup>.welcome-content>p {
            color: #8b949e;
            font-size: 0.9rem;
            margin: 0;
        }

        .btn-tour-rapido-big {
            display: flex;
            align-items: center;
            gap: 15px;
            background: linear-gradient(135deg, #238636, #2ea043);
            border: none;
            color: white;
            padding: 18px 30px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 1rem;
            margin-top: 10px;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(35, 134, 54, 0.4);
        }

        .btn-tour-rapido-big:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(35, 134, 54, 0.5);
        }

        .btn-tour-rapido-big .icon {
            font-size: 1.8rem;
        }

        .btn-tour-rapido-big .text {
            text-align: left;
        }

        .btn-tour-rapido-big .text strong {
            display: block;
            font-size: 1.1rem;
        }

        .btn-tour-rapido-big .text small {
            font-size: 0.75rem;
            opacity: 0.85;
        }

        .welcome-divider {
            color: #484f58;
            font-size: 0.75rem;
            position: relative;
            width: 100%;
            text-align: center;
            margin: 10px 0;
        }

        .welcome-divider::before,
        .welcome-divider::after {
            content: '';
            position: absolute;
            top: 50%;
            width: 30%;
            height: 1px;
            background: #30363d;
        }

        .welcome-divider::before {
            left: 0;
        }

        .welcome-divider::after {
            right: 0;
        }

        .btn-secondary-small {
            background: transparent;
            border: 1px solid #30363d;
            color: #8b949e;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.2s;
        }

        .btn-secondary-small:hover {
            border-color: #58a6ff;
            color: #58a6ff;
        }

        /* Tour Guide Modal */
        .tour-guide-modal {
            max-width: 450px;
            text-align: left;
        }

        .tour-guide-modal h3 {
            text-align: center;
            margin-bottom: 20px;
        }

        .guide-section {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 12px;
        }

        .guide-title {
            font-weight: 600;
            color: #fff;
            margin-bottom: 10px;
            font-size: 0.9rem;
        }

        .guide-list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .guide-list li {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.85rem;
            color: #c9d1d9;
        }

        .guide-list .check {
            color: #3fb950;
            font-weight: bold;
        }

        .guide-list .magic {
            color: #f0883e;
        }

        .guide-instruction {
            font-size: 0.9rem;
            color: #c9d1d9;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .guide-instruction .folder-icon {
            font-size: 1.3rem;
        }

        .guide-instruction strong {
            color: #58a6ff;
        }

        .guide-how {
            background: rgba(88, 166, 255, 0.1);
            border: 1px solid rgba(88, 166, 255, 0.3);
        }

        .guide-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .guide-buttons .btn {
            flex: 1;
        }

        /* Desktop/Mobile visibility */
        .mobile-only {
            display: none !important;
        }

        .desktop-only {
            display: flex !important;
        }

        /* Logo controls in viewer */
        .logo-controls {
            position: absolute;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(22, 27, 34, 0.95);
            padding: 12px 20px;
            border-radius: 10px;
            border: 1px solid #30363d;
            z-index: 70;
            display: flex;
            gap: 20px;
            font-size: 0.75rem;
            color: #c9d1d9;
        }

        .logo-controls label {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .logo-controls input[type="range"] {
            width: 100px;
        }

        .logo-controls span {
            min-width: 35px;
        }

        /* Logo Modal */
        .logo-modal {
            max-width: 350px;
        }

        .logo-upload-area {
            border: 2px dashed #30363d;
            border-radius: 12px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            margin-bottom: 15px;
        }

        .logo-upload-area:active {
            border-color: #58a6ff;
            background: rgba(88, 166, 255, 0.1);
        }

        .logo-upload-area .upload-icon {
            font-size: 2rem;
            margin-bottom: 8px;
        }

        .logo-upload-area .upload-text {
            font-size: 0.8rem;
            color: #8b949e;
        }

        .logo-preview-container {
            background: #21262d;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            margin-bottom: 15px;
        }

        .logo-preview-container img {
            max-width: 150px;
            max-height: 100px;
            object-fit: contain;
        }

        .logo-sliders {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .logo-sliders label {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.8rem;
        }

        .logo-sliders label span:first-child {
            min-width: 60px;
            color: #8b949e;
        }

        .logo-sliders input[type="range"] {
            flex: 1;
        }

        .logo-sliders label span:last-child {
            min-width: 35px;
            text-align: right;
        }

        .modal-buttons {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }

        .modal-buttons .btn {
            flex: 1;
        }

        /* Checkbox styling */
        .config-row input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        /* Small button */
        .btn-sm {
            padding: 4px 10px;
            font-size: 0.75rem;
        }

        /* Logo upload area - removed, using button only */

        /* Target view modal */
        .target-preview-container {
            position: relative;
            width: 100%;
            aspect-ratio: 16/9;
            background: #000;
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 12px;
        }

        .target-preview-container canvas {
            width: 100%;
            height: 100%;
            cursor: move;
            touch-action: none;
        }

        .target-crosshair {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 24px;
            color: rgba(255, 255, 255, 0.8);
            pointer-events: none;
            text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
        }

        .target-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
        }

        .target-info {
            font-size: 0.75rem;
            color: #8b949e;
        }

        .target-actions {
            display: flex;
            gap: 8px;
        }

        .target-actions .btn {
            padding: 8px 16px;
        }

        ::-webkit-scrollbar {
            width: 5px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: #30363d;
            border-radius: 3px;
        }

        /* ===== MOBILE REDESIGN ===== */
        @media (max-width: 768px) {

            /* Hide desktop sidebar */
            .sidebar {
                display: none !important;
            }

            .sidebar-toggle {
                display: none !important;
            }

            .viewer-area {
                width: 100%;
                height: 100%;
            }

            /* Welcome popup mobile */
            .welcome-popup {
                width: 90%;
                max-width: 350px;
                padding: 30px 25px;
            }

            .welcome-icon {
                font-size: 2.5rem;
            }

            .welcome-popup h2 {
                font-size: 1.2rem;
            }

            .btn-tour-rapido-big {
                padding: 15px 20px;
                width: 100%;
                justify-content: center;
            }

            .btn-tour-rapido-big .icon {
                font-size: 1.5rem;
            }

            /* Tour guide modal mobile */
            .tour-guide-modal {
                max-width: 90%;
                max-height: 85vh;
                overflow-y: auto;
            }

            .guide-section {
                padding: 12px;
            }

            .guide-list li {
                font-size: 0.8rem;
            }

            /* Show mobile instructions, hide desktop */
            .mobile-only {
                display: flex !important;
            }

            .desktop-only {
                display: none !important;
            }

            /* Logo responsive on mobile - positioned right, bigger */
            .logo-overlay {
                right: 12px;
                left: auto;
                top: 70px;
            }

            .logo-overlay img {
                max-width: 30vw;
                height: auto;
                max-height: 18vh;
            }

            /* Allow editing logo on mobile - remove fixed positioning */
            body.edit-mode .logo-overlay {
                pointer-events: auto !important;
                cursor: move !important;
                touch-action: none !important;
                right: auto !important;
                left: unset;
                top: unset;
            }

            /* Floating top bar */
            .mobile-topbar {
                display: flex;
                position: fixed;
                top: 12px;
                left: 12px;
                right: 12px;
                z-index: 200;
                justify-content: flex-end;
                align-items: center;
                pointer-events: none;
            }

            .mobile-topbar>* {
                pointer-events: auto;
            }

            .mobile-title {
                background: rgba(0, 0, 0, 0.6);
                backdrop-filter: blur(10px);
                padding: 8px 14px;
                border-radius: 20px;
                font-size: 0.8rem;
                font-weight: 600;
                color: white;
            }

            .mobile-settings-btn {
                width: 44px;
                height: 44px;
                border-radius: 50%;
                background: rgba(0, 0, 0, 0.6);
                backdrop-filter: blur(10px);
                border: none;
                color: white;
                font-size: 1.3rem;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: all 0.2s;
            }

            .mobile-settings-btn:active {
                transform: scale(0.95);
                background: rgba(88, 166, 255, 0.4);
            }

            /* Floating buttons right */
            .mobile-fab-group {
                display: flex;
                flex-direction: column;
                align-items: center;
                position: fixed;
                right: 12px;
                bottom: 260px;
                gap: 4px;
                z-index: 200;
            }

            .mobile-fab {
                width: 56px;
                height: 56px;
                border-radius: 50%;
                border: none;
                color: white;
                font-size: 1.5rem;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: all 0.2s;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            }

            .mobile-fab:active {
                transform: scale(0.95);
            }

            .mobile-fab.tour-rapido {
                background: linear-gradient(135deg, #238636, #2ea043);
                animation: pulse-glow 2s ease-in-out infinite;
            }

            .mobile-fab-label {
                background: rgba(0, 0, 0, 0.8);
                color: white;
                font-size: 0.65rem;
                padding: 4px 10px;
                border-radius: 12px;
                white-space: nowrap;
                margin-top: 4px;
            }

            @keyframes pulse-glow {

                0%,
                100% {
                    box-shadow: 0 4px 15px rgba(46, 160, 67, 0.4);
                }

                50% {
                    box-shadow: 0 4px 25px rgba(46, 160, 67, 0.7);
                }
            }

            .mobile-fab.secondary {
                background: rgba(48, 54, 61, 0.95);
                backdrop-filter: blur(10px);
            }

            /* Bottom panel */
            .mobile-bottom {
                display: flex;
                flex-direction: column;
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                z-index: 200;
                padding: 10px;
                gap: 8px;
                background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
            }

            .mobile-scenes-row {
                display: flex;
                gap: 8px;
                overflow-x: auto;
                overflow-y: hidden;
                padding: 12px 0 5px 0; /* More top padding for delete buttons */
                scroll-behavior: smooth;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
                scroll-snap-type: x proximity;
            }

            .mobile-scenes-row::-webkit-scrollbar {
                display: none;
            }

            .mobile-scene-thumb {
                width: 110px;
                height: 80px;
                border-radius: 8px;
                border: 2px solid rgba(255, 255, 255, 0.3);
                overflow: hidden;
                flex-shrink: 0;
                cursor: pointer;
                transition: all 0.2s;
                position: relative;
                background: #222;
                -webkit-touch-callout: none;
                -webkit-user-select: none;
                user-select: none;
                scroll-snap-align: start;
            }

            .mobile-scene-thumb.active {
                border-color: #58a6ff;
                box-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
            }

            .mobile-scene-thumb.dragging {
                opacity: 0.6;
                border-color: #f0883e;
                transform: scale(0.95);
            }

            .mobile-scene-thumb img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                pointer-events: none;
                -webkit-user-drag: none;
                user-drag: none;
            }

            /* Drag hint in edit mode */
            .mobile-drag-hint {
                display: none;
                position: fixed;
                bottom: 130px;
                left: 50%;
                transform: translateX(-50%);
                background: rgba(240, 136, 62, 0.9);
                color: white;
                padding: 8px 16px;
                border-radius: 20px;
                font-size: 0.7rem;
                z-index: 201;
                pointer-events: none;
            }

            body.edit-mode .mobile-drag-hint {
                display: block;
            }

            .mobile-scene-thumb .name {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
                color: white;
                font-size: 11px;
                padding: 8px 3px 2px;
                text-align: center;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .mobile-scene-thumb .edit-name-btn {
                position: absolute;
                top: 2px;
                right: 2px;
                width: 18px;
                height: 18px;
                border-radius: 50%;
                background: rgba(0, 0, 0, 0.7);
                border: none;
                color: white;
                font-size: 8px;
                cursor: pointer;
                opacity: 0;
                transition: opacity 0.2s;
            }

            .mobile-scene-thumb.active .edit-name-btn {
                opacity: 1;
            }

            .mobile-add-scene {
                width: 110px;
                height: 80px;
                border-radius: 8px;
                border: 2px dashed rgba(255, 255, 255, 0.4);
                background: rgba(255, 255, 255, 0.1);
                flex-shrink: 0;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.5rem;
                color: rgba(255, 255, 255, 0.6);
            }

            .mobile-add-scene:active {
                background: rgba(88, 166, 255, 0.3);
            }

            .mobile-actions-row {
                display: flex;
                justify-content: center;
                gap: 10px;
            }

            .mobile-action-btn {
                padding: 10px 20px;
                border-radius: 20px;
                border: none;
                font-size: 0.75rem;
                font-weight: 500;
                cursor: pointer;
                display: flex;
                align-items: center;
                gap: 6px;
            }

            .mobile-action-btn.edit {
                background: #f0883e;
                color: white;
            }

            .mobile-action-btn.edit.active {
                background: #58a6ff;
            }

            .mobile-action-btn.export {
                background: rgba(255, 255, 255, 0.15);
                color: white;
            }

            .mobile-action-btn:active {
                transform: scale(0.95);
            }

            /* Mobile menu modal */
            .mobile-menu-backdrop {
                display: none;
                position: fixed;
                inset: 0;
                background: rgba(0, 0, 0, 0.7);
                backdrop-filter: blur(5px);
                z-index: 300;
                align-items: flex-end;
            }

            .mobile-menu-backdrop.show {
                display: flex;
            }

            .mobile-menu {
                background: #161b22;
                border-radius: 20px 20px 0 0;
                width: 100%;
                max-height: 70vh;
                padding: 20px;
                animation: slideUp 0.3s ease;
                overflow-y: auto;
            }

            @keyframes slideUp {
                from {
                    transform: translateY(100%);
                }

                to {
                    transform: translateY(0);
                }
            }

            .mobile-menu-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 20px;
                padding-bottom: 15px;
                border-bottom: 1px solid #30363d;
            }

            .mobile-menu-header h3 {
                margin: 0;
                font-size: 1rem;
            }

            .mobile-lang-select {
                background: rgba(255, 255, 255, 0.1);
                border: 1px solid rgba(255, 255, 255, 0.2);
                border-radius: 6px;
                color: white;
                font-size: 1rem;
                padding: 4px 8px;
                cursor: pointer;
                margin-left: auto;
                margin-right: 10px;
            }

            .mobile-menu-close {
                width: 32px;
                height: 32px;
                border-radius: 50%;
                background: #30363d;
                border: none;
                color: white;
                font-size: 1.2rem;
                cursor: pointer;
            }

            .mobile-menu-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 12px;
            }

            .mobile-menu-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 6px;
                padding: 15px 10px;
                border-radius: 12px;
                background: #21262d;
                border: none;
                color: white;
                cursor: pointer;
            }

            .mobile-menu-item:active {
                background: #30363d;
            }

            .mobile-menu-item .icon {
                font-size: 1.5rem;
            }

            .mobile-menu-item .label {
                font-size: 0.65rem;
                opacity: 0.8;
            }

            .mobile-menu-section {
                margin-top: 15px;
                padding-top: 15px;
                border-top: 1px solid #30363d;
            }

            .mobile-menu-section-title {
                font-size: 0.7rem;
                color: #8b949e;
                margin-bottom: 10px;
                text-transform: uppercase;
            }

            .empty-state {
                padding: 20px;
            }

            .empty-state .icon {
                font-size: 3rem;
            }

            .empty-state h2 {
                font-size: 1.1rem;
            }

            .mode-badge {
                font-size: 0.7rem;
                padding: 8px 14px;
                top: 70px;
                border-radius: 15px;
            }

            .modal {
                max-width: 92%;
                padding: 15px;
                border-radius: 16px;
            }

            /* Config modal mobile - full width, no horizontal scroll */
            .config-modal {
                max-width: 95% !important;
                width: 95%;
                max-height: 85vh;
                overflow-y: auto;
                overflow-x: hidden;
            }

            .config-modal .config-content {
                gap: 8px;
            }

            .config-modal .config-section {
                padding: 10px;
            }

            .config-modal .config-row {
                flex-wrap: wrap;
                gap: 6px;
            }

            .config-modal .config-row label {
                flex: 0 0 100%;
                margin-bottom: 2px;
            }

            .config-modal .config-row input[type="range"] {
                flex: 1;
                min-width: 0;
            }

            .config-modal .config-row input[type="color"] {
                width: 100%;
                height: 36px;
            }

            .config-modal .config-row select {
                width: 100%;
            }

            .config-modal .config-row span {
                flex: 0 0 35px;
            }

            .config-modal .hotspot-preview-container {
                margin-bottom: 5px;
            }

            /* Infospot modal mobile */
            .infospot-modal {
                max-width: 95% !important;
                width: 95%;
            }

            .infospot-types {
                gap: 4px;
            }

            .infospot-type {
                padding: 8px 8px;
                min-width: 55px;
            }

            .infospot-type .type-icon {
                font-size: 1.1rem;
            }

            .infospot-type .type-label {
                font-size: 0.55rem;
            }
        }

        /* Hide mobile on desktop */
        @media (min-width: 769px) {

            .mobile-topbar,
            .mobile-fab-group,
            .mobile-bottom,
            .mobile-menu-backdrop {
                display: none !important;
            }
        }

        /* Voice Recording UI */
        #recording-ui {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: #dc143c;
            color: white;
            padding: 10px 20px;
            border-radius: 30px;
            display: none;
            align-items: center;
            gap: 10px;
            z-index: 6000;
            box-shadow: 0 0 15px #dc143c;
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }