html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: Arial, Helvetica, sans-serif;
}

#pano {
    position: fixed;
    inset: 0;
}

#tour-ui {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

/* ------------------------------------------------------------------ */
/*  Tooltips                                                            */
/* ------------------------------------------------------------------ */

/* Garante containing block para elementos estáticos */
.bottom-btn,
#btn-vr,
#btn-close-share,
#btn-close-list {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #314d60;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* VR fica no topo: tooltip aparece abaixo */
#btn-vr[data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 8px);
}

/* ------------------------------------------------------------------ */
/*  Botões de navegação (prev / next)                                  */
/* ------------------------------------------------------------------ */

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.nav-btn:hover {
    opacity: 1;
}

.nav-btn img {
    display: block;
    width: 52px;
    height: 52px;
}

.nav-btn--left {
    left: 30px;
}

.nav-btn--right {
    right: 30px;
}

/* ------------------------------------------------------------------ */
/*  Botão VR (canto superior direito)                                  */
/* ------------------------------------------------------------------ */

#btn-vr {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.85;
    transition: opacity 0.15s;
}

#btn-vr:hover {
    opacity: 1;
}

#btn-vr img {
    display: block;
    width: 52px;
    height: 52px;
}

/* ------------------------------------------------------------------ */
/*  Barra inferior padrão                                              */
/* ------------------------------------------------------------------ */

#bottom-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
}

#bottom-bar.mode-out {
    transform: translateX(-50%) translateY(140px);
    opacity: 0;
    pointer-events: none;
}

.bottom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.bottom-btn:hover {
    opacity: 1;
}

.bottom-btn img {
    display: block;
    width: 52px;
    height: 52px;
}

/* ------------------------------------------------------------------ */
/*  Modo compartilhar                                                   */
/* ------------------------------------------------------------------ */

#share-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(140px);
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
}

#share-bar.share-open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#btn-close-share {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    pointer-events: none;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
    transition-delay: 0.05s;
}

#btn-close-share img {
    display: block;
    width: 34px;
    height: 34px;
}

#btn-close-share.share-open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ------------------------------------------------------------------ */
/*  Modo lista de cenas                                                 */
/* ------------------------------------------------------------------ */

/* Barra inferior do modo lista (btn-list + btn-dropdown) */
#list-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(140px);
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
}

#list-bar.list-open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Painel deslizante com thumbnails / dropdown */
#list-panel {
    position: absolute;
    bottom: 82px;
    left: 50%;
    transform: translateX(-50%) translateY(500px);
    opacity: 0;
    pointer-events: none;
    width: min(90vw, 520px);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
}

#list-panel.list-open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Cabeçalho: botão fechar + título da cena atual */
#list-panel-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 16px 12px;
    gap: 6px;
}

#btn-close-list {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.15s;
}

#btn-close-list:hover {
    opacity: 1;
}

#btn-close-list img {
    display: block;
    width: 34px;
    height: 34px;
}

#list-scene-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: Arial, sans-serif;
    letter-spacing: 0.01em;
    text-align: center;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* Strip de thumbnails (horizontal scroll + drag) */
#list-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 14px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    cursor: grab;
    user-select: none;
}

#list-thumbs::-webkit-scrollbar {
    height: 4px;
}

#list-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.scene-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.scene-thumb:hover,
.scene-thumb.current {
    opacity: 1;
}

.scene-thumb img {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}

.scene-thumb.current img {
    border-color: #fff;
}

.scene-thumb span {
    color: #fff;
    font-size: 11px;
    font-family: Arial, sans-serif;
    text-align: center;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* Lista de texto (dropdown) */
#list-dropdown-items {
    list-style: none;
    margin: 0;
    padding: 8px 28px 12px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: grab;
    user-select: none;
}

#list-dropdown-items::-webkit-scrollbar {
    width: 4px;
}

#list-dropdown-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

#list-dropdown-items li {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-align: center;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    transition: background 0.12s, color 0.12s;
}

#list-dropdown-items li:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

#list-dropdown-items li.current {
    color: #fff;
    font-weight: 600;
}

/* ------------------------------------------------------------------ */
/*  Utilitários                                                         */
/* ------------------------------------------------------------------ */

.hidden {
    display: none !important;
}
