/* ========================================
   VINYL RECORD PLAYER - Premium Styles
   ======================================== */

:root {
    --primary: #ff52d9;
    --accent: #ff9100;
    --bg: #0a0a0f;
    --surface: #111118;
    --surface-hover: #1a1a24;
    --text: #ffffff;
    --text-dim: #666680;
    --vinyl-black: #1a1a1a;
    --vinyl-groove: #222222;
    --gold: #c4a265;
    --gold-dim: #8a7245;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.08;
    background: radial-gradient(#333 0.5px, transparent 0.5px);
    background-size: 3px 3px;
}

/* Ambient Background */
.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    left: -200px;
    animation: orbFloat1 15s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    right: -100px;
    animation: orbFloat2 20s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #4a00e0;
    top: 50%;
    left: 50%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 80px) scale(1.2); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, -60px) scale(1.15); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
    50% { transform: translate(-30%, -60%) scale(1.3); opacity: 0.2; }
}

/* Back Button */
.back-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: var(--primary);
    transform: translateX(-4px);
}

/* =====================
   MAIN LAYOUT
   ===================== */
.vinyl-page {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 100vh;
    padding: 60px 40px 40px;
    gap: 60px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: center;
}

/* =====================
   VINYL SECTION (Left)
   ===================== */
.vinyl-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.turntable {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.turntable-base {
    position: relative;
    background: linear-gradient(145deg, #1e1e28, #141418);
    border-radius: 24px;
    padding: 40px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The Platter */
.platter {
    position: relative;
    width: 85%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, #252530 0%, #1a1a22 100%);
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.03),
        0 0 40px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The Vinyl Disc */
.vinyl-disc {
    width: 95%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, 
            transparent 18%, 
            var(--vinyl-black) 18.5%,
            var(--vinyl-black) 100%
        );
    position: relative;
    transition: transform 0s linear;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.02),
        0 4px 20px rgba(0, 0, 0, 0.4);
}

.vinyl-disc.spinning {
    animation: spin 2s linear infinite;
}

.vinyl-disc.paused {
    animation-play-state: paused;
}

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

/* Vinyl Grooves */
.groove {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.03);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.groove-1 { width: 92%; height: 92%; }
.groove-2 { width: 82%; height: 82%; border-color: rgba(255, 255, 255, 0.025); }
.groove-3 { width: 72%; height: 72%; }
.groove-4 { width: 62%; height: 62%; border-color: rgba(255, 255, 255, 0.02); }
.groove-5 { width: 52%; height: 52%; }
.groove-6 { width: 48%; height: 48%; border-color: rgba(255, 255, 255, 0.025); }
.groove-7 { width: 44%; height: 44%; }
.groove-8 { width: 40%; height: 40%; border-color: rgba(255, 255, 255, 0.02); }

/* Vinyl Label (center) */
.vinyl-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    z-index: 5;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.08),
        0 0 20px rgba(0, 0, 0, 0.5);
}

.vinyl-label img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.label-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.spindle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, #333 0%, #111 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 6;
}

/* Vinyl Shine / Reflection */
.vinyl-shine {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 10;
}

/* =====================
   TONEARM
   ===================== */
.tonearm-assembly {
    position: absolute;
    top: 8%;
    right: 10%;
    width: 45%;
    height: 50%;
    z-index: 20;
    transform-origin: 85% 12%;
    transform: rotate(-30deg);
    transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tonearm-assembly.playing {
    transform: rotate(0deg);
}

.tonearm-pivot {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, #555 0%, #333 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.tonearm-arm {
    position: absolute;
    top: 14%;
    right: 10%;
    width: 6px;
    height: 80%;
    background: linear-gradient(to right, #444, #666, #444);
    border-radius: 3px;
    transform-origin: top center;
    transform: rotate(-10deg);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.tonearm-head {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 24px;
}

.tonearm-cartridge {
    width: 14px;
    height: 18px;
    background: linear-gradient(to bottom, #555, #333);
    border-radius: 2px;
    margin: 0 auto;
}

.tonearm-needle {
    width: 2px;
    height: 8px;
    background: var(--gold);
    margin: 0 auto;
    box-shadow: 0 0 4px rgba(196, 162, 101, 0.5);
}

.tonearm-rest-light {
    position: absolute;
    top: 0;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    box-shadow: none;
    transition: all 0.5s ease;
}

.tonearm-rest-light.active {
    background: #00ff88;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
}

/* =====================
   TURNTABLE CONTROLS
   ===================== */
.turntable-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 0 10px;
}

.speed-indicator {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.speed-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.2em;
}

.speed-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.power-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.power-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.1);
}

.power-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #333;
    transition: all 0.5s ease;
}

.power-led.on {
    background: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

/* =====================
   NOW PLAYING
   ===================== */
.now-playing {
    width: 100%;
    max-width: 520px;
    text-align: center;
}

.np-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* EQ Bars */
.eq-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}

.eq-bars span {
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
    height: 4px;
    transition: height 0.1s ease;
}

.eq-bars.active span {
    animation: eqBounce 0.8s ease-in-out infinite alternate;
}

.eq-bars.active span:nth-child(1) { animation-delay: 0s; }
.eq-bars.active span:nth-child(2) { animation-delay: 0.15s; }
.eq-bars.active span:nth-child(3) { animation-delay: 0.3s; }
.eq-bars.active span:nth-child(4) { animation-delay: 0.1s; }
.eq-bars.active span:nth-child(5) { animation-delay: 0.25s; }

@keyframes eqBounce {
    0% { height: 4px; }
    100% { height: 16px; }
}

.np-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    color: var(--primary);
    letter-spacing: 0.3em;
}

.np-title {
    font-family: 'Righteous', sans-serif;
    font-size: 2.4rem;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.np-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: height 0.2s ease;
}

.progress-bar:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(255, 82, 217, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

/* Playback Controls */
.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.ctrl-btn.play-btn {
    background: var(--primary);
    color: #000;
    width: 60px;
    height: 60px;
    box-shadow: 0 0 30px rgba(255, 82, 217, 0.3);
}

.ctrl-btn.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(255, 82, 217, 0.5);
    background: #ff70e0;
}

/* Lyrics */
.lyrics-display {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyric-line {
    font-size: 0.95rem;
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
    transition: all 0.4s ease;
    line-height: 1.5;
    max-width: 400px;
}

.lyric-line.active {
    color: var(--text);
    font-style: normal;
}

/* =====================
   TRACKLIST SECTION (Right)
   ===================== */
.tracklist-section {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
}

.tracklist-header {
    margin-bottom: 32px;
}

.album-badge {
    display: inline-flex;
    gap: 12px;
    margin-bottom: 16px;
}

.badge-year, .badge-format {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    padding: 4px 12px;
    border-radius: 4px;
}

.badge-year {
    background: var(--primary);
    color: #000;
}

.badge-format {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.album-title {
    font-family: 'Righteous', sans-serif;
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.album-artist {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--text-dim);
    letter-spacing: 0.3em;
    margin-bottom: 12px;
}

.album-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.meta-dot {
    color: var(--primary);
}

/* Tracklist */
.tracklist {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.05);
}

.tracklist::-webkit-scrollbar {
    width: 4px;
}

.tracklist::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.tracklist::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.track-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 82, 217, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.track-item:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.06);
}

.track-item:hover::before {
    opacity: 1;
}

.track-item.active {
    background: rgba(255, 82, 217, 0.08);
    border-color: rgba(255, 82, 217, 0.2);
}

.track-item.active::before {
    opacity: 1;
}

.track-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: var(--text-dim);
    min-width: 28px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.track-item.active .track-number {
    color: var(--primary);
}

/* Playing indicator (replaces number when active + playing) */
.track-item.active .track-number .playing-indicator {
    display: flex;
}
.track-item .track-number .playing-indicator {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    justify-content: center;
}
.playing-indicator span {
    width: 2px;
    background: var(--primary);
    border-radius: 1px;
    animation: eqBounce 0.6s ease-in-out infinite alternate;
}
.playing-indicator span:nth-child(1) { animation-delay: 0s; height: 6px; }
.playing-indicator span:nth-child(2) { animation-delay: 0.2s; height: 10px; }
.playing-indicator span:nth-child(3) { animation-delay: 0.1s; height: 4px; }

.track-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.track-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: 0.02em;
}

.track-item.active .track-title {
    color: var(--primary);
}

.track-artist {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.track-duration {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

/* Tracklist Footer */
.tracklist-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-note {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.3em;
    text-align: center;
    opacity: 0.5;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1100px) {
    .vinyl-page {
        flex-direction: column;
        padding: 80px 20px 40px;
        gap: 40px;
        align-items: center;
    }

    .vinyl-section {
        width: 100%;
        max-width: 500px;
    }

    .tracklist-section {
        flex: none;
        width: 100%;
        max-width: 500px;
        max-height: none;
    }
}

@media (max-width: 600px) {
    .vinyl-page {
        padding: 70px 16px 30px;
    }

    .turntable-base {
        padding: 24px;
        border-radius: 18px;
    }

    .np-title {
        font-size: 1.8rem;
    }

    .album-title {
        font-size: 2.5rem;
    }

    .playback-controls {
        gap: 16px;
    }

    .ctrl-btn.play-btn {
        width: 52px;
        height: 52px;
    }

    .back-btn {
        top: 16px;
        left: 16px;
        font-size: 1rem;
    }

    .track-item {
        padding: 12px;
    }
}

/* =====================
   CUSTOM SCROLLBAR
   ===================== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 82, 217, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
