:root {
    --bg-dark: #0f0f1a;
    --bg-sidebar: #151528;
    --bg-player: #1a1a2e;
    --bg-card: #1f1f35;
    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    --accent: #ff6b9d;
    --accent-secondary: #c44569;
    --accent-tertiary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #ff6b9d, #c44569, #7c3aed);
    --accent-cyan: #00d9ff;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-purple: #8b5cf6;
    --border: rgba(255, 255, 255, 0.08);
    --glow: rgba(255, 107, 157, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    background-image: 
        radial-gradient(ellipse at top left, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(255, 107, 157, 0.06) 0%, transparent 50%);
}

.app-container {
    display: flex;
    height: 100vh;
    flex-direction: row;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-right: 1px solid var(--border);
    position: relative;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent), var(--accent-tertiary), transparent);
    opacity: 0.3;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 40px;
    filter: drop-shadow(0 0 10px var(--glow));
}

.logo .logo-icon {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-group {
    margin-bottom: 30px;
}

.nav-group h3 {
    font-size: 12px;
    color: var(--accent-purple);
    margin-bottom: 10px;
    padding-left: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-group ul {
    list-style: none;
}

.nav-group li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-group li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-gradient);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.nav-group li:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-group li:hover::before {
    height: 20px;
}

.nav-group li.active {
    background: linear-gradient(90deg, rgba(255, 107, 157, 0.15), rgba(124, 58, 237, 0.1));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.15);
}

.nav-group li.active::before {
    height: 24px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 120px; /* Space for taller player */
    position: relative;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.view-section {
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

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

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(90deg, #fff, #a8b2d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header .count {
    color: var(--accent-cyan);
    font-size: 14px;
}

.btn-play-all {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.btn-play-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.btn-play-all i {
    width: 18px;
    height: 18px;
}

.btn-bulk-download {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-bulk-download:hover:not(:disabled) {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.2);
}

.btn-bulk-download:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-bulk-download i {
    width: 18px;
    height: 18px;
}

.btn-clear-all {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-clear-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-clear-all i {
    width: 18px;
    height: 18px;
}

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Import View */
.import-card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-player));
    padding: 40px;
    border-radius: 20px;
    max-width: 640px;
    margin: 40px auto;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.import-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.import-card h2 {
    margin-bottom: 10px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.import-card > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.import-source-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.import-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.import-tab i {
    width: 16px;
    height: 16px;
}

.import-tab:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(255, 107, 157, 0.1);
}

.import-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.platform-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.input-group input {
    flex: 1;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.input-group button {
    padding: 0 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.input-group button i {
    width: 16px;
    height: 16px;
}

.input-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.import-hints {
    text-align: left;
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 8px;
}

.import-hints .hint-item p {
    margin-bottom: 8px;
}

.import-hints .hint-item p strong {
    color: var(--text-primary);
}

.import-hints code {
    display: block;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--accent);
    word-break: break-all;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Import Progress */
.import-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

#import-progress-title {
    color: var(--accent);
    font-weight: 500;
}

#import-progress-count {
    color: var(--text-secondary);
    font-size: 13px;
}

.import-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.import-progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.import-progress-log {
    max-height: 200px;
    overflow-y: auto;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 10px;
}

.import-progress-log .log-ok {
    color: var(--accent-green);
}

.import-progress-log .log-fail {
    color: var(--accent);
}

.import-progress-log .log-item {
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

/* Custom playlist nav items */
#custom-playlists-nav li {
    font-size: 13px;
    padding: 8px 12px;
    position: relative;
}

#custom-playlists-nav li .playlist-delete {
    opacity: 0;
    margin-left: auto;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

#custom-playlists-nav li:hover .playlist-delete {
    opacity: 0.6;
}

#custom-playlists-nav li:hover .playlist-delete:hover {
    opacity: 1;
    color: #ef4444;
}

.nav-badge {
    font-size: 11px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    padding: 1px 6px;
    margin-left: 4px;
    font-weight: 600;
}

.spin-icon {
    animation: spin 1.2s linear infinite;
}

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

/* Song List */
.song-list-header {
    display: grid;
    grid-template-columns: 36px 4fr 2fr 2fr 70px 110px;
    gap: 10px;
    padding: 12px 20px;
    color: var(--accent-purple);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.song-list-item {
    display: grid;
    grid-template-columns: 36px 4fr 2fr 2fr 70px 110px;
    gap: 10px;
    padding: 14px 20px;
    align-items: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.song-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    border-radius: 0 3px 3px 0;
    transition: opacity 0.3s ease;
}

.song-list-item:hover {
    background: linear-gradient(90deg, rgba(255, 107, 157, 0.08), rgba(124, 58, 237, 0.05));
}

.song-list-item:hover::before {
    opacity: 1;
}

.song-list-item.active {
    background: linear-gradient(90deg, rgba(255, 107, 157, 0.15), rgba(124, 58, 237, 0.1));
}

.song-list-item.active .col-song {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.song-list-item.active::before {
    opacity: 1;
}

.col-select {
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-select-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Remove Flex specific properties and ensure block/overflow handling */
.col-song { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.col-artist { color: var(--text-secondary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.col-album { color: var(--text-secondary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.col-time { text-align: right; color: var(--text-secondary); }
.col-action { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }

/* Remove old specific overrides if any */
.song-list-header .col-time { text-align: right; }
.song-list-header .col-action { text-align: right; justify-content: flex-end; }

.btn-icon-small {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-icon-small.active {
    color: #ef4444; /* Red for heart */
}

.btn-icon-small i {
    width: 16px;
    height: 16px;
}

.btn-icon-small.btn-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* Player Bar */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 110px;
    background: linear-gradient(180deg, var(--bg-player), #12121f);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    z-index: 300;
}

.player-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-tertiary), transparent);
}

.player-info {
    display: flex;
    align-items: center;
    width: 250px;
    gap: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.player-info:hover {
    opacity: 0.8;
}

.cover-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

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

.song-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.song-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-name {
    font-size: 12px;
    color: var(--text-secondary);
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 600px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mini-lyrics {
    font-size: 15px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    height: 24px;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 2px;
    opacity: 1;
    font-weight: 600;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.btn-icon:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon.mode {
    color: var(--accent-yellow);
}

.btn-main-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

.btn-main-play:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(255, 107, 157, 0.5);
}

.progress-bar-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: -4px;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s;
    overflow: hidden;
}

.progress-track:hover {
    height: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.progress-track:hover .progress-fill {
    background: var(--accent-gradient);
}

/* Player Actions */
.player-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 250px;
    justify-content: flex-end;
}

.player-actions .btn-icon {
    color: var(--text-secondary);
}

.player-actions .btn-icon:hover {
    color: var(--accent-cyan);
    background: rgba(0, 217, 255, 0.1);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-btn {
    flex-shrink: 0;
}

.volume-slider-wrapper {
    width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.volume-track {
    width: 100%;
    height: 40px;
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.volume-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    pointer-events: none;
}

.volume-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: linear-gradient(90deg, #ff6b9d, #c44569);
    border-radius: 3px;
    transition: width 0.1s;
    pointer-events: none;
    z-index: 1;
}

.volume-slider-wrapper:hover .volume-fill {
    box-shadow: 0 0 8px rgba(255, 107, 157, 0.5);
}

.volume-thumb {
    position: absolute;
    left: 80%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.volume-slider-wrapper:hover .volume-thumb,
.volume-dragging .volume-thumb {
    opacity: 1;
}

/* Old mini-lyrics style removal */
/* .mini-lyrics was moved up, we need to remove the old definition if it exists lower down to avoid conflict, 
   but I already edited it in place above. 
   Wait, I edited the NEW definition. 
   Is there an OLD definition still lingering at the bottom of the file?
   Let's check the previous Read output.
   Yes, lines 344-355 were mini-lyrics.
   And I just inserted the new definition around line 280.
   So I should remove the old one to be clean.
*/
.mini-lyrics-old-placeholder { display: none; }

.player-actions {
    width: 250px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* Lyrics Overlay */
.lyrics-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Cover full screen */
    z-index: 200; /* Above sidebar (which is implicitly 0 or 1, player bar is 300) */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    transform: translateY(100%); /* Hidden by default */
    background: rgba(18, 18, 18, 0.85); /* Semi-transparent dark background */
    backdrop-filter: blur(30px); /* Foggy effect */
    -webkit-backdrop-filter: blur(30px);
}

.lyrics-overlay.show {
    transform: translateY(0);
}

/* Remove or hide old lyrics-bg if we want pure foggy glass, 
   but usually we want the album art behind it.
   Let's keep lyrics-bg but make sure it is behind the overlay content 
   and maybe less blurred if the overlay itself is blurred? 
   Actually, standard is: bg image -> blur -> overlay color.
   The .lyrics-overlay has the color and blur.
   So .lyrics-bg should just be the image.
*/
.lyrics-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(60px) brightness(0.5); /* Strong blur on the image itself */
    z-index: -1;
    opacity: 0.6;
}

.lyrics-content {
    display: flex;
    width: 80%;
    height: 70%;
    gap: 50px;
    padding-bottom: 110px; /* Space for player bar since it covers full screen now */
    box-sizing: border-box;
}

.lyrics-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.lyrics-cover-img {
    width: 350px;
    height: 350px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: cover;
}

.lyrics-cover-placeholder {
    width: 350px;
    height: 350px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: rgba(255, 255, 255, 0.5);
}

.lyrics-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    color: white;
}

.lyrics-right h2 { font-size: 32px; margin-bottom: 10px; }
.lyrics-right p { color: #ccc; margin-bottom: 30px; }

.lyrics-scroll {
    height: 400px;
    overflow-y: auto;
    mask-image: linear-gradient(transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(transparent, black 10%, black 90%, transparent);
}

.lyric-line {
    padding: 10px 0;
    color: rgba(255,255,255,0.4);
    font-size: 16px;
    transition: all 0.3s;
}

.lyric-line.active {
    color: var(--accent);
    font-size: 20px;
    font-weight: bold;
}

/* Hide scrollbar for lyrics page */
.lyrics-scroll::-webkit-scrollbar {
    display: none;
}

.close-lyrics {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    z-index: 20;
    transition: color 0.2s;
}

.close-lyrics:hover {
    color: white;
}

/* Search Results */
.search-bar-container {
    padding: 0 0 20px 0;
}

.search-input-wrapper {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 20px;
    width: 100%;
    max-width: 720px;
    gap: 10px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.search-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15);
}

.search-input-wrapper i {
    color: var(--accent-cyan);
    margin-right: 2px;
}

.search-input-wrapper input {
    background: transparent;
    border: none;
    color: white;
    flex: 1;
    outline: none;
}

.search-source-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2px;
    gap: 4px;
    flex-shrink: 0;
}

.source-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.source-btn.active {
    background: var(--accent-gradient);
    color: white;
}

.source-btn:hover {
    color: white;
}

.search-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.search-btn:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 50px;
    color: var(--text-secondary);
    gap: 15px;
}

.empty-state i {
    color: var(--accent-purple);
    opacity: 0.4;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 15px;
}

.empty-state a {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.empty-state a:hover {
    color: var(--accent-secondary);
}

.search-load-more {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), var(--accent-tertiary));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-secondary), var(--accent));
}

/* ========== Mobile Menu Button ========== */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 400;
    background: var(--bg-player);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-menu-btn i {
    width: 22px;
    height: 22px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 499;
}

.sidebar-overlay.show {
    display: block;
}

/* ========== Mobile Responsive (max-width: 768px) ========== */
@media (max-width: 768px) {
    /* Show hamburger button */
    .mobile-menu-btn {
        display: flex;
    }

    /* Sidebar: slide-over drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 500;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 240px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Main content: full width */
    .main-content {
        padding-bottom: 80px; /* Smaller player bar on mobile */
    }

    .view-section {
        padding: 60px 16px 16px 16px; /* Top space for menu btn */
    }

    /* Section headers: stack on small screens */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .header-right {
        width: 100%;
    }

    .btn-play-all, .btn-clear-all, .btn-bulk-download {
        font-size: 13px;
        padding: 7px 14px;
    }

    /* Song list: hide album & time, simplify grid */
    .song-list-header {
        display: none; /* Hide column headers on mobile */
    }

    .song-list-item {
        grid-template-columns: 32px 1fr auto;
        gap: 8px;
        padding: 10px 12px;
    }

    .song-list-item .col-artist,
    .song-list-item .col-album,
    .song-list-item .col-time {
        display: none;
    }

    .song-list-item .col-song {
        font-size: 14px;
    }

    .col-action {
        gap: 4px;
    }

    /* Search bar: full width */
    .search-input-wrapper {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }

    .search-results {
        padding-bottom: 140px;
    }

    .search-load-more {
        position: sticky;
        bottom: 90px;
        z-index: 2;
        margin-top: 20px;
    }

    .search-input-wrapper i {
        display: none;
    }

    .search-source-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .source-btn {
        flex: 1;
        text-align: center;
    }

    .search-input-wrapper input {
        width: 100%;
        flex: unset;
    }

    .search-btn {
        width: 100%;
        padding: 10px 0;
        border-radius: 12px;
    }

    /* Import card */
    .import-card {
        padding: 20px;
        margin: 10px auto;
    }

    .import-source-tabs {
        gap: 4px;
    }

    .import-tab {
        padding: 6px 10px;
        font-size: 12px;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group button {
        padding: 12px;
        justify-content: center;
    }

    /* ---- Player Bar: compact mobile layout ---- */
    .player-bar {
        height: auto;
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 4px;
    }

    .player-info {
        width: auto;
        flex: 1;
        min-width: 0;
        gap: 10px;
    }

    .cover-img {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .song-name {
        font-size: 13px;
    }

    .artist-name {
        font-size: 11px;
    }

    .player-controls {
        order: 3;
        width: 100%;
        gap: 4px;
        max-width: 100%;
    }

    .mini-lyrics {
        display: none; /* Hide mini lyrics on mobile for space */
    }

    .control-buttons {
        gap: 16px;
    }

    .progress-bar-container {
        margin-top: 0;
    }

    .player-actions {
        width: auto;
        gap: 6px;
    }

    /* Hide volume slider on mobile (use hardware volume) */
    .player-actions .volume-slider,
    .player-actions .btn-icon[onclick="toggleMute()"] {
        display: none;
    }

    /* ---- Lyrics Overlay: vertical stack ---- */
    .lyrics-content {
        flex-direction: column;
        width: 90%;
        height: 85%;
        gap: 20px;
        padding-bottom: 80px;
        align-items: center;
    }

    .lyrics-left {
        justify-content: center;
        flex: 0 0 auto;
    }

    .lyrics-cover-img {
        width: 180px;
        height: 180px;
    }

    .lyrics-cover-placeholder {
        width: 180px;
        height: 180px;
    }

    .lyrics-right {
        flex: 1;
        text-align: center;
        min-height: 0;
    }

    .lyrics-right h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .lyrics-right p {
        margin-bottom: 16px;
        font-size: 14px;
    }

    .lyrics-scroll {
        height: 100%;
    }

    .lyric-line {
        font-size: 14px;
        padding: 8px 0;
    }

    .lyric-line.active {
        font-size: 17px;
    }

    .close-lyrics {
        top: 16px;
        right: 16px;
    }

    /* Empty state */
    .empty-state {
        padding: 30px 16px;
    }
}

/* ========== Small phones (max-width: 400px) ========== */
@media (max-width: 400px) {
    .view-section {
        padding: 56px 10px 10px 10px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .control-buttons {
        gap: 12px;
    }

    .btn-main-play {
        width: 36px;
        height: 36px;
    }

    .lyrics-cover-img,
    .lyrics-cover-placeholder {
        width: 140px;
        height: 140px;
    }
}
