/* ===== ROOT VARIABLES ===== */
:root {
    --bg-dark: #1a1a1a;
    --bg-darker: #0f0f0f;
    --text-light: #e0e0e0;
    --text-dim: #888;
    --accent: #666;
    --border: #333;
    --shadow: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
    /* Safe area insets for Android/iOS notch & navigation */
    --safe-area-top: env(safe-area-inset-top, 24px);
    --safe-area-bottom: env(safe-area-inset-bottom, 24px);

    /* 🎯 FLUID TYPOGRAPHY - Scales with viewport */
    --text-xs: clamp(0.65rem, 0.6rem + 0.25vw, 0.75rem);
    --text-sm: clamp(0.75rem, 0.7rem + 0.3vw, 0.875rem);
    --text-base: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
    --text-lg: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1rem + 0.8vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    --text-3xl: clamp(2rem, 1.5rem + 1.5vw, 2.5rem);

    /* 🎯 FLUID SPACING */
    --space-xs: clamp(0.25rem, 0.2rem + 0.2vw, 0.5rem);
    --space-sm: clamp(0.5rem, 0.4rem + 0.3vw, 0.75rem);
    --space-md: clamp(0.75rem, 0.6rem + 0.5vw, 1rem);
    --space-lg: clamp(1rem, 0.8rem + 0.6vw, 1.5rem);
    --space-xl: clamp(1.5rem, 1rem + 1vw, 2rem);

    /* 🎯 VINYL SCALING - Based on viewport minimum */
    --vinyl-size: min(55vh, 55vw, 700px);
    --platter-size: min(56vh, 56vw, 720px);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* iOS Input Fix - Ensures text input works properly in WebView */
input[type='text'],
input[type='search'],
input[type='email'],
input[type='password'],
textarea {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    caret-color: white; /* Visible cursor */
    color: #e0e0e0 !important;
    -webkit-user-select: text;
    user-select: text;
}

/* iOS specific - prevent zoom on focus */
@supports (-webkit-touch-callout: none) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* iOS Keyboard Open State - Prevents viewport shift */
body.keyboard-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.keyboard-open .mobile-search-modal,
body.keyboard-open .sidebar {
    position: fixed;
    bottom: var(--keyboard-height, 0);
    max-height: calc(
        100vh - var(--keyboard-height, 0) - var(--safe-area-top, 0)
    );
}

/* Fix for search input in iOS Capacitor */
.search-box input,
#searchInput,
#mobileSearchInput,
#mobileSlideSearchInput {
    -webkit-user-select: text !important;
    user-select: text !important;
    pointer-events: auto !important;
    touch-action: auto !important;
}

html {
    background: #000000;
    background-color: #000000;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #000000;
    background-color: #000000;
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
    position: relative;
    /* Android App Safe Area */
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
}

/* Wood grain texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Film grain effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    animation: grain 8s steps(10) infinite;
    z-index: 1;
}

@keyframes grain {
    0%,
    100% {
        transform: translate(0, 0);
    }
    10% {
        transform: translate(-5%, -10%);
    }
    20% {
        transform: translate(-15%, 5%);
    }
    30% {
        transform: translate(7%, -25%);
    }
    40% {
        transform: translate(-5%, 25%);
    }
    50% {
        transform: translate(-15%, 10%);
    }
    60% {
        transform: translate(15%, 0%);
    }
    70% {
        transform: translate(0%, 15%);
    }
    80% {
        transform: translate(3%, 35%);
    }
    90% {
        transform: translate(-10%, 10%);
    }
}

/* Scan lines */
.app-screen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 2;
}

/* ===== SPLASH SCREEN ===== */
.login-screen,
.splash-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, #2d2d2d 0%, #0f0f0f 100%);
    position: relative;
    z-index: 3;
}

.splash-container {
    text-align: center;
    padding: 3rem;
}

.splash-logo {
    margin-bottom: 1.5rem;
}

.splash-logo-img {
    width: 100px;
    height: 100px;
    animation: splashPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
}

@keyframes splashPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.splash-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    text-shadow: 2px 2px 4px var(--shadow);
    animation: fadeInUp 0.8s ease forwards;
}

.splash-tagline {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

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

/* Splash Loader Bar */
.splash-loader {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.splash-loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.3) 100%
    );
    border-radius: 3px;
    animation: splashLoad 2.5s ease forwards;
}

@keyframes splashLoad {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Legacy login styles (for logout redirect) */
.login-container {
    text-align: center;
    padding: 3rem;
    background: rgba(30, 30, 30, 0.8);
    border: 2px solid var(--border);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px var(--shadow);
}

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px var(--shadow);
}

.login-subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

/* ===== APP SCREEN ===== */
.app-screen {
    position: relative;
    z-index: 3;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVBAR ===== */
.navbar {
    background: #000000;
    border-bottom: none;
    padding: 1rem 2rem;
    padding-top: calc(1rem + var(--safe-area-top, 0px));
    backdrop-filter: none;
    position: relative;
    z-index: 100;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light) !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand .logo-text {
    font-family: 'Roboto', sans-serif;
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* Brand container with tagline */
.navbar-brand .brand-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.navbar-brand .brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand .brand-tagline {
    font-family: 'Roboto', sans-serif;
    font-size: 8px;
    font-weight: 400;
    color: var(--text-light);
    opacity: 0.6;
    letter-spacing: 0.5px;
    margin-left: 2px;
}

.navbar-brand i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
    vertical-align: middle;
}

/* 💕 HEART SYNC Indicator - Plain icon like search (no box) */
.heart-sync-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: 0.5rem;
}

.heart-sync-container:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Custom SVG Heart Container */
.heart-sync-svg {
    width: 28px;
    height: 26px;
    position: relative;
}

.heart-sync-svg svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Heart outline - always visible */
.heart-sync-svg .heart-outline {
    fill: none;
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 1.5;
    transition: stroke 0.3s ease;
}

.heart-sync-container:hover .heart-outline {
    stroke: rgba(255, 255, 255, 0.6);
}

/* Heart fill - gradient that rises from bottom */
.heart-sync-svg .heart-fill-path {
    fill: url(#heartGradient);
    clip-path: url(#heartClip);
    transition: none; /* JS handles smooth animation */
}

/* The clip rect that controls fill level */
.heart-sync-svg .heart-clip-rect {
    transition: y 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow effect when syncing */
.heart-sync-svg.syncing .heart-fill-path {
    filter: drop-shadow(0 0 4px rgba(255, 107, 129, 0.6));
}

/* Subtle pulse when actively learning */
@keyframes heartBreath {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.heart-sync-svg.syncing {
    animation: heartBreath 2s ease-in-out infinite;
}

/* 🌟 GINI GOLDEN GLOW - Jadhu ki jhappi when user shows extra love! */
@keyframes giniGoldenGlow {
    0% {
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0));
        transform: scale(1);
    }
    15% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1))
            drop-shadow(0 0 40px rgba(255, 165, 0, 0.8));
        transform: scale(1.3);
    }
    30% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9))
            drop-shadow(0 0 30px rgba(255, 165, 0, 0.6));
        transform: scale(1.15);
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 1))
            drop-shadow(0 0 50px rgba(255, 165, 0, 0.9));
        transform: scale(1.35);
    }
    70% {
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.7));
        transform: scale(1.1);
    }
    100% {
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0));
        transform: scale(1);
    }
}

.heart-sync-svg.gini-glow {
    animation: giniGoldenGlow 1.5s ease-in-out forwards !important;
}

/* Change heart gradient to golden during glow */
.heart-sync-svg.gini-glow .heart-fill-path {
    fill: url(#heartGradientGold) !important;
}

/* Percentage text - Hidden for clean look, heart fill tells the story */
.heart-sync-percent {
    display: none; /* Sirf dil dikhega, number nahi! */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .heart-sync-container {
        padding: 6px 10px;
        margin-right: 0.5rem;
    }
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-search-btn,
.mobile-menu-btn {
    display: none;
}

/* Mobile Sidebar Back Button - Hidden on desktop */
.mobile-sidebar-back {
    display: none;
}

/* Mobile Header Icons */
.mobile-header-icon {
    display: none;
    color: #fff;
    font-size: 1.25rem;
    padding: 8px;
    border: none;
    background: transparent;
    transition: opacity 0.2s ease;
}

.mobile-header-icon:hover,
.mobile-header-icon:focus {
    color: #fff;
    opacity: 0.8;
}

/* Mobile Sliding Search Bar */
.mobile-sliding-search {
    position: fixed;
    top: -73px;
    left: 0;
    right: 0;
    height: 73px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    padding: 0 1rem;
    gap: 12px;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.mobile-sliding-search.show {
    top: 0;
    opacity: 1;
}

/* Hide main navbar when search is active */
.mobile-sliding-search.show ~ .navbar,
.app-screen.search-active .navbar {
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

.search-back-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-back-btn:hover {
    transform: scale(1.1);
}

.slide-search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 14px 20px;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.slide-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.slide-search-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

/* Mobile Profile Menu */
.mobile-profile-menu {
    position: fixed;
    top: 60px;
    right: -250px;
    width: 220px;
    background: rgba(25, 25, 25, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 0 0 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-profile-menu.show {
    right: 0;
}

.mobile-profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
}

.mobile-profile-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-profile-item.logout {
    color: #ff6b6b;
}

.mobile-profile-item.logout:hover {
    background: rgba(255, 107, 107, 0.15);
}

.mobile-profile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.desktop-only {
    display: inline-block;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
}

.profile-btn .profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-btn .profile-info #userName {
    display: flex;
    align-items: center;
}

.profile-btn .heart-status-text.syncing {
    color: #ff6b81;
    animation: pulseText 2s ease-in-out infinite;
}

@keyframes pulseText {
    0%,
    100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.profile-btn .dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.profile-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.open .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.profile-dropdown-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.profile-dropdown-menu .dropdown-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.profile-dropdown-menu .dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.profile-dropdown-menu .logout-item {
    color: #ff6b6b;
}

.profile-dropdown-menu .logout-item:hover {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

/* Mobile Search Modal */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 300;
    display: none;
    flex-direction: column;
}

.mobile-search-modal.show {
    display: flex;
}

.mobile-search-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 30, 30, 0.8);
}

.mobile-search-header h5 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-light);
}

.mobile-search-header h5 i {
    margin-right: 0.5rem;
}

.mobile-search-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.main-content .row {
    margin: 0;
    height: 100%;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: #000000;
    border-right: none;
    padding: 1rem;
    overflow-y: auto; /* Enable scrolling */
    overflow-x: hidden;
    height: calc(100vh - 73px);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Vignette effect for sidebar */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

/* Platform Tabs - HIDDEN (replaced by heart button in search bar) */
.platform-tabs {
    display: none !important;
}

/* Library Heart Button - Minimal, no box */
.library-heart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 36px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
}

.library-heart-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    transform: scale(1.1);
}

.library-heart-btn.active {
    color: #ff4d6d;
}

.library-heart-btn .library-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.65rem;
    font-weight: 900;
    color: #000;
    background: none;
    border: none;
    padding: 0;
    padding-top: 2px;
    box-shadow: none;
    display: block;
    border-radius: 0;
    line-height: 1;
    z-index: 1;
}

/* Tab Content */
.tab-content {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 1.5rem;
    box-shadow: none;
    flex: 1;
    overflow: visible; /* Allow song-list to handle its own scroll */
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Search Box - Minimal Style */
.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

/* Mobile Back Button - Left of search (hidden on desktop) */
.search-back-btn {
    display: none;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    height: 44px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.search-box input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding: 0.3rem 0.5rem;
    font-size: 1rem;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.search-box input:focus {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Override Bootstrap form-control styles */
.search-box .form-control {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Search Button Inside - Minimal */
.search-btn-inside {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.search-btn-inside:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Hide old shortcut badge */
.search-shortcut-badge {
    display: none;
}

/* Song List */
.song-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    max-height: calc(100vh - 350px); /* Ensure scrolling after Load More */
    padding-right: 8px; /* Space for scrollbar */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

/* Slide-up animation for song items */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.song-item {
    background: transparent;
    border: 1px solid transparent;
    padding: 0.85rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: none;
    animation: slideUpFadeIn 0.4s ease forwards;
    opacity: 0;
}

.song-item:nth-child(1) {
    animation-delay: 0.05s;
}
.song-item:nth-child(2) {
    animation-delay: 0.1s;
}
.song-item:nth-child(3) {
    animation-delay: 0.15s;
}
.song-item:nth-child(4) {
    animation-delay: 0.2s;
}
.song-item:nth-child(5) {
    animation-delay: 0.25s;
}
.song-item:nth-child(6) {
    animation-delay: 0.3s;
}
.song-item:nth-child(7) {
    animation-delay: 0.35s;
}
.song-item:nth-child(8) {
    animation-delay: 0.4s;
}
.song-item:nth-child(9) {
    animation-delay: 0.45s;
}
.song-item:nth-child(10) {
    animation-delay: 0.5s;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.song-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 🎯 Quick Picks Section - Minimal style (same as regular items) */
.quick-pick-item {
    background: transparent;
    border: 1px solid transparent;
    position: relative;
}

.quick-pick-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.quick-pick-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.quick-pick-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 215, 0, 0.2),
        transparent
    );
}

.quick-pick-item:hover {
    border-color: rgba(255, 215, 0, 0.25);
    background: linear-gradient(
        135deg,
        rgba(60, 60, 60, 0.95) 0%,
        rgba(50, 50, 50, 0.9) 100%
    );
}

/* Load More Button */
.load-more-btn {
    text-align: center;
    padding: 1rem 0;
    margin-top: 0.5rem;
}

.load-more-btn button {
    background: rgba(60, 60, 60, 0.8);
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.load-more-btn button:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.load-more-btn button i {
    font-size: 1.1rem;
}

.song-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    object-position: center; /* 🎵 Perfect center crop for square thumbnails */
    border-radius: 8px;
    filter: grayscale(100%) !important;
    transition: filter 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0; /* Prevent thumbnail from shrinking */
}

.song-item:hover img {
    filter: grayscale(0%) !important;
}

.song-item.active img {
    filter: grayscale(0%) !important;
}

.song-item-info {
    flex: 1;
    min-width: 0;
}

.song-item-title {
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.song-item-artist {
    font-size: 0.875rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 🛡️ TRUST Badge - Simple line icons, fast load */
.trust-badge {
    font-size: 0.85rem;
    flex-shrink: 0;
    color: #1da1f2; /* Twitter/WhatsApp blue - user familiar */
    margin-right: 2px;
}

/* Verified channels get brighter blue */
.trust-badge.bi-patch-check-fill {
    color: #1da1f2;
}

/* Trusted channels slightly dimmer */
.trust-badge.bi-shield-check {
    color: #5b9bd5;
}

.song-item-remove {
    background: rgba(255, 50, 50, 0.2);
    border: 1px solid rgba(255, 50, 50, 0.5);
    color: #ff6666;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Add Button for Library (Plus Icon) */
.song-add-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-add-btn:hover {
    color: var(--text-light);
    transform: scale(1.15);
}

.song-add-btn.active {
    color: #e0e0e0;
    animation: addPulse 0.5s ease;
}

.song-add-btn.active i {
    animation: addFill 0.3s ease forwards;
}

@keyframes addPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

@keyframes addFill {
    0% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* 🎵 Play Next Queue Button (5 Mar 2026) */
.song-queue-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-queue-btn:hover {
    color: var(--text-light);
    transform: scale(1.15);
}

.song-queue-btn.queued {
    color: var(--accent);
}

.song-queue-btn.queued:hover {
    color: #ff6b6b;
}

/* Records Library Styles */
.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid var(--border);
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.library-count {
    background: rgba(60, 60, 60, 0.8);
    border: 1px solid var(--border);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.clear-library-btn {
    background: rgba(255, 50, 50, 0.2);
    border: 1px solid rgba(255, 50, 50, 0.5);
    color: #ff6666;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-library-btn:hover {
    background: rgba(255, 50, 50, 0.3);
    border-color: rgba(255, 50, 50, 0.7);
    transform: translateY(-2px);
}

.clear-library-btn:active {
    transform: translateY(0);
}

.empty-library {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}

.empty-library i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-library p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-library small {
    font-size: 0.875rem;
    opacity: 0.7;
}

.song-item-remove:hover {
    background: rgba(255, 50, 50, 0.4);
    border-color: #ff6666;
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(200, 200, 200, 0.3);
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(40, 40, 40, 0.6);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(60, 60, 60, 0.8);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.upload-area i {
    font-size: 3.5rem;
    color: rgba(200, 200, 200, 0.7);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.upload-area:hover i {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-5px);
}

.upload-area p {
    color: rgba(200, 200, 200, 0.9);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 400;
}

.upload-area p:first-of-type {
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(230, 230, 230, 1);
}

.upload-area .btn {
    margin-top: 1rem;
    background: rgba(200, 200, 200, 0.15);
    border: 1px solid rgba(200, 200, 200, 0.3);
    color: rgba(240, 240, 240, 0.95);
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.upload-area .btn:hover {
    background: rgba(220, 220, 220, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* ===== PLAYER AREA ===== */
.player-area {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: #000000;
    position: relative;
    overflow: visible; /* Allow controls to be visible */
    height: calc(100vh - 73px); /* Fixed height = navbar height subtracted */
}

/* Vignette effect */
.player-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
}

/* Vinyl Container */
.vinyl-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1rem;
    min-height: 0; /* Important for flex shrinking */
    overflow: visible;
}

/* Turntable Platter Base - Always Visible */
.turntable-platter {
    /* Responsive: 55% of viewport height OR 55% of container width, max 740px */
    width: min(55vh, 55vw, 740px);
    height: min(55vh, 55vw, 740px);
    border-radius: 50%;
    position: absolute;
    background: radial-gradient(circle, #2a2a2a 0%, #1a1a1a 40%, #0f0f0f 100%);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 15px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 80px rgba(0, 0, 0, 0.5),
        inset 0 2px 10px rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.platter-ring {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 0, 0, 0.3);
}

.platter-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        #444 0%,
        #222 50%,
        #111 100%
    );
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8),
        inset 0 1px 3px rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
}

.platter-spindle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #666 0%, #333 100%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Vinyl Disc - Hidden below, slides up when song plays */
.vinyl-disc {
    /* Responsive: almost same as platter, tiny edge visible */
    width: min(54vh, 54vw, 730px);
    height: min(54vh, 54vw, 730px);
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, #1a1a1a 0%, #0a0a0a 100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 10px 60px rgba(0, 0, 0, 0.8),
        inset 0 0 60px rgba(0, 0, 0, 0.6), inset 0 5px 20px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease;
    transform: translateY(150vh);
    opacity: 0;
    z-index: 2;
}

.vinyl-disc.loaded {
    animation: slideUpFromCover 1s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

/* 🎵 PAUSED STATE: Disc stays UP but doesn't spin
   When spinning class is removed, disc should stay in place */
.vinyl-disc.loaded:not(.spinning) {
    transform: translateY(0);
    opacity: 1;
    animation: none; /* Prevent re-triggering slideUp */
}

@keyframes slideUpFromCover {
    0% {
        transform: translateY(150vh);
        opacity: 0;
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Spinning ONLY when song is actually playing */
.vinyl-disc.spinning {
    animation: spin 3s linear infinite;
}

/* After slide-up completes, disc is at translateY(0), then spin takes over */
.vinyl-disc.loaded.spinning {
    transform: translateY(0);
    opacity: 1;
    animation: spin 3s linear infinite;
}

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

/* Vinyl Outer Ring */
.vinyl-outer-ring {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    border: 3px solid #2a2a2a;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Vinyl Grooves */
.vinyl-grooves {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle,
        #0f0f0f 0px,
        #0f0f0f 2px,
        #1a1a1a 2px,
        #1a1a1a 4px
    );
}

/* Vinyl Label */
.vinyl-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45%; /* Responsive percentage of vinyl */
    height: 45%;
    border-radius: 50%;
    background: radial-gradient(circle, #f5f5f5 0%, #d0d0d0 100%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Album Art */
.album-art {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    border-radius: 50%;
    overflow: hidden;
}

.album-art i {
    font-size: 4rem;
    color: #666;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    min-width: 100%;
    min-height: 100%;
}

/* Vinyl Center Hole */
.vinyl-center-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, #0a0a0a 0%, #000 100%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8),
        inset 0 0 5px rgba(255, 255, 255, 0.1);
}

/* Dust Particles on Vinyl */
.vinyl-disc::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-image: radial-gradient(
            circle,
            rgba(255, 255, 255, 0.1) 1px,
            transparent 1px
        ),
        radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 40px 40px;
    pointer-events: none;
}

/* 🎵 TONEARM - Pixel Perfect on ALL screens
   Position & arm length calculated by JavaScript
   CSS only handles appearance, animations, and base styles
   JS sets: right, top, transform, arm width */
.tonearm {
    position: absolute;
    /* Position will be set by JS based on vinyl position */
    right: 30px; /* Fallback - JS overrides */
    top: 50%; /* Fallback - JS overrides */
    transform: translateY(-50%) rotate(-25deg); /* Resting angle */
    transform-origin: right center;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
        right 0.3s ease-out, top 0.3s ease-out;
    z-index: 10;
    opacity: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.tonearm.visible {
    opacity: 1;
}

@keyframes fadeInTonearm {
    to {
        opacity: 1;
    }
}

.tonearm.playing {
    transform: translateY(-50%) rotate(-5deg);
}

.tonearm-base {
    width: 36px;
    height: 36px;
    background: radial-gradient(
        circle at 30% 30%,
        #999 0%,
        #555 50%,
        #333 100%
    );
    border-radius: 50%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid #444;
}

.tonearm-base::before {
    content: '';
    position: absolute;
    width: var(--base-inner, 12px);
    height: var(--base-inner, 12px);
    background: radial-gradient(circle, #777 0%, #444 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tonearm-arm {
    width: min(350px, 40vw); /* Responsive default, JS will override */
    min-width: 100px;
    max-width: 600px;
    height: 12px;
    background: transparent;
    position: relative;
    border-radius: 200px 200px 6px 6px;
    transform-origin: right center;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: width 0.3s ease-out;
}

/* Telescopic Segments */
.arm-segment {
    height: 10px;
    border-radius: 5px;
    position: absolute;
    right: 0;
    transition: width 0.3s ease-out;
}

.arm-segment.segment-1 {
    width: 100%;
    height: 14px;
    background: linear-gradient(180deg, #888 0%, #666 50%, #444 100%);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
    z-index: 1;
}

.arm-segment.segment-2 {
    width: 75%;
    height: 11px;
    background: linear-gradient(180deg, #999 0%, #777 50%, #555 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.35);
    border: 1px solid #666;
    z-index: 2;
}

.arm-segment.segment-3 {
    width: 50%;
    height: 8px;
    background: linear-gradient(180deg, #aaa 0%, #888 50%, #666 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    border: 1px solid #777;
    z-index: 3;
}

/* Segment highlight lines */
.arm-segment::before {
    content: '';
    position: absolute;
    left: 10%;
    top: 2px;
    width: 80%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    border-radius: 2px;
}

.tonearm-head {
    width: 26px;
    height: 26px;
    background: radial-gradient(
        circle at 30% 30%,
        #777 0%,
        #444 50%,
        #222 100%
    );
    border-radius: 50%;
    position: absolute;
    left: -13px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7),
        inset 0 2px 3px rgba(255, 255, 255, 0.2),
        inset 0 -2px 3px rgba(0, 0, 0, 0.4);
    border: 2px solid #555;
    z-index: 10;
    transition: left 0.3s ease-out;
}

.tonearm-head::before {
    content: '';
    position: absolute;
    width: var(--head-inner, 10px);
    height: var(--head-inner, 10px);
    background: radial-gradient(circle, #666 0%, #333 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.tonearm-head::after {
    content: '';
    position: absolute;
    left: var(--needle-left, -8px);
    top: 50%;
    transform: translateY(-50%);
    width: var(--needle-w, 10px);
    height: var(--needle-h, 3px);
    background: linear-gradient(90deg, #c9c9c9 0%, #888 100%);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Fullscreen Button */
.fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid var(--border);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 20;
}

/* Hide fullscreen button on mobile */
@media (max-width: 768px) {
    .fullscreen-btn {
        display: none;
    }
}

.fullscreen-btn:hover {
    background: rgba(60, 60, 60, 0.9);
    transform: scale(1.1);
    border-color: var(--accent);
}

/* Lyrics Overlay */
.lyrics-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s ease;
}

.lyrics-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lyrics-modal {
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid var(--border);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lyrics-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 10px 10px 0 0;
}

.lyrics-header h5 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-light);
}

.lyrics-header h5 i {
    margin-right: 0.5rem;
}

.lyrics-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    font-family: 'Roboto Mono', monospace;
    line-height: 2;
    white-space: pre-wrap;
    color: var(--text-light);
    border-radius: 0 0 10px 10px;
}

.lyrics-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-dim);
    text-align: center;
}

.lyrics-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.lyrics-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-dim);
}

.lyrics-error {
    color: #ff6666;
    text-align: center;
    padding: 2rem;
}

/* ===== CONTROLS PANEL ===== */
.controls-panel {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

/* Song Info */
.song-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.song-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sensor Whisper — contextual messages in song title area */
.song-title.sensor-whisper {
    color: var(--accent, #888);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.5px;
    white-space: normal;
    animation: whisperPulse 2s ease-in-out infinite;
}

@keyframes whisperPulse {
    0%,
    100% {
        opacity: 0.85;
    }
    50% {
        opacity: 1;
    }
}

/* New Year 2026 Celebration - Subtle shimmer */
.song-title.new-year-celebration {
    background: linear-gradient(
        90deg,
        var(--text-light) 0%,
        #c0c0c0 25%,
        #ffffff 50%,
        #c0c0c0 75%,
        var(--text-light) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: newYearShimmer 3s linear infinite;
    font-weight: 600;
    letter-spacing: 1px;
}

@keyframes newYearShimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

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

/* Progress Container */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.time-display {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-dim);
    min-width: 45px;
}

.progress-bar-container {
    flex: 1;
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #888 0%, #666 100%);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.progress-slider {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 8px;
    opacity: 0;
    cursor: pointer;
}

.progress-slider::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-light);
    cursor: pointer;
}

.progress-bar-container:hover .progress-slider {
    opacity: 1;
}

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

.control-btn {
    background: rgba(60, 60, 60, 0.6);
    border: 1px solid var(--border);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(80, 80, 80, 0.8);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.active {
    background: rgba(100, 100, 100, 0.9);
    border-color: var(--text-light);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.control-btn.muted {
    background: rgba(100, 50, 50, 0.9);
    border-color: #ff6666;
    color: #ff6666;
}

/* Add Button in Controls (Plus Icon) */
.control-btn.add-btn {
    font-size: 1.3rem;
}

.control-btn.add-btn.active {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.control-btn.add-btn.active i {
    animation: addPulse 0.3s ease;
}

/* 🔁 FEB 22: Repeat Button */
.control-btn.repeat-btn {
    font-size: 1.2rem;
}

.control-btn.repeat-btn.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
}

.control-btn.repeat-btn.active i {
    animation: repeatSpin 1s linear infinite;
}

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

/* Autoplay Toggle Switch - Text Inside */
.autoplay-toggle-container {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: none; /* Hidden - text is now inside toggle */
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 88px;
    height: 30px;
    margin: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 60, 60, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
}

/* Toggle ball */
.toggle-slider:before {
    position: absolute;
    content: '';
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Text inside toggle - Micro interaction style */
.toggle-text-off,
.toggle-text-on {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.toggle-text-off {
    right: 6px;
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.toggle-text-on {
    left: 8px;
    color: #fff;
    opacity: 0;
}

/* Checked state */
.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(58px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.toggle-switch input:checked + .toggle-slider .toggle-text-off {
    opacity: 0;
}

.toggle-switch input:checked + .toggle-slider .toggle-text-on {
    opacity: 1;
}

.toggle-slider:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

.play-btn {
    width: 70px;
    height: 70px;
    font-size: 2rem;
    background: rgba(80, 80, 80, 0.8);
}

.play-btn:hover {
    background: rgba(100, 100, 100, 0.9);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.volume-control i {
    font-size: 1.5rem;
    color: var(--text-dim);
}

/* Enhanced Inline Volume Control */
.volume-control-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.volume-icon-left,
.volume-icon-right {
    font-size: 1.1rem;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.volume-control-inline:hover .volume-icon-left,
.volume-control-inline:hover .volume-icon-right {
    color: var(--text-light);
}

.volume-slider-inline {
    width: 120px;
    height: 6px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider-inline:hover {
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
}

.volume-slider-inline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e0e0 0%, #999 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.volume-slider-inline::-webkit-slider-thumb:hover {
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.volume-slider-inline::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e0e0 0%, #999 100%);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.volume-slider-inline::-moz-range-thumb:hover {
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.volume-slider {
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-light);
    cursor: pointer;
    border: none;
}

/* ===== FULLSCREEN MODE ===== */
.fullscreen-mode .sidebar {
    display: none;
}

.fullscreen-mode .player-area {
    width: 100%;
    max-width: 100%;
    padding: 2rem 2rem 0 2rem;
}

.fullscreen-mode .vinyl-container {
    flex: 1;
    margin-bottom: 0;
}

/* Fullscreen Tonearm — JS handles dynamic sizing via updateTonearmPosition() */

.fullscreen-mode .vinyl-disc {
    width: min(77vh, 77vw, 910px);
    height: min(77vh, 77vw, 910px);
}

.fullscreen-mode .turntable-platter {
    width: min(78vh, 78vw, 920px);
    height: min(78vh, 78vw, 920px);
}

.fullscreen-mode .controls-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border);
    z-index: 100;
}

.fullscreen-mode .fullscreen-btn i::before {
    content: '\f32a';
}

/* ===== RESPONSIVE DESIGN ===== */

/* iPad Pro 12"+ and Large Tablets - Desktop-like experience */
@media (min-width: 1024px) and (max-width: 1400px) {
    /* Compact navbar for tablets */
    .navbar {
        padding: 0.5rem 1.5rem;
    }

    .navbar-brand .logo-text {
        font-size: 1.4rem;
    }

    .navbar-brand i {
        font-size: 1.4rem;
    }

    .player-area {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        height: calc(100vh - 50px);
        overflow: visible;
    }

    .vinyl-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    /* Vinyl sized for tablet */
    .vinyl-disc {
        width: min(53vh, 53vw, 470px);
        height: min(53vh, 53vw, 470px);
    }

    .turntable-platter {
        width: min(54vh, 54vw, 480px);
        height: min(54vh, 54vw, 480px);
    }

    .platter-center {
        width: 50px;
        height: 50px;
    }

    .platter-spindle {
        width: 12px;
        height: 12px;
    }

    .vinyl-label {
        width: 45%;
        height: 45%;
    }

    .album-art i {
        font-size: 3.5rem;
    }

    /* Tonearm sizing handled dynamically by JS updateTonearmPosition() */

    /* Controls panel - Inside player area, full width of player area */
    .controls-panel {
        position: relative;
        flex-shrink: 0;
        width: 100%;
        max-width: 100%;
        padding: 1rem 1.5rem 1.5rem 1.5rem;
        margin-bottom: 1rem;
        border-radius: 12px;
        border: 1px solid var(--border);
        z-index: 10;
        background: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(10px);
    }

    /* Song info - centered top */
    .song-info {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .song-title {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 0.15rem;
    }

    .song-artist {
        font-size: 0.85rem;
        display: block;
    }

    /* Progress bar - full width */
    .progress-container {
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }

    .time-display {
        font-size: 0.8rem;
        min-width: 40px;
    }

    /* Bottom row - Volume + Buttons + Autoplay in single line */
    .playback-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .control-btn {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .play-btn {
        width: 54px;
        height: 54px;
        font-size: 1.5rem;
    }

    /* Volume slider - show inline */
    .volume-control-inline {
        display: flex;
        flex: 0 0 auto;
    }

    .volume-slider-inline {
        width: 90px;
    }

    /* Autoplay toggle - show */
    .autoplay-toggle-container {
        display: flex;
        flex: 0 0 auto;
    }

    .toggle-switch {
        width: 95px;
        height: 28px;
    }

    /* Fix toggle ball position for this width */
    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(65px);
    }

    .sidebar {
        max-height: calc(100vh - 73px);
        overflow-y: auto;
    }
}

/* Smaller Tablets (iPad Air, iPad Mini landscape) */
@media (min-width: 769px) and (max-width: 1023px) {
    .player-area {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-y: auto;
        height: calc(100vh - 73px);
    }

    .vinyl-container {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 15px;
    }

    .vinyl-disc {
        width: min(47vh, 370px);
        height: min(47vh, 370px);
    }

    .turntable-platter {
        width: min(48vh, 380px);
        height: min(48vh, 380px);
    }

    .platter-center {
        width: 45px;
        height: 45px;
    }

    .platter-spindle {
        width: 12px;
        height: 12px;
    }

    .vinyl-label {
        width: 45%;
        height: 45%;
    }

    /* Tonearm sizing handled dynamically by JS updateTonearmPosition() */

    /* Controls - Inside player area, full width of player area */
    .controls-panel {
        position: relative;
        flex-shrink: 0;
        width: 100%;
        max-width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 12px;
        border: 1px solid var(--border);
        z-index: 10;
        background: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(10px);
    }

    /* Song info - centered top */
    .song-info {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .song-title {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 0.15rem;
    }

    .song-artist {
        font-size: 0.85rem;
        display: block;
    }

    /* Progress bar - full width */
    .progress-container {
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }

    .time-display {
        font-size: 0.8rem;
        min-width: 40px;
    }

    /* Bottom row - Volume + Buttons + Autoplay in single line */
    .playback-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .control-btn {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .play-btn {
        width: 54px;
        height: 54px;
        font-size: 1.5rem;
    }

    /* Volume slider - show inline */
    .volume-control-inline {
        display: flex;
        flex: 0 0 auto;
    }

    .volume-slider-inline {
        width: 90px;
    }

    /* Autoplay toggle - show */
    .autoplay-toggle-container {
        display: flex;
        flex: 0 0 auto;
    }

    .toggle-switch {
        width: 80px;
        height: 28px;
    }

    /* Make sidebar scrollable */
    .sidebar {
        max-height: calc(100vh - 73px);
        overflow-y: auto;
    }
}

/* 📱 iPad PORTRAIT Mode - Narrow width, tall height (768px-1180px width, portrait aspect) */
/* This catches ALL iPads in portrait orientation - treat it like mobile! */
/* iPad standard: 768px, iPad Air: 820px, iPad Pro 11": 834px, iPad Pro 12.9": 1024px */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait) {
    /* Hide sidebar, show only on demand (like mobile) */
    /* 🔧 FEB 22: Changed from slide to instant appear (better UX) */
    .sidebar {
        position: fixed;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        top: 0;
        z-index: 200;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        overflow-y: auto;
        padding: 1rem;
        padding-top: calc(1rem + var(--safe-area-top, 24px));
    }

    .sidebar.show {
        opacity: 1;
        visibility: visible;
    }

    /* Player takes full width - vinyl must be VERTICALLY CENTERED */
    .player-area {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 1.5rem 220px 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center; /* Center vertically */
        height: calc(100vh - 73px);
    }

    /* Vinyl container - USE FLEX TO CENTER */
    .vinyl-container {
        flex: 1; /* Take available space */
        display: flex;
        align-items: center; /* Vertical center */
        justify-content: center; /* Horizontal center */
        width: 100%;
    }

    /* Larger vinyl for iPad portrait (more screen space than phone) */
    .vinyl-disc {
        width: min(55vw, 450px);
        height: min(55vw, 450px);
    }

    .turntable-platter {
        width: min(57vw, 470px);
        height: min(57vw, 470px);
    }

    .vinyl-label {
        width: 45%;
        height: 45%;
    }

    .platter-center {
        width: 55px;
        height: 55px;
    }

    .platter-spindle {
        width: 14px;
        height: 14px;
    }

    .album-art i {
        font-size: 3rem;
    }

    /* Tonearm sizing handled dynamically by JS updateTonearmPosition() */

    /* Fixed controls at bottom - MOBILE STYLE (vertical stack) */
    .controls-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem 1.5rem;
        padding-bottom: calc(1.5rem + var(--safe-area-bottom, 24px));
        margin: 0;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        z-index: 100;
        background: rgba(30, 30, 30, 0.98);
        /* Reset to vertical layout like mobile */
        display: block;
        flex-direction: unset;
    }

    /* Song info - centered like mobile */
    .song-info {
        text-align: center;
        margin-bottom: 1rem;
    }

    .song-title {
        font-size: 1.4rem;
    }

    .song-artist {
        font-size: 1rem;
    }

    /* Progress bar - full width */
    .progress-container {
        margin-bottom: 1rem;
    }

    /* Playback controls - centered row */
    .playback-controls {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin-bottom: 0;
    }

    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .play-btn {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    /* Show mobile header icons */
    .mobile-header-icon {
        display: inline-block;
    }

    .mobile-sliding-search {
        display: flex;
    }

    /* Hide volume & autoplay on iPad portrait (like mobile) */
    .volume-control-inline {
        display: none;
    }

    .autoplay-toggle-container {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Mobile: Controls fixed at bottom */
    .player-area {
        padding: 1rem 1rem 200px 1rem;
    }

    .controls-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 1rem;
        padding-bottom: calc(
            1.5rem + var(--safe-area-bottom, 32px)
        ); /* Extra padding for Android nav bar */
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        z-index: 100;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .logo-text {
        display: inline; /* Show Play text on mobile */
        font-size: 1.5rem;
    }

    .desktop-only {
        display: none;
    }

    /* Hide volume slider on mobile - users use physical buttons */
    .volume-control-inline {
        display: none;
    }

    /* Add-to-list button visible on mobile */
    .control-btn.add-btn {
        display: inline-flex !important;
    }

    /* Mobile header icons */
    .mobile-header-icon {
        display: inline-block;
    }

    .mobile-sliding-search {
        display: flex;
    }

    .mobile-profile-menu {
        display: flex;
    }

    .mobile-search-btn,
    .mobile-menu-btn {
        display: none;
    }

    /* 🔧 FEB 22: Changed from slide to instant appear (better UX) */
    .sidebar {
        position: fixed;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        top: 0;
        z-index: 200;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem;
        padding-top: calc(
            1rem + var(--safe-area-top, 24px)
        ); /* Safe area for Android notch */
        display: flex;
        flex-direction: column;
    }

    .sidebar.show {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Back Button - Left of search (shown on mobile) */
    .search-back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        background: rgba(60, 60, 60, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        color: rgba(255, 255, 255, 0.8);
        font-size: 1.2rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .search-back-btn:active {
        transform: scale(0.9);
        background: rgba(80, 80, 80, 0.8);
    }

    .search-back-btn i {
        margin-left: -2px; /* Optical center */
    }

    /* Hide old floating button styles */
    .floating-back-btn {
        display: none !important;
    }

    .mobile-sidebar-back {
        display: none !important;
    }

    /* Make tab content fill remaining space and contain scroll */
    .sidebar .tab-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: visible; /* Let song-list handle scroll */
        border: none; /* Minimal look - Steve philosophy */
        background: transparent;
        padding: 0.5rem;
        /* FULL HEIGHT - Subtract: tabs(60px) + search(60px) + padding(20px) = 140px */
        height: calc(100vh - 140px) !important;
        height: calc(100dvh - 140px) !important;
    }

    .sidebar .tab-pane {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden; /* Let song-list handle scroll */
    }

    .sidebar .tab-pane.active {
        display: flex !important;
    }

    /* Song list scrolls INSIDE the container box - FULL HEIGHT on mobile */
    .sidebar .song-list {
        flex: 1;
        overflow-y: auto !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2rem; /* 🔧 FEB 22: Clean bottom spacing */
        min-height: 0;
        max-height: calc(
            100vh - 160px
        ) !important; /* Full viewport minus header */
        max-height: calc(100dvh - 160px) !important;
        height: auto !important;
    }

    .player-area {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center; /* Center vinyl vertically */
        padding: 1rem 1rem 200px 1rem; /* Extra bottom padding for controls */
        height: calc(100vh - 73px);
        min-height: calc(100vh - 73px);
    }

    .vinyl-container {
        flex: 0 0 auto; /* Don't stretch, natural size */
        margin: auto 0; /* Vertically center */
        overflow: visible;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .vinyl-disc {
        width: 68vw;
        height: 68vw;
        max-width: 470px;
        max-height: 470px;
    }

    .turntable-platter {
        width: 70vw;
        height: 70vw;
        max-width: 480px;
        max-height: 480px;
    }

    .platter-center {
        width: 50px;
        height: 50px;
    }

    .platter-spindle {
        width: 12px;
        height: 12px;
    }

    .vinyl-label {
        width: 48%;
        height: 48%;
    }

    .album-art i {
        font-size: 2.5rem;
    }

    /* Tonearm - JS handles all positioning on mobile
       Just adjust base/head sizes for smaller screens */
    .tonearm {
        /* Position set by JS - these are fallbacks only */
        transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
            right 0.3s ease-out, top 0.3s ease-out;
    }

    .tonearm.playing {
        /* Playing transform set by JS */
    }

    /* Tonearm sizing handled dynamically by JS updateTonearmPosition() */

    .controls-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem;
        margin: 0;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        z-index: 100;
    }

    .song-title {
        font-size: 1.2rem;
    }

    .playback-controls {
        gap: 1rem;
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }

    .play-btn {
        width: 60px;
        height: 60px;
    }

    /* Hide autoplay toggle on mobile */
    .autoplay-toggle-container {
        display: none;
    }
}

/* ===== SCROLLBAR STYLING ===== */
.sidebar::-webkit-scrollbar,
.song-list::-webkit-scrollbar,
.lyrics-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.song-list::-webkit-scrollbar-track,
.lyrics-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.song-list::-webkit-scrollbar-thumb,
.lyrics-content::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
}

.sidebar:hover::-webkit-scrollbar-thumb,
.song-list:hover::-webkit-scrollbar-thumb,
.lyrics-content:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar::-webkit-scrollbar-thumb:hover,
.song-list::-webkit-scrollbar-thumb:hover,
.lyrics-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== LOADING STATES ===== */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
}

.loading i {
    font-size: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ===== ERROR STATES ===== */
.error-message {
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid rgba(255, 50, 50, 0.3);
    color: #ff6666;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    margin: 1rem;
}

.error-message i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ===== EXTRA SMALL MOBILE ===== */
@media (max-width: 480px) {
    .vinyl-disc {
        width: 78vw;
        height: 78vw;
        max-width: 340px;
        max-height: 340px;
    }

    .turntable-platter {
        width: 80vw;
        height: 80vw;
        max-width: 350px;
        max-height: 350px;
    }

    .platter-center {
        width: 40px;
        height: 40px;
    }

    .platter-spindle {
        width: 10px;
        height: 10px;
    }

    .vinyl-label {
        width: 48%;
        height: 48%;
    }

    /* Tonearm sizing is now fully dynamic via JS updateTonearmPosition()
       Removed fixed breakpoint overrides to prevent conflicts */

    .album-art i {
        font-size: 2rem;
    }
}

/* ===== FOOTER ===== */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 15px 0;
    z-index: 100;
    font-size: 0.85rem;
}

.footer-content {
    text-align: center;
}

.footer-links {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

.footer-divider {
    color: var(--text-dim);
    margin: 0 10px;
    opacity: 0.5;
}

.footer-copyright {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.footer-copyright p {
    margin: 0;
}

.footer-copyright a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-copyright a:hover {
    color: var(--text-light);
}

/* Adjust main content to account for footer */
.main-content {
    padding-bottom: 80px !important; /* Extra space for footer */
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
    .app-footer {
        padding: 12px 0;
        font-size: 0.75rem;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-bottom: 10px;
    }

    .footer-divider {
        display: none;
    }

    .footer-links a {
        font-size: 0.8rem;
        padding: 5px 0;
    }

    .footer-copyright {
        font-size: 0.7rem;
    }

    .main-content {
        padding-bottom: 120px !important;
    }
}

/* Hide footer on login screen */
.login-screen ~ .app-footer {
    display: none;
}

/* ===== TOAST NOTIFICATIONS ===== */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-notification {
    animation: slideIn 0.3s ease;
}

/* ===== GUEST LOGIN PROMPT ===== */

/* Desktop: Song title area prompt styling */
.song-info.login-prompt-active {
    cursor: pointer;
    transition: all 0.3s ease;
}

.song-info.login-prompt-active:hover {
    transform: scale(1.02);
}

.song-info.login-prompt-active .song-title,
.song-info.login-prompt-active .song-artist {
    color: #ff6b81;
}

/* Mobile: Bottom Sheet Prompt */
.guest-login-prompt.mobile-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: translateY(100%);
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    padding: 0.75rem 1.5rem 2rem 1.5rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.guest-login-prompt.mobile-bottom-sheet.show {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto 1rem auto;
}

.guest-login-prompt.mobile-bottom-sheet .prompt-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.guest-login-prompt.mobile-bottom-sheet .prompt-text h4 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}

.guest-login-prompt.mobile-bottom-sheet .prompt-text p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

.guest-login-prompt.mobile-bottom-sheet .prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.prompt-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.prompt-btn-google:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.prompt-btn-google img {
    width: 20px;
    height: 20px;
}

.prompt-btn-later {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 10px;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.prompt-btn-later:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* � PWA INSTALL PROMPT - Same style as guest login prompt */
.pwa-install-prompt.mobile-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: translateY(100%);
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    padding: 0.75rem 1.5rem 2rem 1.5rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-install-prompt.mobile-bottom-sheet.show {
    transform: translateY(0);
}

.pwa-install-prompt .prompt-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.pwa-install-prompt .prompt-icon {
    color: var(--text-light);
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.pwa-install-prompt .prompt-icon svg {
    width: 48px;
    height: 48px;
}

.pwa-install-prompt .prompt-text h4 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}

.pwa-install-prompt .prompt-text p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

.pwa-install-prompt .prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.prompt-btn-install {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.prompt-btn-install:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 💕 HEART Feedback styles moved to HeartFeedback/style.css */
/* Player stays lightweight! Feedback page loads separately on Day 4+ */

/* 📱 PLAY STORE DOWNLOAD BANNER — Android web/PWA users */
.playstore-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px 20px 0 0;
    padding: 0.5rem 1.5rem 2rem;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.7);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Prevent layout shift — banner is overlay only */
    pointer-events: none;
}

.playstore-banner.show {
    transform: translateY(0);
    pointer-events: auto;
}

.playstore-banner-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 0.75rem;
}

.playstore-banner-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.6rem;
    padding: 4px 8px;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.playstore-banner-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

.playstore-banner-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
}

.playstore-banner-icon img {
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.playstore-banner-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.playstore-banner-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.playstore-banner-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.playstore-banner-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #1a1a1a;
    text-decoration: none;
}

.playstore-banner-later {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    padding: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.playstore-banner-later:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== iOS Safari Tap Hint - Glowing Effect ===== */
.tap-to-play-glow {
    display: inline-block;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 1px;
    animation: glowPulse 1.2s ease-in-out infinite;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes glowPulse {
    0%,
    100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5),
            0 0 10px rgba(255, 255, 255, 0.3);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.9),
            0 0 25px rgba(255, 255, 255, 0.6), 0 0 35px rgba(255, 255, 255, 0.4);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4),
            0 0 30px rgba(255, 255, 255, 0.2);
    }
}

/* ===== 🖥️ LARGE MONITORS (1920px+) - Full HD / 1080p ===== */
@media (min-width: 1920px) {
    .vinyl-disc {
        width: min(60vh, 700px);
        height: min(60vh, 700px);
    }

    .turntable-platter {
        width: min(62vh, 720px);
        height: min(62vh, 720px);
    }

    .vinyl-label {
        width: 42%;
        height: 42%;
    }

    .platter-center {
        width: 90px;
        height: 90px;
    }

    .platter-spindle {
        width: 22px;
        height: 22px;
    }

    .album-art i {
        font-size: 5rem;
    }

    /* Tonearm sizing handled dynamically by JS updateTonearmPosition() */

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

    .song-artist {
        font-size: 1.2rem;
    }

    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .play-btn {
        width: 85px;
        height: 85px;
        font-size: 2.5rem;
    }

    .sidebar {
        min-width: 400px;
    }

    .song-item {
        padding: 1.25rem;
    }

    .song-item img {
        width: 60px;
        height: 60px;
    }

    .song-item-title {
        font-size: 1.1rem;
    }
}

/* ===== 🖥️ ULTRA-WIDE MONITORS (2560px+) - QHD / Ultra-wide ===== */
@media (min-width: 2560px) {
    .vinyl-disc {
        width: min(55vh, 850px);
        height: min(55vh, 850px);
    }

    .turntable-platter {
        width: min(57vh, 870px);
        height: min(57vh, 870px);
    }

    .vinyl-label {
        width: 40%;
        height: 40%;
    }

    .platter-center {
        width: 100px;
        height: 100px;
    }

    .platter-spindle {
        width: 26px;
        height: 26px;
    }

    .album-art i {
        font-size: 6rem;
    }

    /* Tonearm sizing handled dynamically by JS updateTonearmPosition() */

    .song-title {
        font-size: 2rem;
    }

    .song-artist {
        font-size: 1.3rem;
    }

    .control-btn {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .play-btn {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }

    .sidebar {
        min-width: 450px;
    }

    .song-item {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .song-item img {
        width: 70px;
        height: 70px;
    }

    .song-item-title {
        font-size: 1.2rem;
    }

    .song-item-artist {
        font-size: 1rem;
    }

    .navbar {
        padding: 1.25rem 2.5rem;
    }

    .navbar-brand .logo-text {
        font-size: 2rem;
    }
}

/* ===== 📺 TV MODE (4K / Large Screens) - Remote Friendly ===== */
@media (min-width: 3000px), (min-height: 1600px) and (min-width: 2500px) {
    /* Bigger everything for TV viewing from sofa */
    .vinyl-disc {
        width: min(50vh, 1000px);
        height: min(50vh, 1000px);
    }

    .turntable-platter {
        width: min(52vh, 1020px);
        height: min(52vh, 1020px);
    }

    .platter-center {
        width: 120px;
        height: 120px;
    }

    .platter-spindle {
        width: 30px;
        height: 30px;
    }

    .vinyl-label {
        width: 38%;
        height: 38%;
    }

    .album-art i {
        font-size: 7rem;
    }

    /* Tonearm sizing handled dynamically by JS updateTonearmPosition() */

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

    .song-artist {
        font-size: 1.5rem;
    }

    .control-btn {
        width: 90px;
        height: 90px;
        font-size: 2.5rem;
    }

    .play-btn {
        width: 130px;
        height: 130px;
        font-size: 4rem;
    }

    .sidebar {
        min-width: 500px;
    }

    .song-item {
        padding: 2rem;
        margin-bottom: 1.25rem;
        border-radius: 15px;
    }

    .song-item img {
        width: 90px;
        height: 90px;
        border-radius: 12px;
    }

    .song-item-title {
        font-size: 1.5rem;
    }

    .song-item-artist {
        font-size: 1.2rem;
    }

    .navbar {
        padding: 1.5rem 3rem;
    }

    .navbar-brand .logo-text {
        font-size: 2.5rem;
    }

    /* TV Focus States for D-pad navigation */
    .song-item:focus,
    .control-btn:focus,
    .play-btn:focus {
        outline: 4px solid rgba(255, 255, 255, 0.8);
        outline-offset: 4px;
        transform: scale(1.05);
    }

    .search-box input {
        font-size: 1.5rem;
        padding: 1rem 1.5rem;
    }
}

/* ===== 📽️ PROJECTOR MODE - Dark room optimized ===== */
@media (min-aspect-ratio: 16/9) and (min-width: 1920px) {
    /* Ensure vinyl stays centered in ultra-wide */
    .player-area {
        max-width: 1600px;
        margin: 0 auto;
    }
}

/* ===== 🖥️ ULTRA-WIDE 21:9 Aspect Ratio ===== */
@media (min-aspect-ratio: 21/9) {
    /* Side panels on ultra-wide */
    .main-content .row {
        max-width: 2200px;
        margin: 0 auto;
    }

    .sidebar {
        min-width: 380px;
        max-width: 450px;
    }

    .player-area {
        flex: 1;
        max-width: 1200px;
    }

    .vinyl-container {
        max-width: 900px;
        margin: 0 auto;
    }
}

/* ===== 🎯 FOCUS STATES FOR ALL DEVICES ===== */
/* Keyboard & Remote navigation */
.song-item:focus-visible,
.control-btn:focus-visible,
.play-btn:focus-visible,
.nav-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: 3px;
}

/* ===== 🖼️ PORTRAIT MONITORS (Rotated) ===== */
@media (max-aspect-ratio: 3/4) and (min-height: 1000px) {
    /* Portrait mode - stack layout */
    .main-content .row {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .player-area {
        width: 100%;
        flex: 1;
    }

    .vinyl-disc {
        width: min(70vw, 60vh, 500px);
        height: min(70vw, 60vh, 500px);
    }

    .turntable-platter {
        width: min(72vw, 62vh, 520px);
        height: min(72vw, 62vh, 520px);
    }
}

/* ===== 🎯 DEVICE CLASS BASED STYLES (JavaScript adds these) ===== */

/* Touch devices - larger tap targets */
.touch-device .control-btn {
    min-width: 48px;
    min-height: 48px;
}

.touch-device .song-item {
    min-height: 60px;
}

/* Mouse devices - smaller precise controls */
.mouse-device .song-item:hover {
    cursor: pointer;
}

/* TV Mode - Extra large for couch viewing */
body.device-tv .song-item {
    padding: 1.75rem;
    margin-bottom: 1rem;
}

body.device-tv .control-btn {
    width: 80px;
    height: 80px;
    font-size: 2.2rem;
}

body.device-tv .play-btn {
    width: 120px;
    height: 120px;
    font-size: 3.5rem;
}

body.device-tv .song-title {
    font-size: 2.2rem;
}

body.device-tv .song-artist {
    font-size: 1.4rem;
}

/* TV Focus glow effect */
body.device-tv .song-item:focus,
body.device-tv .control-btn:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

/* Ultra-wide specific */
body.device-ultrawide .sidebar {
    min-width: 420px;
}

body.device-ultrawide .player-area {
    max-width: 1400px;
}

/* Mobile specific */
body.device-mobile .navbar {
    padding: 0.75rem 1rem;
}

body.device-mobile .song-item {
    padding: 0.875rem;
}

/* Portrait mode adjustments */
body.device-portrait .main-content .row {
    flex-direction: column;
}

body.device-portrait .sidebar {
    max-height: none; /* Full height when sidebar is open */
    height: 100vh;
    height: 100dvh;
    border-right: none;
    border-bottom: none;
}

/* TUNN whisper messages show in song title area (via tunn.js _showWhisper) */

/* ===== 📶 OFFLINE INDICATOR ===== */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b 0%, #c0392b 100%);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.offline-indicator.show {
    transform: translateY(0);
}

.offline-indicator i {
    font-size: 1rem;
    animation: pulse-offline 2s infinite;
}

@keyframes pulse-offline {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* When offline, push app content down slightly */
body.is-offline .app-screen {
    padding-top: 48px;
}

body.is-offline .navbar {
    top: 40px;
}

@media (max-width: 768px) {
    .offline-indicator {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    body.is-offline .app-screen {
        padding-top: 40px;
    }

    body.is-offline .navbar {
        top: 34px;
    }
}

/* ─── PiP (Picture-in-Picture) MODE ─────────────────────────────────────────── */
/* When app is in PiP mini window, show only essential player controls */

.pip-mode .sidebar,
.pip-mode .navbar,
.pip-mode .search-container,
.pip-mode .history-section,
.pip-mode .radio-banner,
.pip-mode .film-grain,
.pip-mode .heart-container,
.pip-mode .vibe-section,
.pip-mode .hero-section,
.pip-mode .footer,
.pip-mode .offline-banner,
.pip-mode .keyboard-shortcuts-hint {
    display: none !important;
}

.pip-mode {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.pip-mode .player-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--bg-dark, #1a1a1a);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
}

.pip-mode .song-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
    text-align: center;
}

.pip-mode .song-artist {
    font-size: 11px;
    opacity: 0.7;
}

.pip-mode .controls {
    margin-top: 4px;
}

.pip-mode .controls button {
    font-size: 20px;
    padding: 4px 12px;
}

.pip-mode .progress-bar,
.pip-mode .volume-container,
.pip-mode .player-extra-controls {
    display: none !important;
}

/* ============================================================================
   STANDBY MODE — Cinematic idle screen
   8 min no-touch → UI dims, vinyl stays lit, whisper messages float
   ============================================================================ */

/* Smooth transitions for all dimmable elements */
body.standby-active .navbar,
body.standby-active #controlsPanel,
body.standby-active #sidebar,
body.standby-active .heart-sync-container,
body.standby-active .search-container,
body.standby-active .mobile-toggle-btn,
body.standby-active .fullscreen-btn {
    opacity: 0.1 !important;
    transition: opacity 2s ease;
    pointer-events: none;
}

/* Wake-up transitions (when standby-active is removed) */
.navbar,
#controlsPanel,
#sidebar,
.heart-sync-container,
.search-container,
.mobile-toggle-btn,
.fullscreen-btn {
    transition: opacity 0.6s ease;
}

/* Vinyl stays at full — the star of the show */
body.standby-active .vinyl-container {
    opacity: 1 !important;
    transition: opacity 0.5s ease;
}

/* Dim the film grain and scanlines slightly in standby */
body.standby-active::after {
    opacity: 0.02 !important;
    transition: opacity 2s ease;
}

body.standby-active .app-screen::before {
    opacity: 0.02 !important;
    transition: opacity 2s ease;
}

/* Whisper message styling */
.standby-whisper {
    position: fixed;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: var(--text-sm);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
    z-index: 9999;
    text-align: center;
    max-width: 80vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.standby-whisper.standby-whisper-visible {
    opacity: 0.6;
}

/* Mobile adjustments for standby */
@media (max-width: 768px) {
    .standby-whisper {
        bottom: 20%;
        font-size: var(--text-xs);
        max-width: 90vw;
        letter-spacing: 1px;
    }
}
