/* Base styles */
body { 
    margin: 0; 
    padding: 0; 
    font-family: Arial, sans-serif;
}

/* Main viewer container */
#pano { 
    width: 100vw; 
    height: 100vh; 
}

/* Scene list panel */
#sceneList {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    overflow-y: auto;
    padding: 10px;
    z-index: 100;
}

/* Scene items - complete redesign */
.scene-item {
    margin: 10px 0;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    /* Use grid instead of flex for more precise control */
    display: grid;
    grid-template-rows: 100px auto;
    grid-template-areas: 
        "preview"
        "name";
}

.scene-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.scene-item.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Preview container */
.scene-preview-container {
    grid-area: preview;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    font-size: 0; /* Remove any font spacing */
}

/* Preview image */
.scene-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center -60px; /* Adjust this value as needed */
    display: block;
}

.scene-preview.generated {
    object-position: center center;
}

/* Scene name */
.scene-name {
    grid-area: name;
    padding: 8px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 0 0 8px 8px;
}


/* Viewer controls */
.viewer-controls {
    position: fixed;
    top: 10px;
    left: 220px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.control-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.control-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.control-button img {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

/* Hotspot styles */
.hotspot {
    transition: transform 0.2s ease-out;
    transform-origin: center;
    transform: translate3d(0, 0, 0) scale(1);
    will-change: transform;
}

.hotspot.dragging {
    transform: translate3d(0, 0, 0) scale(1.5);
}

.hotspot img {
    width: 40px;
    height: 40px;
    pointer-events: none;
    display: block;
}

/* Info popup styles */
.info-popup {
    position: absolute;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 300px;
}

/* Error message styles */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 2000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #sceneList {
        width: 150px;
    }

    .viewer-controls {
        left: 170px;
    }
}