:root {
    --accent: #E1C485;
    --accent-hover: #c9ab6b;
    --accent-rgb: 225, 196, 133;
    --bg-dark: rgba(15, 23, 42, 0.85);
    --text-light: #f8fafc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #0f172a;
    color: var(--text-light);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#tour-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Pannellum 360 kontejner preko celog ekrana */
#panorama {
    width: 100%;
    height: 100%;
}

/* Gornja info traka - proširena i niža po visini */
#top-bar {
    position: absolute;
    top: 16px;
    left: 20px;
    z-index: 20;
    background: var(--bg-dark);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    min-width: 480px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.top-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 4px;
}

/* Stilovi za AI / Realan prikaz dugmiće */
#mode-toggle {
    display: flex;
    gap: 6px;
    pointer-events: auto;
    flex-shrink: 0;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.mode-btn.active {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
}

.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
}

#room-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

#room-subtitle {
    font-size: 0.8rem;
    color: #cbd5e1;
}

/* Pomeranje default Pannellum kontrola ispod nižeg gornjeg boksa */
.pnlm-controls-container {
    top: 96px !important;
    left: 20px !important;
}

/* Prilagođeni stil za Pannellum 360 hotspotove */
.pnlm-hotspot-base.custom-hotspot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.92);
    border: 3px solid #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.pnlm-hotspot-base.custom-hotspot::before {
    content: '';
    width: 18px;
    height: 18px;
    border-top: 3px solid #0f172a;
    border-right: 3px solid #0f172a;
    transform: rotate(-45deg);
    margin-top: 4px;
}

.pnlm-hotspot-base.custom-hotspot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: pulse360 1.8s infinite ease-out;
}

@keyframes pulse360 {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }

    100% {
        transform: scale(1.75);
        opacity: 0;
    }
}

.pnlm-hotspot-base.custom-hotspot:hover {
    background: var(--accent-hover);
    transform: scale(1.15);
}

/* Tooltip tekst iznad 360 strelice */
.pnlm-hotspot-base.custom-hotspot span {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Interaktivni 3D Tlocrt (Mini-mapa) */
#minimap-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 240px;
    background: var(--bg-dark);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 30;
    transition: width 0.3s ease;
}

#minimap-container.expanded {
    width: 390px;
}

.minimap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
}

.minimap-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.minimap-toggle:hover {
    background: var(--accent);
    color: #0f172a;
}

#minimap-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

#minimap-img {
    width: 100%;
    display: block;
}

.map-pin {
    position: absolute;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 3px solid #1e293b;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-pin:hover {
    transform: translate(-50%, -50%) scale(1.35);
    background: var(--accent);
    z-index: 5;
}

.map-pin.active {
    background: var(--accent);
    border-color: #fff;
    width: 20px;
    height: 20px;
    box-shadow: 0 0 12px var(--accent);
    z-index: 4;
}

.map-pin::before {
    content: attr(data-title);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.map-pin:hover::before {
    opacity: 1;
}

/* Donja navigaciona traka za brzi pristup */
#quick-nav {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 20;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: calc(100vw - 300px);
}

.nav-pill {
    background: var(--bg-dark);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-pill:hover,
.nav-pill.active {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    #top-bar {
        min-width: unset;
        width: calc(100vw - 20px);
        left: 10px;
        top: 10px;
        padding: 8px 14px;
    }

    .top-bar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .pnlm-controls-container {
        top: 118px !important;
        left: 10px !important;
    }

    #minimap-container {
        width: 150px;
        bottom: 75px;
        right: 10px;
    }

    #minimap-container.expanded {
        width: 260px;
    }

    #quick-nav {
        max-width: 100vw;
        left: 10px;
        bottom: 10px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}