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

body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
}

#gallery-container {
    width: 100%;
    height: 100%;
}

#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 30px 50px;
    border-radius: 10px;
    font-size: 18px;
    z-index: 1000;
}

.edge-hotspot {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 5vw;
    pointer-events: none;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.18s ease;
}

#edge-hotspot-left {
    left: 0;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.0));
}

#edge-hotspot-right {
    right: 0;
    background: linear-gradient(270deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.0));
}

.edge-hotspot.active {
    opacity: 1;
}

#loading.hidden {
    display: none;
}

#controls-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    background: rgba(15, 17, 23, 0.75);
    padding: 6px 18px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    pointer-events: none;
    z-index: 100;
    transition: opacity 0.6s ease, transform 0.6s ease;
    white-space: nowrap;
}

#controls-hint.hidden {
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
}

.hint-item {
    display: inline-flex;
    align-items: center;
    opacity: 1;
    max-width: 250px;
    overflow: hidden;
    transition: opacity 0.5s ease, max-width 0.5s ease, margin 0.5s ease;
}

.hint-item.completed {
    opacity: 0;
    max-width: 0;
    margin: 0 !important;
}

.separator {
    color: #64748b;
    font-size: 11px;
    margin: 0 10px;
    transition: opacity 0.5s ease, margin 0.5s ease;
}

.separator.hidden {
    display: none;
}

@media (max-width: 768px) {
    #controls-hint {
        font-size: 11px;
        padding: 5px 12px;
        bottom: 12px;
        max-width: 95vw;
        overflow: hidden;
    }

    .separator {
        margin: 0 6px;
    }
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 500;
    cursor: pointer;
}

.modal.visible {
    opacity: 1;
    pointer-events: auto;
}

#painting-modal {
    /* background: rgba(0, 0, 0, 0.72); */
    background: #f7f7f5;
}

#painting-modal img {
    max-width: min(82vw, 720px);
    max-height: 82vh;
    border: 10px solid #050505;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

#painting-modal.loading img {
    visibility: hidden;
}

#plaque-modal {
    background: rgba(0, 0, 0, 0.62);
}

.plaque-modal-card {
    width: min(90vw, 560px);
    padding: 48px 56px;
    background: linear-gradient(135deg, #202020, #050505);
    border: 2px solid #b8b8b8;
    outline: 1px solid rgba(255, 255, 255, 0.22);
    outline-offset: -8px;
    cursor: default;
}

.plaque-modal-card h2 {
    margin: 0 0 18px;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: bold;
    font-size: 30px;
    color: #f2f2f2;
}

.plaque-modal-rule {
    height: 2px;
    margin-bottom: 18px;
    background: linear-gradient(90deg, rgba(210, 210, 210, 0.85), rgba(210, 210, 210, 0));
}

.plaque-modal-dimensions {
    margin: 0 0 10px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    color: #c8c8c8;
}

.plaque-modal-year {
    margin: 0 0 24px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 17px;
    color: #a6a6a6;
}

.plaque-modal-accession {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #858585;
    text-align: right;
}
