/* ==============================================
   THE BARONS — Warm vintage aesthetic
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
    --cream:      #F5F0E8;
    --warm-black: #1A1714;
    --gold:       #D4A843;
    --gold-dim:   #B8922E;
    --red-warm:   #A0382A;
    --text:       #E8E0D4;
    --text-dim:   #9E9588;
    --surface:    rgba(26, 23, 20, 0.65);
    --glass:      rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius:     8px;
    --player-h:   72px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--warm-black);
    color: var(--text);
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    padding-bottom: var(--player-h);
    -webkit-font-smoothing: antialiased;
}

/* ==============================================
   ALBUM SECTIONS
   ============================================== */
.album-section { min-height: 100vh; min-height: 100dvh; }

.album-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
}

.album-bg-blur {
    min-height: 100vh;
    min-height: 100dvh;
    backdrop-filter: blur(80px) saturate(1.3) brightness(0.4);
    -webkit-backdrop-filter: blur(80px) saturate(1.3) brightness(0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}

.album-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
    align-items: start;
}

.album-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 80px;
}

.album-art {
    width: 320px;
    max-width: 40vw;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

.album-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.album-right { min-width: 0; }

.album-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 2.8rem;
    letter-spacing: -0.02em;
    color: var(--cream);
    margin-bottom: 16px;
}

.album-desc {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 540px;
}

/* Version Picker */
.version-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.version-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-right: 4px;
}

.version-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.version-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.version-btn.active { background: var(--gold); color: var(--warm-black); border-color: var(--gold); font-weight: 600; }

/* ==============================================
   TRACKLIST
   ============================================== */
.tracklist {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
}

.track-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.track-row:last-child { border-bottom: none; }
.track-row:hover { background: rgba(255,255,255,0.06); }
.track-row.active { background: rgba(212, 168, 67, 0.12); }
.track-row.active .track-num,
.track-row.active .track-title { color: var(--gold); }
.track-row.active .track-title { font-weight: 600; }

.track-num { font-size: 0.8rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.track-title { font-size: 0.95rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.track-actions { opacity: 0; transition: opacity 0.15s; }
.track-row:hover .track-actions { opacity: 1; }

.track-dl-btn {
    background: transparent; border: none; color: var(--text-dim);
    cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all 0.15s;
}
.track-dl-btn:hover { color: var(--cream); background: rgba(255,255,255,0.1); }

/* ==============================================
   BUTTONS
   ============================================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border: none; border-radius: var(--radius);
    font-family: inherit; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}

.btn-play-all { background: var(--gold); color: var(--warm-black); }
.btn-play-all:hover { background: #E4B853; box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3); }

.btn-download { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); backdrop-filter: blur(10px); }
.btn-download:hover { background: rgba(255,255,255,0.12); }

.btn-primary { background: var(--gold); color: var(--warm-black); }
.btn-primary:hover { background: #E4B853; }

.btn-cancel { background: transparent; color: var(--text-dim); border: 1px solid rgba(255,255,255,0.1); }
.btn-cancel:hover { background: rgba(255,255,255,0.05); color: var(--text); }

/* ==============================================
   MODAL
   ============================================== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    align-items: center; justify-content: center;
}
.modal-overlay.visible { display: flex; }

.modal {
    background: #2A2520; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; width: 90%; max-width: 420px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5); overflow: hidden;
    animation: modalIn 0.25s ease-out;
}

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

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 0; }
.modal-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.4rem; color: var(--cream); }
.modal-close { background: transparent; border: none; color: var(--text-dim); font-size: 1.6rem; cursor: pointer; padding: 0 4px; line-height: 1; }
.modal-close:hover { color: var(--cream); }

.modal-body { padding: 16px 24px 24px; }
.modal-desc { font-size: 0.9rem; color: var(--text); margin-bottom: 8px; }
.modal-note { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 20px; line-height: 1.5; }

.select-label {
    display: block; font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 6px; margin-top: 12px;
}

.custom-select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    width: 100%; padding: 10px 36px 10px 12px; font-size: 0.95rem; font-family: inherit;
    color: var(--text); background-color: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%239E9588"><polygon points="0,0 20,0 10,10" /></svg>');
    background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
    cursor: pointer; transition: border-color 0.2s;
}
.custom-select:focus { outline: none; border-color: var(--gold); }
.custom-select option { background: #2A2520; color: var(--text); }

.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions .btn { flex: 1; justify-content: center; }

/* ==============================================
   STICKY PLAYER BAR
   ============================================== */
.player-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--player-h);
    background: linear-gradient(180deg, #1E1B17, #141210);
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 900;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.player-bar.visible { transform: translateY(0); }

.player-inner {
    display: flex; align-items: center; gap: 14px;
    height: 100%; padding: 0 20px; max-width: 1400px; margin: 0 auto;
}

.player-thumb { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.3); flex-shrink: 0; }

.player-info { min-width: 0; flex-shrink: 1; max-width: 200px; }
.player-track-name { font-weight: 600; font-size: 0.9rem; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-album-name { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.player-btn {
    background: transparent; border: none; color: var(--text-dim);
    cursor: pointer; padding: 6px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.player-btn:hover { color: var(--cream); background: rgba(255,255,255,0.06); }
.player-btn-play { color: var(--cream); width: 40px; height: 40px; }
.player-btn-play:hover { background: rgba(212, 168, 67, 0.15); color: var(--gold); }

.player-progress-wrap {
    flex: 1; height: 4px; background: rgba(255,255,255,0.08);
    border-radius: 2px; cursor: pointer; position: relative; min-width: 80px;
}
.player-progress-wrap:hover { height: 6px; }

.player-progress {
    height: 100%; background: var(--gold); border-radius: 2px;
    width: 0%; transition: width 0.1s linear; pointer-events: none;
}

.player-time {
    font-size: 0.7rem; color: var(--text-dim); font-variant-numeric: tabular-nums;
    white-space: nowrap; flex-shrink: 0; min-width: 80px; text-align: center;
}

.player-volume-wrap { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.player-vol-icon { color: var(--text-dim); }

.player-volume {
    -webkit-appearance: none; appearance: none; width: 80px; height: 4px;
    background: rgba(255,255,255,0.1); border-radius: 2px; outline: none; cursor: pointer;
}
.player-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; background: var(--cream); border-radius: 50%; cursor: pointer; }
.player-volume::-moz-range-thumb { width: 12px; height: 12px; background: var(--cream); border-radius: 50%; border: none; cursor: pointer; }

/* ==============================================
   FOOTER
   ============================================== */
.site-footer { text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 0.8rem; letter-spacing: 0.05em; }

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 800px) {
    .album-bg { background-attachment: scroll; }
    .album-bg-blur { padding: 40px 16px; }
    .album-layout { grid-template-columns: 1fr; gap: 30px; }
    .album-left { position: static; }
    .album-art { width: 220px; max-width: 60vw; }
    .album-title { font-size: 2rem; text-align: center; }
    .album-desc { text-align: center; font-size: 0.9rem; }
    .version-picker { justify-content: center; }
    .album-right { display: flex; flex-direction: column; align-items: center; }
    .tracklist { width: 100%; }
    .track-actions { opacity: 1; }
    .player-inner { gap: 10px; padding: 0 12px; }
    .player-volume-wrap { display: none; }
    .player-time { display: none; }
    .player-info { max-width: 120px; }
}

@media (max-width: 480px) {
    .album-art { width: 180px; }
    .album-title { font-size: 1.6rem; }
    .album-actions { flex-direction: column; width: 100%; }
    .album-actions .btn { justify-content: center; }
}
