@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    background-color: #000;
}

#panorama {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* ── Overlay ─────────────────────────────────────────────── */
.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* ── Header ──────────────────────────────────────────────── */
.header {
    position: absolute;
    top: 20px;
    left: 24px;
    pointer-events: auto;
}

.project-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
}

/* ── Minimap ─────────────────────────────────────────────── */
.minimap-widget {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: #8b8b8b;
    border-radius: 8px;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: visible;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.minimap-widget.hidden-map {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.minimap-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
    width: 100%;
    z-index: 5;
    pointer-events: none;
    /* Let clicks pass to map unless on buttons */
}

.minimap-current-room {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    pointer-events: auto;
}

.minimap-floor-dropdown {
    position: relative;
    pointer-events: auto;
}

.minimap-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.minimap-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.minimap-dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: rgba(30, 32, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    list-style: none;
    width: 80px;
    overflow: hidden;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.minimap-dropdown-list.hidden {
    display: none;
}

.minimap-dropdown-list li {
    padding: 8px 12px;
    font-size: 10px;
    color: #ccc;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s, color 0.2s;
}

.minimap-dropdown-list li:last-child {
    border-bottom: none;
}

.minimap-dropdown-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.minimap-container {
    position: relative;
    width: 100%;
    height: 240px;
    background: transparent;
    overflow: visible;
}

#minimap-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: screen;
    /* Removes black background from floor plans */
    opacity: 0.85;
    /* Make the map lines slightly softer to match reference */
    transition: opacity 0.3s;
}

#minimap-pins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass to pins */
}

.minimap-pin {
    position: absolute;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -100%);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.minimap-pin-icon {
    width: 100%;
    height: 100%;
    display: flex;
}

.minimap-pin-icon svg {
    width: 100%;
    height: 100%;
}

.minimap-pin:hover {
    transform: translate(-50%, -100%) scale(1.2);
    z-index: 2;
    color: #ffffff;
}

.minimap-pin.active {
    color: #4f8df9;
    transform: translate(-50%, -100%) scale(1.3);
    z-index: 3;
    filter: drop-shadow(0 0 8px rgba(79, 141, 249, 0.6));
}

/* Pulsing effect disabled for icon shape */
.minimap-pin.active::before {
    display: none;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.minimap-pin-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: rgba(10, 12, 20, 0.9);
    color: rgba(255, 255, 255, 0.9);
    font-size: 9px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
}

.minimap-pin:hover .minimap-pin-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

/* ── Floor Selector — icon-only vertical pill ────────────── */
.floor-selector {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(15, 18, 28, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 6px;
    gap: 2px;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Thin hairline divider between buttons */
.floor-divider {
    width: 28px;
    height: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Each floor button — square icon pill */
.floor-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    transition: background 0.18s ease, color 0.18s ease;
    color: rgba(255, 255, 255, 0.45);
    padding: 0;
}

.floor-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
}

.floor-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* The SVG icon wrapper */
.floor-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.floor-btn:hover .floor-icon {
    transform: scale(1.08);
}

/* Tooltip — slides in from the right on hover */
.floor-tooltip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: rgba(10, 12, 20, 0.9);
    backdrop-filter: blur(8px);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 7px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 100;
    letter-spacing: 0.02em;
}

.floor-btn:hover .floor-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Active indicator dot below icon */
.floor-btn.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
}

/* Clear × badge — top-right corner of active button */
.floor-clear {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
}

.floor-clear:hover {
    background: rgba(220, 60, 60, 0.5);
    color: #fff;
}

.floor-btn.active .floor-clear {
    display: flex;
}

/* ── Bottom Controls ─────────────────────────────────────── */
.bottom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bottom-ui-wrapper {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 15;
    pointer-events: none;
    width: 860px;
    max-width: calc(100vw - 48px);
}

/* ── Floor Filter Pill ───────────────────────────────────────── */
.floor-filter-pill {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 3px;
}

.floor-pill-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
}

.floor-pill-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.floor-pill-btn.active {
    background: #007aff;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.4);
}

/* ── Carousel ────────────────────────────────────────────── */
.carousel-container {
    background: rgba(20, 20, 25, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px 12px 0 0;
    padding: 12px 14px 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.carousel-container.hidden {
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    position: absolute;
}

.carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#carousel-title {
    color: rgba(255, 255, 255, 0.45);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.carousel-close-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 0.5px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.carousel-close-btn:hover {
    background: rgba(220, 50, 50, 0.3);
    border-color: rgba(220, 50, 50, 0.4);
    color: #ff8080;
}

.thumbnail-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.thumbnail-list::-webkit-scrollbar {
    height: 3px;
}

.thumbnail-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
}

.thumbnail-item {
    min-width: 118px;
    height: 68px;
    border-radius: 7px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.thumbnail-item.active {
    border-color: #4f8df9;
}

.thumbnail-label {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.65);
    color: rgba(255, 255, 255, 0.88);
    font-size: 8.5px;
    font-weight: 600;
    text-align: center;
    padding: 4px 0;
    letter-spacing: 0.07em;
    backdrop-filter: blur(2px);
}

/* ── Control Bar ─────────────────────────────────────────── */
.control-bar {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 25, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 7px 14px;
    gap: 4px;
    justify-content: center;
    pointer-events: auto;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.control-bar.standalone {
    border-radius: 12px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.13);
}

.control-bar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    position: absolute;
}

.ctrl-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.ctrl-btn-vertical {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    gap: 4px;
}

.ctrl-btn-text {
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.ctrl-btn-vertical:hover .ctrl-btn-text {
    opacity: 1;
    max-height: 15px;
}

.ctrl-btn:hover,
.ctrl-btn-vertical:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.ctrl-btn:active,
.ctrl-btn-vertical:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.16);
}

/* Red close button */
.ctrl-btn--close {
    color: rgba(255, 95, 95, 0.7);
    border: 0.5px solid rgba(255, 95, 95, 0.22);
}

.ctrl-btn--close:hover {
    background: rgba(210, 45, 45, 0.22);
    border-color: rgba(255, 95, 95, 0.45);
    color: #ff7070;
}

/* Dividers */
.ctrl-divider {
    width: 0.5px;
    height: 16px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    margin: 0 3px;
}

/* ── Toggle Button ───────────────────────────────────────── */
.toggle-btn {
    background: rgba(14, 18, 30, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, opacity 0.25s, transform 0.25s;
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
    z-index: 9999;
}

.toggle-btn:hover {
    background: rgba(14, 18, 30, 0.95);
    color: #fff;
}

.toggle-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

.toggle-btn svg {
    transition: transform 0.3s ease;
}

/* ── Pannellum override ──────────────────────────────────── */
.pnlm-controls-container,
.pnlm-about-msg,
.pnlm-context-menu {
    display: none !important;
}

/* ── Custom Hotspots ─────────────────────────────────────── */
.custom-hotspot {
    width: 40px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.custom-hotspot:hover {
    border-color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* ── Animated Arrow Hotspot (3D Floor) ──────────────────── */
.animated-arrow-hotspot {
    width: 60px;
    height: 60px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transform-style: preserve-3d;
    perspective: 500px;
}

.animated-arrow-hotspot::after {
    content: '';
    display: block;
    width: 35px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.95);
    clip-path: polygon(50% 0%, 100% 100%, 50% 75%, 0% 100%);
    animation: bounce-arrow 1.5s infinite ease-in-out;
    transition: background-color 0.2s;
}

/* ── Flat Animated Arrow Hotspot (For Walls/Doors) ──────── */
.flat-arrow-hotspot {
    width: 60px;
    height: 60px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.flat-arrow-hotspot::after {
    content: '';
    display: block;
    width: 35px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.95);
    clip-path: polygon(50% 0%, 100% 100%, 50% 75%, 0% 100%);
    animation: bounce-arrow-flat 1.5s infinite ease-in-out;
    transition: background-color 0.2s;
}

/* Rotation Utilities */
.animated-arrow-hotspot.rotate-90::after {
    animation: bounce-arrow-90 1.5s infinite ease-in-out;
}

.animated-arrow-hotspot.rotate-minus-90::after {
    animation: bounce-arrow-minus-90 1.5s infinite ease-in-out;
}

.flat-arrow-hotspot.rotate-90::after {
    animation: bounce-arrow-flat-90 1.5s infinite ease-in-out;
}

.flat-arrow-hotspot.rotate-minus-90::after {
    animation: bounce-arrow-flat-minus-90 1.5s infinite ease-in-out;
}

.animated-arrow-hotspot:hover::after,
.flat-arrow-hotspot:hover::after,
.stairs-arrow-hotspot:hover::after {
    background-color: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

/* ── Stairs Arrow Hotspot ──────────────────── */
.stairs-arrow-hotspot {
    width: 60px;
    height: 60px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transform-style: preserve-3d;
    perspective: 500px;
}

.stairs-arrow-hotspot::after {
    content: '';
    display: block;
    width: 30px;
    height: 90px;
    
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 75'%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 12)'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 24)'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 36)'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 48)'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 60)'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 75'%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 12)'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 24)'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 36)'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 48)'/%3E%3Cpath fill='white' stroke='white' stroke-width='3' stroke-linejoin='round' d='M12 2.5L20 10.5L17.5 13L12 7.5L6.5 13L4 10.5L12 2.5Z' transform='translate(0, 60)'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;

    /* Sweeping gradient */
    background: linear-gradient(0deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,1) 50%, rgba(255,255,255,0.15) 100%);
    background-size: 100% 300%;
    animation: chevron-wave-stairs 1.5s linear infinite;

    /* 3D tilt */
    transform: rotateX(45deg) rotateZ(30deg);
}

.stairs-arrow-hotspot.rotate-left::after {
    transform: rotateX(45deg) rotateZ(-30deg);
}

.stairs-arrow-hotspot.rotate-down-left::after {
    transform: rotateX(50deg) rotateZ(-135deg);
}

.stairs-arrow-hotspot.rotate-down::after {
    transform: rotateX(50deg) rotateZ(180deg);
}

.stairs-arrow-hotspot.rotate-down-right::after {
    transform: rotateX(50deg) rotateZ(135deg);
}

.solid-arrow-hotspot {
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.solid-arrow-hotspot::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-color: white;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 L22 12 L16 12 L16 22 L8 22 L8 12 L2 12 Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 L22 12 L16 12 L16 22 L8 22 L8 12 L2 12 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    /* Point straight up by default */
    transform: rotate(0deg);
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.8));
    transition: transform 0.2s ease;
}

.solid-arrow-hotspot:hover::after {
    transform: scale(1.1);
}

.solid-arrow-hotspot.rotate-down-right::after {
    transform: rotate(135deg);
}

.solid-arrow-hotspot.rotate-down-right:hover::after {
    transform: rotate(135deg) scale(1.1);
}

.solid-arrow-hotspot.rotate-down-left::after {
    transform: rotate(225deg);
}

.solid-arrow-hotspot.rotate-down-left:hover::after {
    transform: rotate(225deg) scale(1.1);
}

.solid-arrow-hotspot.rotate-up-left::after {
    transform: rotate(315deg);
}

.solid-arrow-hotspot.rotate-up-left:hover::after {
    transform: rotate(315deg) scale(1.1);
}

.solid-arrow-hotspot.rotate-down::after {
    /* Lay it flat on the stairs with rotateX so it doesn't twist when panning */
    transform: rotateX(60deg) rotateZ(180deg);
}

.solid-arrow-hotspot.rotate-down:hover::after {
    transform: rotateX(60deg) rotateZ(180deg) scale(1.1);
}

/* ── Double Chevron Hotspot ──────────────────── */
.double-chevron-hotspot {
    width: 60px;
    height: 60px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transform-style: preserve-3d;
    perspective: 500px;
}

.double-chevron-hotspot::after {
    content: '';
    display: block;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='rotate(-90 12 12)'%3E%3Cpath d='M2 4 L12 12 L2 20 Z'/%3E%3Cpath d='M11 4 L15 4 L23 12 L15 20 L11 20 L19 12 Z'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='rotate(-90 12 12)'%3E%3Cpath d='M2 4 L12 12 L2 20 Z'/%3E%3Cpath d='M11 4 L15 4 L23 12 L15 20 L11 20 L19 12 Z'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    
    animation: bounce-arrow 1.5s infinite ease-in-out;
    transition: background-color 0.2s;
}

.double-chevron-hotspot:hover::after {
    background-color: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.double-chevron-hotspot.rotate-down::after {
    animation: bounce-arrow-down 1.5s infinite ease-in-out;
}

/* 3D Animations */
@keyframes bounce-arrow {

    0%,
    100% {
        transform: rotateX(60deg) rotateZ(0deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateX(60deg) rotateZ(0deg) translateY(-10px) scale(1.05);
    }
}

@keyframes bounce-arrow-down {

    0%,
    100% {
        transform: rotateX(60deg) rotateZ(180deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateX(60deg) rotateZ(180deg) translateY(-10px) scale(1.05);
    }
}

@keyframes bounce-arrow-90 {

    0%,
    100% {
        transform: rotateX(60deg) rotateZ(90deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateX(60deg) rotateZ(90deg) translateY(-10px) scale(1.05);
    }
}

@keyframes bounce-arrow-minus-90 {

    0%,
    100% {
        transform: rotateX(60deg) rotateZ(-90deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateX(60deg) rotateZ(-90deg) translateY(-10px) scale(1.05);
    }
}

@keyframes bounce-arrow-45 {

    0%,
    100% {
        transform: rotateX(60deg) rotateZ(45deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateX(60deg) rotateZ(45deg) translateY(-10px) scale(1.05);
    }
}

@keyframes bounce-arrow-minus-45 {

    0%,
    100% {
        transform: rotateX(60deg) rotateZ(-45deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateX(60deg) rotateZ(-45deg) translateY(-10px) scale(1.05);
    }
}

/* Flat Animations */
@keyframes bounce-arrow-flat {

    0%,
    100% {
        transform: rotateZ(0deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateZ(0deg) translateY(-10px) scale(1.05);
    }
}

@keyframes bounce-arrow-flat-90 {

    0%,
    100% {
        transform: rotateZ(90deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateZ(90deg) translateY(-10px) scale(1.05);
    }
}

@keyframes bounce-arrow-flat-minus-90 {

    0%,
    100% {
        transform: rotateZ(-90deg) translateY(0) scale(1);
    }

    50% {
        transform: rotateZ(-90deg) translateY(-10px) scale(1.05);
    }
}

@keyframes chevron-wave-stairs {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 100%; }
}

.hotspot-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(10, 12, 20, 0.9);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-hotspot:hover .hotspot-tooltip,
.animated-arrow-hotspot:hover .hotspot-tooltip,
.stairs-arrow-hotspot:hover .hotspot-tooltip,
.double-chevron-hotspot:hover .hotspot-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ── Loading Screen ──────────────────────────────────────── */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 9999;
    transition: opacity 0.4s ease;
    pointer-events: auto;
}

#loading-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    font-family: 'Inter', sans-serif;
}

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

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #4f8df9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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