/* ========== Global Styles ========== */

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

body {
    font-family: 'Georgia', serif;
    background: #0d0d0d;
    color: #e8e0d5;
    overflow: hidden;

}

#audio-permission-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #de8758 0%, #e77132 20%, #461d06 70%, #110e12 90%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.audio-permission-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;

    background: rgba(255, 255, 255, 0.05); /* subtle glass effect */
    backdrop-filter: blur(6px);
    border-radius: 20px;
}


.audio-permission-content h2 {
    font-size: clamp(3rem, 6vw, 5rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 400;
    letter-spacing: 0.15em;
    margin: 0;
}

.audio-permission-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.85;
    margin: 0;
    line-height: 1.6;
}


#enable-audio-button {
    margin-top: 1.5rem;
    padding: 16px 42px;
    font-size: 1rem;
    background: rgb(33, 19, 19);
    color: #f4f2f6; /* ties into gradient */
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 400;
    letter-spacing: 0.15em;

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#enable-audio-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}


#main-gallery {
    opacity: 0;
    transition: opacity 1s ease;
}
.gallery {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 100;
    gap: 1rem;
}

.back-button {
    font-size: 1rem;
    text-decoration: none;
    color: #fff;
    opacity: 0.8;
    justify-self: start;
    transition: opacity 0.3s;
}

.back-button:hover {
    opacity: 1;
}

.gallery-title {
    font-size: clamp(16px, 2.5vw, 25px);
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #d4a954;
    font-weight: 400;
    text-align: center;
    justify-self: center;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    justify-self: end;
}

#audio-current-track-art,
#current-track-art {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.audio-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 180px;
}

#track-name {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}

.buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#play-pause {
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 0;
}

#volume {
    width: 100px;
}

.spotlight {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(
        circle 400px at center, 
        rgba(212, 169, 84, 0.25) 0%, 
        rgba(212, 169, 84, 0.08) 40%, 
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
}

/* ========== CAROUSEL ========== */
.conveyor-container {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 340px;
    overflow: hidden;
    z-index: 2;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

.conveyor-track {
    display: flex;
    position: absolute;
    left: 0;
    gap: 40px;

    will-change: transform;
}

.artwork-item {
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.5s ease, filter 0.5s ease, opacity 0.5s ease;
    filter: brightness(0.35) saturate(0.5);
    transform: scale(0.8);
    opacity: 0.6;
}

.artwork-item.highlighted {
    filter: brightness(1) saturate(1);
    transform: scale(1);
    opacity: 1;
}



.frame {
    background: linear-gradient(145deg, #4a3f2f, #2a2318);
    padding: 14px;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.artwork-img {
    width: 180px;
    height: 240px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

/* ========== INFO DISPLAY ========== */
.info-display {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.info-display.visible {
    opacity: 1;
}

.info-title {
    font-size: 24px;
    color: #e8e0d5;
    margin-bottom: 6px;
    font-style: italic;
}

.info-artist {
    font-size: 14px;
    color: #d4a954;
    letter-spacing: 2px;
}

/* ========== HINT ========== */
.hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: #555;
    letter-spacing: 2px;
    z-index: 10;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 1);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    display: flex;
    gap: 50px;
    max-width: 1000px;
    padding: 40px;
    animation: modalEnter 0.4s ease;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: 1px solid #444;
    border-radius: 50%;
    background: transparent;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #fff;
    border-color: #fff;
    transform: rotate(90deg);
}

.modal-image-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.modal-image {
    max-width: 450px;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.modal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
}

.modal-title {
    font-size: 42px;
    color: #e8e0d5;
    margin-bottom: 8px;
    line-height: 1.2;
    font-style: italic;
}

.modal-artist {
    font-size: 18px;
    color: #d4a954;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.modal-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #d4a954, transparent);
    margin-bottom: 25px;
}

.modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #999;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.modal-size {
    font-size: 16px;
    line-height: 1.5;
    color: #ccc;
    margin-top: 15px;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Tablets and smaller laptops */
@media (max-width: 1024px) {
    .gallery-header {
        padding: 1rem 1.5rem;
    }
    
    .gallery-title {
        letter-spacing: 4px;
    }
    
    .audio-info {
        min-width: 150px;
    }
    
    #track-name {
        font-size: 0.7rem;
    }
    
    #volume {
        width: 80px;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    .gallery-header {
        grid-template-columns: auto 1fr auto;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .gallery-title {
        font-size: 14px;
        letter-spacing: 2px;
    }
    
    .audio-controls {
        padding: 0.4rem 0.6rem;
        gap: 0.5rem;
    }
    
    #current-track-art {
        width: 40px;
        height: 40px;
    }
    
    .audio-info {
        min-width: 120px;
    }
    
    #track-name {
        font-size: 0.65rem;
    }
    
    #volume {
        width: 60px;
    }
    
    .spotlight {
        width: 400px;
        height: 400px;
        background: radial-gradient(
            circle 250px at center, 
            rgba(212, 169, 84, 0.25) 0%, 
            rgba(212, 169, 84, 0.08) 40%, 
            transparent 70%
        );
    }
    
    .artwork-img {
        width: 140px;
        height: 185px;
    }
    
    .frame {
        padding: 10px;
    }
    
    .info-title {
        font-size: 20px;
    }
    
    .info-artist {
        font-size: 12px;
    }
    
    .modal-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
        padding: 20px;
        max-width: 90vw;
    }
    
    .modal-image {
        max-width: 85vw;
        max-height: 35vh;
    }
    
    .modal-info {
        align-items: center;
        max-width: 100%;
    }
    
    .modal-title {
        font-size: 28px;
    }
    
    .modal-artist {
        font-size: 14px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .gallery-header {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        text-align: center;
        padding: 0.75rem;
    }
    
    .back-button {
        position: absolute;
        top: 0.75rem;
        left: 0.75rem;
        font-size: 0.5rem;
    }
    
    .gallery-title {
        grid-column: 1;
        grid-row: 1;
        font-size: 12px;
        letter-spacing: 1px;
        padding-top: 0.25rem;
    }
    
    .audio-controls {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        margin-top: 0.5rem;
    }
    
    .spotlight {
        width: 300px;
        height: 300px;
        background: radial-gradient(
            circle 200px at center, 
            rgba(212, 169, 84, 0.25) 0%, 
            rgba(212, 169, 84, 0.08) 40%, 
            transparent 70%
        );
    }
    
    .artwork-img {
        width: 120px;
        height: 160px;
    }
    
    .conveyor-container {
        height: 260px;
    }
    
    .info-display {
        bottom: 100px;
    }
    
    .info-title {
        font-size: 18px;
    }
    
    .info-artist {
        font-size: 11px;
    }
    
    .hint {
        font-size: 11px;
        bottom: 20px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-artist {
        font-size: 12px;
    }
    
    .modal-description {
        font-size: 14px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .audio-info {
        min-width: 100px;
    }
    
    #track-name {
        font-size: 0.6rem;
    }
    
    #volume {
        width: 50px;
    }
    
    .artwork-img {
        width: 100px;
        height: 140px;
    }
}