/* ==========================================================================
   LOFIDECK // RETRO COZY VINYL SANCTUARY STYLING
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,800;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-cozy: #faf7f2;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-charcoal: #2c2a29;
    --text-muted: #78726e;
    --text-white: #ffffff;
    
    /* Accents */
    --peach-accent: #e6a790;
    --peach-metallic: #c58e7b;
    --peach-glow: rgba(230, 167, 144, 0.28);
    --peach-aura: rgba(230, 167, 144, 0.03);
    --lavender-accent: #9a91b8;
    
    /* System Borders & Shadows */
    --border-cozy: rgba(44, 42, 41, 0.07);
    --border-strong: rgba(44, 42, 41, 0.15);
    --shadow-soft: 0 10px 30px rgba(44, 42, 41, 0.04);
    --shadow-medium: 0 16px 45px rgba(44, 42, 41, 0.08);
    
    /* Layout Tokens */
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.2s ease;
    
    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, monospace;
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-cozy);
    color: var(--text-charcoal);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Warm Parchment Blueprint background overlay */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(circle at 80% 20%, var(--peach-aura) 0%, transparent 40%),
        radial-gradient(circle at 15% 85%, rgba(154, 145, 184, 0.02) 0%, transparent 45%),
        linear-gradient(rgba(250, 247, 242, 0.88), rgba(245, 240, 232, 0.94));
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(44, 42, 41, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 42, 41, 0.015) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -1;
    pointer-events: none;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 40px 0;
}

/* Header & Lo-Fi Navigation Bar */
.lofideck-header {
    background: rgba(250, 247, 242, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-cozy);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-inner {
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-charcoal);
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.header-logo span {
    color: var(--peach-accent);
    text-shadow: 0 2px 8px var(--peach-glow);
}

.lounge-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.lounge-nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-serif);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 30px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lounge-nav-link:hover {
    color: var(--text-charcoal);
    background: rgba(44, 42, 41, 0.03);
}

.lounge-nav-link.is-active {
    color: var(--text-charcoal);
    background: var(--bg-card);
    box-shadow: 0 4px 12px rgba(44, 42, 41, 0.05), inset 0 -1.5px 0 var(--peach-accent);
}

/* User Profile Soundroom Widget */
.lounge-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-cozy);
    border-radius: 30px;
    text-decoration: none;
    color: var(--text-charcoal);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-fast);
}

.lounge-user-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(44, 42, 41, 0.06);
    border-color: var(--peach-accent);
}

.lounge-user-avatar {
    font-size: 1.1rem;
}

.lounge-user-level {
    color: var(--peach-accent);
    font-weight: bold;
}

/* Cozy Card Panels */
.cozy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-cozy);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.cozy-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Grid Layouts */
.lofideck-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 992px) {
    .lofideck-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.lofideck-layout-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 992px) {
    .lofideck-layout-sidebar {
        grid-template-columns: 280px 1fr;
    }
}

/* Headings and Labeled Badges */
.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--peach-accent);
    text-transform: uppercase;
    margin-bottom: 6px;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 800;
    color: var(--text-charcoal);
    line-height: 1.3;
}

h1 {
    font-size: 2.3rem;
}

h2 {
    font-size: 1.7rem;
}

.text-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
}

.btn--primary {
    background: var(--text-charcoal);
    color: var(--bg-cozy);
    border: none;
    box-shadow: 0 4px 15px rgba(44, 42, 41, 0.15);
}

.btn--primary:hover {
    transform: translateY(-2px);
    background: var(--peach-accent);
    color: var(--text-charcoal);
    box-shadow: 0 6px 20px var(--peach-glow);
}

.btn--outline {
    background: transparent;
    color: var(--text-charcoal);
    border: 1.5px solid var(--text-charcoal);
}

.btn--outline:hover {
    background: var(--text-charcoal);
    color: var(--bg-cozy);
    box-shadow: 0 4px 12px rgba(44, 42, 41, 0.1);
}

.btn--full {
    width: 100%;
}

/* Ticking Spinning Retro Turntable Graphic Illustration */
.player-illustration-wrap {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 360px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.turntable-chassis {
    width: 320px;
    height: 290px;
    background: #e2d9cd; /* Cozy wood veneer chassis */
    border: 6px solid #c8bcb0;
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(44, 42, 41, 0.12), inset 0 2px 0 rgba(255,255,255,0.6);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.turntable-platter {
    width: 215px;
    height: 215px;
    border-radius: 50%;
    background: #f1ede6;
    border: 3px solid #dfd8cf;
    position: absolute;
    left: 20px;
    top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.03);
}

.turntable-vinyl-disc {
    width: 196px;
    height: 196px;
    border-radius: 50%;
    background: radial-gradient(circle, #252525 35%, #151515 70%, #050505 100%);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vinylSpin 3.5s linear infinite;
    animation-play-state: running; /* Dynamic toggling */
}

/* Grooves on record face */
.turntable-vinyl-disc::before {
    content: '';
    position: absolute;
    width: 90%; height: 90%;
    border: 1.5px solid rgba(255,255,255,0.025);
    border-radius: 50%;
    box-shadow: 0 0 0 10px rgba(255,255,255,0.01) inset;
}

.turntable-vinyl-label {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--peach-accent);
    border: 3px solid #111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-charcoal);
    font-family: var(--font-serif);
    font-size: 0.45rem;
    font-weight: 800;
}

.turntable-spindle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2d9cd;
    border: 2px solid #555;
    position: absolute;
}

/* Turntable metallic physical tonearm stylus */
.turntable-tonearm {
    position: absolute;
    right: 25px;
    top: 25px;
    width: 50px;
    height: 190px;
    transform-origin: 25px 25px;
    transform: rotate(26deg); /* 26 deg = resting, 48 deg = playing */
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10;
    pointer-events: none;
}

.tonearm-pivot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, #dfd8cf 30%, #a89d90 100%);
    border: 3px solid #8e8376;
    position: absolute;
    left: 5px;
    top: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tonearm-rod {
    width: 6px;
    height: 140px;
    background: linear-gradient(90deg, #dfd8cf, #b4a99b);
    position: absolute;
    left: 22px;
    top: 35px;
    border-radius: 3px;
    transform-origin: top center;
}

.tonearm-headshell {
    width: 14px;
    height: 28px;
    background: #333;
    position: absolute;
    left: 18px;
    top: 165px;
    border-radius: 2px;
    transform: rotate(8deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

/* Premium Record Sleeve Album Jacket Card Grid */
.records-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 576px) {
    .records-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* Square cover art jacket wrapper */
.record-item-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    perspective: 1000px;
}

.record-album-deck {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
    cursor: pointer;
}

/* Slide-out disc representation container */
.record-vinyl-disc {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    background: radial-gradient(circle, #222 30%, #0d0d0d 70%, #000 100%);
    position: absolute;
    top: 5%;
    left: 5%;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #111;
}

.record-vinyl-disc::before {
    content: '';
    position: absolute;
    width: 80%; height: 80%;
    border: 1px dashed rgba(255,255,255,0.02);
    border-radius: 50%;
}

.record-vinyl-center {
    width: 32%;
    height: 32%;
    border-radius: 50%;
    background: var(--peach-accent);
    border: 2px solid #000;
}

/* The front cardboard record cover */
.record-sleeve {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-md);
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(44, 42, 41, 0.08);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-cozy);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
}

.record-sleeve::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(44,42,41,0.1) 40%, rgba(44,42,41,0.78) 100%);
    z-index: 1;
}

.record-badge {
    position: relative;
    z-index: 3;
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    color: var(--text-charcoal);
    background: rgba(255, 255, 255, 0.9);
    border: 0.5px solid var(--border-cozy);
    box-shadow: var(--shadow-soft);
}

.record-badge.chillwave { color: #cc785c; }
.record-badge.groove { color: #7f6fa3; }
.record-badge.ambient { color: #5a8e73; }

.record-info-block {
    position: relative;
    z-index: 3;
    color: var(--text-white);
}

.record-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    margin-bottom: 2px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.record-artist {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.85);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Card slide-out animations on hover */
.record-album-deck:hover .record-vinyl-disc {
    transform: translateX(45px) rotate(180deg);
    z-index: 1;
}

.record-album-deck:hover .record-sleeve {
    transform: translateX(-10px);
    box-shadow: 12px 16px 35px rgba(44, 42, 41, 0.15);
}

.record-album-deck.active .record-vinyl-disc {
    transform: translateX(40px) rotate(120deg);
}

.record-album-deck.active .record-sleeve {
    transform: translateX(-8px);
    border-color: var(--peach-accent);
}

/* Detail specs below jacket */
.record-details-card {
    background: var(--bg-card);
    border: 1px solid var(--border-cozy);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-soft);
}

.tracklist {
    list-style: none;
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tracklist li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(44,42,41,0.05);
    padding-bottom: 2px;
}

.tracklist li span.track-num {
    font-family: var(--font-mono);
    color: var(--peach-accent);
    font-weight: bold;
    margin-right: 6px;
}

/* Sidebar filter list box */
.lounge-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-box {
    background: var(--bg-card);
    border: 1px solid var(--border-cozy);
    border-radius: var(--border-radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-soft);
}

.filter-box-title {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-charcoal);
    border-bottom: 1px solid rgba(44,42,41,0.04);
    padding-bottom: 8px;
}

.filter-node {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-node:hover {
    color: var(--text-charcoal);
}

.filter-bullet-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--text-muted);
    transition: var(--transition-fast);
}

.filter-node.is-active {
    color: var(--text-charcoal);
    font-weight: bold;
}

.filter-node.is-active .filter-bullet-dot {
    background: var(--peach-accent);
    border-color: var(--peach-accent);
    box-shadow: 0 0 6px var(--peach-accent);
}

/* Form controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-strong);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    color: var(--text-charcoal);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-fast);
    width: 100%;
}

.form-control:focus {
    border-color: var(--peach-accent);
    box-shadow: 0 0 10px var(--peach-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Needle Stylus Calibrator Mini-Game */
.calibrator-visualizer {
    position: relative;
    width: 100%;
    height: 120px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--border-radius-md);
    background: #1c1a19; /* Equalizer scope screen */
    margin: 20px 0;
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
}

.calibrator-target-notch {
    position: absolute;
    width: 32px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 2px dashed var(--peach-accent);
    border-right: 2px dashed var(--peach-accent);
    background: rgba(230, 167, 144, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.calibrator-target-notch::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--peach-accent);
    box-shadow: 0 0 8px var(--peach-accent);
}

.calibrator-wave-bar {
    position: absolute;
    width: 8px;
    height: 100%;
    background: linear-gradient(to top, transparent 20%, var(--lavender-accent) 80%);
    box-shadow: 0 0 10px rgba(154, 145, 184, 0.3);
    border-radius: 4px;
    left: 0;
    transition: left 0.03s linear;
    z-index: 5;
}

.turntable-slider-arm {
    position: absolute;
    left: 50%;
    top: 15px;
    width: 140px;
    height: 140px;
    transform-origin: top center;
    transform: rotate(-15deg);
    z-index: 15;
    transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Turntable wood-metal parts assembler workshop */
.workshop-stage-chassis {
    width: 100%;
    max-width: 300px;
    height: 270px;
    border-radius: var(--border-radius-lg);
    background: #e2d9cd;
    border: 5px solid #c8bcb0;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(44, 42, 41, 0.08);
}

.workshop-platter {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #f1ede6;
    border: 2px solid #dfd8cf;
    position: absolute;
    left: 15px;
    top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workshop-slipmat {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #a49685;
    transition: var(--transition-smooth);
}

/* Customizer option buttons deck */
.lounge-options-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lounge-options-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.lounge-chip-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-cozy);
    color: var(--text-muted);
    font-family: var(--font-serif);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    user-select: none;
    box-shadow: var(--shadow-soft);
}

.lounge-chip-btn:hover {
    color: var(--text-charcoal);
    border-color: var(--peach-accent);
}

.lounge-chip-btn.is-active {
    background: var(--text-charcoal);
    color: var(--bg-cozy);
    border-color: var(--text-charcoal);
    box-shadow: 0 4px 12px rgba(44,42,41,0.15);
}

/* Digital LED printing logs screen */
.terminal-screen {
    background: #1e1b19;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--border-radius-md);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #dfd8cf;
    height: 160px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
}

.terminal-line {
    opacity: 0;
    transform: translateY(2px);
    animation: linePrint 0.2s forwards;
}

.terminal-line::before {
    content: '[LO-FI] ';
    color: var(--peach-accent);
}

.terminal-line.success::before {
    content: '[SYNC] ';
    color: var(--lavender-accent);
}

.terminal-line.fail::before {
    content: '[MISS] ';
    color: #cc785c;
}

@keyframes linePrint {
    to { opacity: 1; transform: translateY(0); }
}

/* Cozy Footer */
.lofideck-footer {
    border-top: 1px solid var(--border-cozy);
    background: rgba(255, 255, 255, 0.4);
    padding: 24px 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: auto;
    text-transform: uppercase;
}

.lofideck-footer span {
    color: var(--peach-accent);
    font-weight: bold;
}
