:root {
    /* Theme Variables - Default: Pearl Eclipse */
    --bg-gradient-start: #0D0D0D;
    --bg-gradient-mid: #2C2C2C;
    --bg-gradient-end: #A9A9A9;
    --secondary-bg: #2C2C2C;
    --accent-1: #FFFFFF;
    --accent-2: #FFFFFF;
    --highlight: #FFFFFF;
    --text-main: #FFFFFF;
    --text-muted: #FFFFFF;
    --button-bg: #2C2C2C;
    --glass-bg: rgba(44, 44, 44, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Theme: Pearl Eclipse (Default) */
body[data-theme="pearl-eclipse"] {
    --bg-gradient-start: #0D0D0D;
    --bg-gradient-mid: #2C2C2C;
    --bg-gradient-end: #A9A9A9;
    --secondary-bg: #2C2C2C;
    --button-bg: #2C2C2C;
    --glass-bg: rgba(44, 44, 44, 0.4);
}

/* Theme: Nebula Drift */
body[data-theme="nebula-drift"] {
    --bg-gradient-start: #0F2027;
    --bg-gradient-mid: #2C5364;
    --bg-gradient-end: #B24592;
    --secondary-bg: #2C5364;
    --button-bg: #2C5364;
    --glass-bg: rgba(44, 83, 100, 0.4);
}

/* Theme: Gray Whisper */
body[data-theme="gray-whisper"] {
    --bg-gradient-start: #1A1A1A;
    --bg-gradient-mid: #3A3A3A;
    --bg-gradient-end: #5A5A5A;
    --secondary-bg: #2A2A2A;
    --button-bg: #3A3A3A;
    --glass-bg: rgba(58, 58, 58, 0.4);
}

/* Theme: Sunset Pulse */
body[data-theme="sunset-pulse"] {
    --bg-gradient-start: #F15B6C;
    --bg-gradient-mid: #BA7850;
    --bg-gradient-end: #6A0572;
    --secondary-bg: #d79e78;
    --button-bg: #DE5B6B;
    --glass-bg: rgba(227, 147, 98, 0.4);
}

/* Theme: Crystal Fade */
body[data-theme="crystal-fade"] {
    --bg-gradient-start: #1A2832;
    --bg-gradient-mid: #2D4A5C;
    --bg-gradient-end: #2C3E50;
    --secondary-bg: #1E2F3A;
    --button-bg: #2D4A5C;
    --glass-bg: rgba(45, 74, 92, 0.4);
}


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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
    transition: background 0.5s ease;
}

/* Glassmorphism patterns */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    border-radius: 20px;
}

/* Karaoke Mode Controls */
.btn-karaoke-toggle {
    margin-top: 10px;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.btn-karaoke-toggle:hover,
.btn-karaoke-toggle.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFFFFF;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.karaoke-controls {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-top 0.4s ease;
    opacity: 0;
    margin-top: 0;
    background: var(--glass-bg);
    border-radius: 16px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--glass-border);
}

.karaoke-controls.active {
    max-height: 400px;
    /* Increased height for all controls */
    opacity: 1;
    margin-top: 24px;
    padding: 24px;
}

.karaoke-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.karaoke-row:last-child {
    margin-bottom: 0;
}

.karaoke-label {
    font-size: 0.85rem;
    color: #ffffff;
    /* Pure white */
    width: 60px;
    text-align: left;
    text-transform: uppercase;
    font-weight: 700;
    /* Bolder */
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    /* Better readability on dark */
}

.karaoke-slider-container {
    flex: 1;
    margin: 0 16px;
    position: relative;
    display: flex;
    align-items: center;
}

.karaoke-value-display {
    width: 60px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #ffffff;
    /* Pure white */
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.karaoke-meta {
    font-size: 0.7rem;
    color: #FFFFFF;
    text-align: center;
    margin-top: 2px;
}

/* Custom Range Slider Styling - Modern, Responsive Design */
/* Reset global input[type=range] to avoid conflicts */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
}

/* Track - Background line - Full visibility */
input[type=range]::-webkit-slider-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
}

/* Override browser's default filled track (progress) - show full track only */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    -webkit-appearance: none;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    border: none;
}

/* Remove Firefox's progress fill */
input[type=range]::-moz-range-progress {
    background: transparent;
}

/* Thumb - Slider knob */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.1);
    border: 2px solid var(--accent-1);
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

input[type=range]::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

input[type=range]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.1);
    border: 2px solid var(--accent-1);
    transition: all 0.2s ease;
}

input[type=range]::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

input[type=range]::-moz-range-thumb:active {
    transform: scale(1.1);
}

input[type=range]:focus {
    outline: none;
}

input[type=range]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px var(--glass-border), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Full track line - always visible across entire width */
.karaoke-slider-container,
.volume-slider-container {
    position: relative;
}

.karaoke-slider-container::before,
.volume-slider-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    pointer-events: none;
    z-index: 1;
    width: 100%;
    transition: background 0.1s ease;
}

/* Center indicator line (only for karaoke sliders) */
.karaoke-slider-container::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 0;
}

/* Reset Buttons - Individual buttons next to each slider */
.btn-slider-reset {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.btn-slider-reset:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #FFFFFF;
    transform: rotate(180deg);
}

.btn-slider-reset i {
    color: #FFFFFF;
}

.btn-slider-reset:active {
    transform: rotate(180deg) scale(0.95);
}

.btn-slider-reset i {
    font-size: 0.85rem;
}

/* Specific color for pitch slider thumb/track highlight if needed */
.slider-pitch::-webkit-slider-thumb {
    background: #ffffff;
}

h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}

h1, h2, h3, p, span, label, button, input, select, textarea {
    color: #FFFFFF;
}

/* Ensure all icons are pure white */
i, .fas, .far, .fab {
    color: #FFFFFF;
}

#app {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Navigation Styles */
.navigation {
    width: 280px;
    height: calc(100% - 32px);
    margin: 16px;
    display: flex;
    flex-direction: column;
    padding: 32px;
    z-index: 100;
    background: var(--secondary-bg);
    background: linear-gradient(180deg, var(--secondary-bg) 0%, var(--bg-gradient-mid) 100%);
    transition: background 0.5s ease;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 48px;
    color: #FFFFFF;
    width: 100%;
    padding-top: 0;
}

.logo-image {
    width: 250px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) contrast(1.2) saturate(0); /* Pure white with enhanced contrast */
    transition: width 0.3s ease;
    margin-bottom: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force hardware acceleration for better rendering */
}

.logo span {
    color: #FFFFFF;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: #FFFFFF;
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-links li span,
.nav-links li i {
    color: #FFFFFF;
}

.nav-links li:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.nav-links li.active {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Icons - Pure White */
.nav-links li i {
    font-size: 1.3rem;
    width: 28px;
    text-align: center;
    color: #FFFFFF;
}

/* Main Content Area */
#main-content {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

/* View Container */
.view-container {
    width: 100%;
    min-height: 100%;
    display: block;
    opacity: 1;
    visibility: visible;
}

.view-container.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Settings Icon */
.settings-icon {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.settings-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.settings-icon i {
    font-size: 1.2rem;
    color: #FFFFFF;
}

.logout-icon {
    position: fixed;
    top: 24px;
    right: 80px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.logout-icon:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: scale(1.1);
    border-color: rgba(255, 0, 0, 0.4);
}

.logout-icon i {
    font-size: 1.2rem;
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .logout-icon {
        right: 70px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .settings-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.theme-option {
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.theme-option:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.theme-option.active {
    border-color: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.theme-preview {
    height: 80px;
    width: 100%;
    border-radius: 0;
}

.pearl-eclipse-gradient {
    background: linear-gradient(135deg, #0D0D0D 0%, #2C2C2C 50%, #A9A9A9 100%);
}

.nebula-drift-gradient {
    background: linear-gradient(135deg, #0F2027 0%, #2C5364 50%, #B24592 100%);
}

.gray-whisper-gradient {
    background: linear-gradient(135deg, #4B4B4B 0%, #B0B0B0 50%, #EDEDED 100%);
}

.sunset-pulse-gradient {
    background: linear-gradient(135deg, #FF6E7F 0%, #FFB88C 50%, #6A0572 100%);
}

.crystal-fade-gradient {
    background: linear-gradient(135deg, #D7E1EC 0%, #6DD5ED 50%, #2C3E50 100%);
}

.theme-info {
    padding: 16px;
}

.theme-info h3 {
    color: #FFFFFF;
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.theme-info p {
    color: #FFFFFF;
    font-size: 0.85rem;
    opacity: 0.9;
}

.close-btn {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.close-btn i {
    color: #FFFFFF;
}

/* Modal Styles - Premium Feel */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    /* Darker overlay */
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-content.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.5s ease;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
}

/* Form Styles */
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #FFFFFF;
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #FFFFFF;
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent-1);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px var(--glass-border);
}

/* Player Controls - General Spacing */
.player-control-group-left,
.player-control-group-center,
.player-control-group-right {
    display: flex;
    align-items: center;
}

.player-control-group-left {
    gap: 24px;
}

.player-control-group-center {
    gap: 24px;
}

.player-control-group-right {
    gap: 24px;
}

/* Buttons */
button {
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
    transition: var(--transition-smooth);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

/* Notifications */
.notification {
    padding: 16px 24px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 0.95rem;
    display: none;
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

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

.notification.success {
    display: block;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #a5d6a7;
}

.notification.error {
    display: block;
    background: rgba(229, 115, 115, 0.15);
    border: 1px solid rgba(229, 115, 115, 0.3);
    color: #ffcdd2;
}

/* Action Buttons in Management Table */
.btn-play-track,
.btn-edit-track,
.btn-delete-track {
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
}

.btn-play-track:hover {
    color: var(--accent-1) !important;
    transform: scale(1.1);
}

.btn-edit-track:hover {
    color: var(--accent-1) !important;
    transform: scale(1.1);
}

.btn-delete-track:hover {
    color: #ff5252 !important;
    transform: scale(1.1);
    background: rgba(255, 107, 107, 0.1);
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Copyright Footer */
.copyright-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 12px 20px;
    z-index: 100;
    pointer-events: none; /* Allow clicks to pass through */
}

.copyright-footer p {
    color: #FFFFFF;
    font-size: 0.75rem;
    margin: 0;
    font-weight: 400;
    opacity: 0.8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }

    .navigation {
        width: calc(100% - 24px);
        height: 70px;
        margin: 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        padding: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        background: rgba(43, 20, 9, 0.95);
        backdrop-filter: blur(20px);
    }

    .logo {
        display: none; /* Hide logo in bottom nav */
    }

    .nav-links {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }

    .nav-links li {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        font-size: 0.75rem;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .nav-links li:hover {
        transform: none;
    }

    .nav-links li span {
        display: block;
    }

    .nav-links li.active {
        color: #FFFFFF;
    }

    .nav-links li.active i {
        color: #FFFFFF;
    }

    #main-content {
        padding: 20px;
        padding-bottom: 100px;
        padding-top: 0; /* Remove top padding since logo is positioned */
    }
    
    /* Mobile logo at top of main content - Responsive size, positioned lower */
    #main-content::before {
        content: '';
        display: block;
        width: 100%;
        height: clamp(140px, 18vh, 200px); /* Increased height to accommodate full logo */
        padding-top: 12px; /* Lower from top */
        background-image: url('Logo.png');
        background-size: clamp(140px, 45vw, 180px) auto;
        background-repeat: no-repeat;
        background-position: center top;
        background-position-y: 12px; /* Lower from top */
        filter: brightness(0) invert(1) contrast(1.2) saturate(0);
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        margin-bottom: 16px; /* More space below logo */
    }
    
    /* Responsive album art placeholder for mobile - very small for small screens */
    .album-art-placeholder {
        width: 30vw !important;
        height: 30vw !important;
        max-width: 120px !important;
        max-height: 120px !important;
        min-width: 80px !important;
        min-height: 80px !important;
        margin: 0 auto 6px !important;
    }
    
    .album-art-placeholder i {
        font-size: clamp(1.2rem, 3.5vw, 2rem) !important;
    }
    
    /* Responsive player content padding for mobile - minimal for small screens */
    .player-content {
        padding: 10px 8px !important;
        margin-top: 4px !important;
    }
    
    /* Responsive player controls for mobile - spread across full width with increased spacing */
    .player-controls {
        font-size: 0.85rem !important;
        gap: 16px !important;
        margin-top: 8px !important;
        max-width: 100% !important;
        width: 100% !important;
        justify-content: space-between !important;
        padding: 0 12px !important;
        align-items: center !important;
    }
    
    .player-controls > div {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* Left group (shuffle/repeat) - increased spacing */
    .player-control-group-left {
        gap: 20px !important;
        justify-content: flex-start !important;
    }
    
    /* Center group (main play controls) - significantly increased spacing */
    .player-control-group-center {
        gap: 20px !important;
        justify-content: center !important;
        flex: 1.2 !important; /* Slightly larger for main play controls */
    }
    
    /* Right group (lock/favorite) - increased spacing */
    .player-control-group-right {
        gap: 20px !important;
        justify-content: flex-end !important;
    }
    
    /* Individual icon spacing adjustments for mobile */
    .player-control-group-center i {
        margin: 0 2px !important; /* Additional micro-spacing between icons */
    }
    
    .player-controls #btn-master-play {
        font-size: clamp(1.5rem, 5vw, 2.5rem) !important;
        margin: 0 4px !important; /* Extra spacing around play button */
    }
    
    /* Responsive text for mobile - smaller with minimal spacing */
    #track-title {
        font-size: clamp(0.9rem, 3vw, 1.2rem) !important;
        margin-bottom: 2px !important;
        margin-top: 4px !important;
    }
    
    #track-artist {
        font-size: clamp(0.8rem, 2.5vw, 0.9rem) !important;
        margin-bottom: 6px !important;
    }
    
    /* Volume control - full width on mobile */
    .volume-control {
        margin-top: 24px !important;
        max-width: 100% !important;
        width: 100% !important;
        gap: 12px !important;
        padding: 0 8px !important;
    }
    
    .volume-slider-container {
        max-width: 100% !important;
        width: 100% !important;
        flex: 1 !important;
    }
    
    /* Karaoke button - compact but with spacing */
    .btn-karaoke-toggle {
        margin-top: 24px !important;
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
    }
    
    /* Reduce karaoke controls spacing if visible */
    .karaoke-controls {
        margin-top: 12px !important;
        padding: 12px !important;
        width: 100% !important;
    }
    
    .karaoke-row {
        margin-bottom: 16px !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }
    
    /* Karaoke sliders - full width on mobile */
    .karaoke-slider-container {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        order: 2 !important;
        margin: 8px 0 !important;
        padding: 0 4px !important;
    }
    
    .karaoke-label {
        order: 1 !important;
        width: auto !important;
        min-width: 60px !important;
        flex-shrink: 0 !important;
    }
    
    .karaoke-value-display {
        order: 3 !important;
        width: auto !important;
        min-width: 60px !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }
    
    .karaoke-key-display {
        order: 4 !important;
        flex-shrink: 0 !important;
        margin-left: 8px !important;
    }
    
    .btn-slider-reset {
        order: 5 !important;
        margin-left: 8px !important;
        flex-shrink: 0 !important;
    }
    
    /* Ensure main content is scrollable if needed */
    #main-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Management Table - Hide on mobile, show cards instead */
    .desktop-table {
        display: none !important;
    }
    
    .mobile-cards {
        display: block !important;
    }
    
    /* Track Cards Layout for Mobile */
    .management-cards-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 0;
        padding: 0 8px;
        padding-top: 28px; /* Extra space for logo to show completely */
    }
    
    .track-card {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 16px;
        backdrop-filter: blur(10px);
    }
    
    .card-header {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .card-checkbox {
        margin-top: 4px;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }
    
    .card-title {
        flex: 1;
        font-weight: 600;
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        color: #FFFFFF;
        line-height: 1.4;
    }
    
    .card-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: clamp(0.85rem, 2.2vw, 0.9rem);
    }
    
    .card-label {
        color: #FFFFFF;
        font-weight: 500;
        opacity: 0.9;
    }
    
    .card-value {
        color: #FFFFFF;
        text-align: right;
        flex: 1;
        margin-left: 12px;
    }
    
    .card-actions {
        display: flex;
        justify-content: flex-end;
        gap: 20px;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .card-actions i {
        font-size: 1.2rem;
        color: #FFFFFF;
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .card-actions i:hover {
        transform: scale(1.15);
    }
    
    .card-actions .btn-delete-track {
        color: #ff6b6b !important;
    }
    
    /* Ensure card container has proper spacing */
    .management-cards-container {
        margin-bottom: 20px;
    }
    
    /* Copyright Footer - Mobile */
    .copyright-footer {
        position: fixed;
        bottom: 60px; /* Above the bottom navigation bar */
        left: 0;
        padding: 8px 12px;
        z-index: 100;
    }
    
    .copyright-footer p {
        font-size: clamp(0.65rem, 1.8vw, 0.7rem);
        opacity: 0.7;
    }
}

/* Desktop - Show table, hide cards */
@media (min-width: 769px) {
    .desktop-table {
        display: block !important;
    }
    
    .mobile-cards {
        display: none !important;
    }
    
    /* Desktop table styling */
    .management-table {
        font-size: 0.9rem;
    }
    
    .management-table th,
    .management-table td {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .management-table .td-genre span {
        font-size: 0.85rem;
    }
}

/* Desktop - Show table, hide cards */
@media (min-width: 769px) {
    .desktop-table {
        display: block !important;
    }
    
    .mobile-cards {
        display: none !important;
    }
}

/* ============================================
   LOGIN SPLASH SCREEN STYLES
   ============================================ */

.login-splash-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    overflow: hidden;
}

.login-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-stage.active {
    display: flex;
    opacity: 1;
}

.login-stage.fade-out {
    opacity: 0;
}

.login-stage.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Video Stage */
#login-video-stage {
    background: #000;
}

.video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 30%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.9) 75%, rgba(0, 0, 0, 1) 100%);
    pointer-events: none;
    z-index: 2;
}

.video-wrapper video,
.login-video {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    object-fit: cover;
    background: #000;
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    position: relative;
    z-index: 0;
}

/* Theme-specific colored overlay for video - only applies when theme class is present */
.video-wrapper[class*="video-theme-"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
    mix-blend-mode: color;
    transition: opacity 0.5s ease;
}

/* Pearl Eclipse - Keep grayscale (default) */
.video-theme-pearl-eclipse::before {
    background: linear-gradient(135deg, rgba(13, 13, 13, 0.5) 0%, rgba(44, 44, 44, 0.5) 50%, rgba(169, 169, 169, 0.4) 100%);
    opacity: 0.4;
}

.video-theme-pearl-eclipse video,
.video-theme-pearl-eclipse .login-video {
    filter: grayscale(100%) brightness(0.9);
    -webkit-filter: grayscale(100%) brightness(0.9);
}

/* Nebula Drift - Blue/purple cosmic theme */
.video-theme-nebula-drift::before {
    background: linear-gradient(135deg, rgba(15, 32, 39, 0.85) 0%, rgba(44, 83, 100, 0.85) 50%, rgba(178, 69, 146, 0.75) 100%);
    mix-blend-mode: color;
    opacity: 0.85;
}

.video-theme-nebula-drift video,
.video-theme-nebula-drift .login-video {
    filter: grayscale(50%) hue-rotate(200deg) saturate(1.6) brightness(1.0) contrast(1.1);
    -webkit-filter: grayscale(50%) hue-rotate(200deg) saturate(1.6) brightness(1.0) contrast(1.1);
}

/* Gray Whisper - Subtle gray tones */
.video-theme-gray-whisper::before {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.75) 0%, rgba(58, 58, 58, 0.75) 50%, rgba(90, 90, 90, 0.65) 100%);
    opacity: 0.7;
}

.video-theme-gray-whisper video,
.video-theme-gray-whisper .login-video {
    filter: grayscale(100%) brightness(0.8) contrast(1.15);
    -webkit-filter: grayscale(100%) brightness(0.8) contrast(1.15);
}

/* Sunset Pulse - Orange/pink warm theme */
.video-theme-sunset-pulse::before {
    background: linear-gradient(135deg, rgba(241, 91, 108, 0.85) 0%, rgba(186, 120, 80, 0.85) 50%, rgba(106, 5, 114, 0.75) 100%);
    mix-blend-mode: color;
    opacity: 0.85;
}

.video-theme-sunset-pulse video,
.video-theme-sunset-pulse .login-video {
    filter: grayscale(45%) hue-rotate(15deg) saturate(1.7) brightness(1.05) contrast(1.1);
    -webkit-filter: grayscale(45%) hue-rotate(15deg) saturate(1.7) brightness(1.05) contrast(1.1);
}

/* Crystal Fade - Cyan/blue cool theme */
.video-theme-crystal-fade::before {
    background: linear-gradient(135deg, rgba(26, 40, 50, 0.85) 0%, rgba(45, 74, 92, 0.85) 50%, rgba(44, 62, 80, 0.75) 100%);
    mix-blend-mode: color;
    opacity: 0.85;
}

.video-theme-crystal-fade video,
.video-theme-crystal-fade .login-video {
    filter: grayscale(50%) hue-rotate(180deg) saturate(1.6) brightness(1.0) contrast(1.1);
    -webkit-filter: grayscale(50%) hue-rotate(180deg) saturate(1.6) brightness(1.0) contrast(1.1);
}

/* Logo Transition Stage */
#login-logo-stage {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
}

.logo-transition-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    animation: logoPulse 2s ease-in-out;
}

.login-logo-image {
    width: clamp(200px, 40vw, 400px);
    height: auto;
    filter: brightness(0) invert(1) contrast(1.2) saturate(0);
    image-rendering: crisp-edges;
    transform: translateZ(0);
    animation: logoFadeIn 1.5s ease-out;
}

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

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Login Form Stage */
#login-form-stage {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: formSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-logo-small {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.login-logo-small-image {
    width: clamp(120px, 25vw, 180px);
    height: auto;
    filter: brightness(0) invert(1) contrast(1.2) saturate(0);
    image-rendering: crisp-edges;
    transform: translateZ(0);
}

.login-title {
    text-align: center;
    color: #FFFFFF;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-input-group label {
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.login-input-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.login-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-input-group input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.login-error {
    padding: 12px 16px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.4);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 0.9rem;
    text-align: center;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.login-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--button-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.login-submit-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.login-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-submit-btn i {
    font-size: 0.9rem;
}

/* Mobile Responsive for Login */
@media (max-width: 768px) {
    .login-form-wrapper {
        padding: 32px 24px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .login-logo-image {
        width: clamp(150px, 50vw, 250px);
    }

    .login-logo-small-image {
        width: clamp(100px, 30vw, 150px);
    }

    .video-wrapper video,
    .login-video {
        min-height: 100vh;
        filter: grayscale(100%);
        -webkit-filter: grayscale(100%);
    }
}

/* Filter Panel Styles */
.filter-panel {
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 8px;
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-group input[type="text"],
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.filter-group input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.filter-group select option {
    background: var(--secondary-bg);
    color: #FFFFFF;
}

.filter-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-1);
}

#btn-clear-filters {
    transition: all 0.3s ease;
}

#btn-clear-filters:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile Responsive for Filter Panel */
@media (max-width: 768px) {
    .filter-panel {
        padding: 16px !important;
    }
    
    .filter-panel > div:first-child {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-panel h2 {
        font-size: 1.2rem;
    }
    
    .filter-panel > div:last-child {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}