/* ── Section Overlay ────────────────────────────── */
.section-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.26s ease, visibility 0.26s ease;
    overflow-y: auto;
    padding: 20px;
}

.section-overlay.active {
    opacity: 1;
    visibility: visible;
}

.section-overlay-content {
    max-width: 1040px;
    margin: 4vh auto 40px;
    background: #0b0b0b;
    border: 1px solid rgba(234, 234, 234, .08);
    border-radius: 12px;
    padding: 36px;
    position: relative;
    animation: overlay-fade-in 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

.section-overlay-body {
    margin-top: 24px;
    color: var(--text);
}

.section-overlay-body .section-card,
.section-overlay-body .rdu-selection-card {
    background: var(--panel, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border);
}

.section-overlay-body .tracks-list {
    min-height: 120px;
}

.section-overlay-body .no-tracks {
    color: var(--text-muted);
}

.recently-played-overlay-iframe {
    display: block;
    width: 100%;
    min-height: 75vh;
    border: 0;
    background: transparent;
}

.section-overlay .reveal,
.section-overlay .reveal-scale,
.section-overlay .reveal-right,
.section-overlay .reveal-left {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

.section-overlay .section-card,
.section-overlay .container {
    opacity: 1 !important;
}

@keyframes overlay-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.section-overlay.active.closing .section-overlay-content {
    animation: overlay-fade-out 0.22s ease;
}

@keyframes overlay-fade-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(8px) scale(.99);
    }
}

.section-overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(214, 170, 77, .2);
    border-radius: 999px;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10000;
}

.section-overlay-close:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg);
}

.section-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gold);
    color: var(--bg);
    border: 1px solid var(--gold);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: .12em;
    transition: all 0.2s ease;
}

.section-open-btn:hover {
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    transform: translateY(-2px);
}

.section-overlay-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    margin-bottom: 16px;
    padding-bottom: 0;
}

.section-overlay-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

@media (max-width: 768px) {
    .section-overlay-content {
        padding: 20px;
    }

    .section-overlay-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .section-overlay-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .section-overlay {
        padding: 10px;
    }

    .section-overlay-content {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .section-overlay-close {
        top: 12px;
        right: 12px;
    }

    .section-open-btn {
        width: 100%;
        justify-content: center;
        padding: 11px 14px;
        font-size: .7rem;
    }
}
