/* ── albums-show.css ── */

/* ── Main Container Setup ── */
#three-canvas-container {
    width: 100%;
    height: 75vh;
    min-height: 500px;
    max-height: 800px;
    position: relative;
    background: radial-gradient(circle at center, #0f152b 0%, #060813 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8), 0 10px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
}
@media (max-width: 768px) {
    #three-canvas-container {
        height: 80vh;
        min-height: 480px;
        border-radius: 16px;
    }
}

#three-canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ── Dynamic Shelf Instruction Overlay ── */
.three-instruction {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(10, 13, 24, 0.85);
    backdrop-filter: blur(12px);
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: opacity 0.35s ease, transform 0.35s ease;
    opacity: 0;
}
.three-instruction.visible {
    opacity: 1;
}
.three-instruction.fade-out {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(8px);
}

/* ── Top Bar (Close & Rotate Hint) ── */
#canvas-top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#canvas-top-bar.visible {
    opacity: 1;
    pointer-events: auto;
}

#btn-close-overlay {
    height: 38px;
    padding: 0 16px 0 12px;
    border-radius: 999px;
    background: rgba(10, 13, 24, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
    pointer-events: auto;
}
#btn-close-overlay:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
#btn-close-overlay .material-symbols-outlined {
    font-size: 18px;
}

#rotate-hint {
    background: rgba(10, 13, 24, 0.85);
    backdrop-filter: blur(12px);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(148,163,184,0.8);
    font-family: 'Outfit', sans-serif;
}

/* ── Glassmorphic Detail Panel ── */
#detail-panel {
    position: absolute;
    z-index: 30;
    background: rgba(8, 12, 28, 0.82);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
}

/* Desktop Layout (Right Sidebar) */
@media (min-width: 769px) {
    #detail-panel {
        top: 0;
        right: 0;
        bottom: 0;
        width: 440px;
        border-left: 1px solid rgba(255,255,255,0.08);
        transform: translateX(100%);
    }
    #detail-panel.open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/* Mobile Layout (Bottom Sheet) */
@media (max-width: 768px) {
    #detail-panel {
        left: 0;
        right: 0;
        bottom: 0;
        height: 66%;
        border-top: 1px solid rgba(255,255,255,0.08);
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        transform: translateY(100%);
        box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
    }
    #detail-panel.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .track-item {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    #album-description {
        margin-bottom: 12px;
    }
}

/* ── Panel Styling Elements ── */
.panel-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 768px) {
    .panel-header {
        padding: 16px 20px 12px 20px;
    }
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}
@media (max-width: 768px) {
    .panel-body {
        padding: 12px 20px;
    }
}

.panel-footer {
    padding: 16px 24px 24px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(6, 8, 20, 0.5);
    display: flex;
    gap: 12px;
}
@media (max-width: 768px) {
    .panel-footer {
        padding: 12px 20px 16px 20px;
    }
}

/* ── Tracklist Styling ── */
.track-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}
.track-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    transform: translateX(2px);
}

/* ── Premium Buttons Styling ── */
.btn-buy, .btn-download {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-buy {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0a0d18;
}
.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.45);
}
.btn-download {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
}
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}
.btn-download.locked {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.08);
}
.btn-download.locked:hover {
    border-color: rgba(168, 85, 247, 0.4);
    color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.2);
}
.btn-buy.disabled, .btn-download.disabled {
    background: rgba(255,255,255,0.03);
    color: #475569;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.05);
}

/* ── Audio Track Preview Hover Styles ── */
.track-item.has-audio {
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.track-item.has-audio:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateX(4px);
}

/* Playing Soundwave Indicator animation */
.soundwave-container {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    width: 12px;
    margin-right: 1px;
}
.soundwave-bar {
    width: 2.5px;
    height: 100%;
    background-color: #818cf8; /* indigo-400 */
    border-radius: 1px;
    transform-origin: bottom;
    animation: soundwave-bounce 1s ease-in-out infinite alternate;
}
.soundwave-bar:nth-child(1) { animation-delay: 0.1s; }
.soundwave-bar:nth-child(2) { animation-delay: 0.3s; animation-duration: 0.8s; }
.soundwave-bar:nth-child(3) { animation-delay: 0.5s; animation-duration: 1.1s; }

@keyframes soundwave-bounce {
    0% { transform: scaleY(0.2); }
    100% { transform: scaleY(1.0); }
}

/* Audio Loading Spinner next to track index */
.audio-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(129, 140, 248, 0.2);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

