/* ==========================================================================
   Local Music Player - Custom Glassmorphism Styling (Updated)
   ========================================================================== */

:root {
    font-size: 13.5px;
    --bg-dark: #0f1420;
    --bg-card: rgba(26, 33, 50, 0.75);
    --bg-card-hover: rgba(38, 48, 72, 0.88);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.12);

    --primary: #00d9f5;
    --primary-glow: rgba(0, 217, 245, 0.45);
    --accent: #cc86d1;
    --accent-glow: rgba(204, 134, 209, 0.45);
    --gradient-accent: linear-gradient(135deg, #00f5a0 0%, #00d9f5 18%, #7f7fd5 36%, #86a8e7 54%, #cc86d1 72%, #dcffbd 88%, #fffde4 100%);

    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-dim: #94a3b8;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    -webkit-user-drag: none;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000000;
    color: var(--text-main);
    position: relative;
}

/* WebGL Neon Chasing Heart Background Canvas */
.background-canvas,
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: block;
}

/* App Container Layout */
.app-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 220px 1fr;
    height: 100vh;
    width: 100vw;
    background: transparent;
}

/* Sidebar */
.sidebar {
    background: rgba(10, 13, 20, 0.78);
    border-right: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    padding: 16px 14px;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    border-radius: var(--radius-md);
    padding: 4px 6px;
    margin-left: -4px;
    margin-right: -4px;
}

.brand:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.brand:hover .logo-icon {
    box-shadow: 0 0 25px var(--primary-glow);
    transform: scale(1.05);
}

.brand:active {
    transform: scale(0.98);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px var(--primary-glow);
    overflow: hidden;
    transition: var(--transition);
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: rgba(0, 242, 254, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 242, 254, 0.3);
    font-weight: 600;
}

/* Nav menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: left;
}

.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    display: inline-block;
    text-align: center;
}

.icon-cat {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    vertical-align: middle;
    border-radius: 4px;
}

.icon-cat.icon-nhacdo {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
    background-image: url("../assets/logo/vietnam.png");
}

.icon-cat.icon-tghy,
.icon-cat.icon-trghy {
    background-image: url("../assets/logo/trghy.jpg");
}

.icon-cat.icon-cooking {
    background-image: url("../assets/logo/cooking.png");
}

.icon-cat.icon-alone {
    background-image: url("../assets/logo/person.png");
}

.icon-cat.icon-cloud {
    background-image: url("../assets/logo/cloud-music.png");
}

.icon-cat.icon-karaoke {
    background-image: url("../assets/logo/karaoke.png");
}

.icon-cat.icon-giaitri,
.icon-cat.icon-game {
    background-image: url("../assets/logo/game-over.png");
}

.icon-cat.icon-wedding {
    background-image: url("../assets/logo/wedding-couple.png");
}

.icon-cat.icon-sleep {
    background-image: url("../assets/logo/sleeping.png");
}

.icon-cat.icon-note {
    background-image: url("../assets/logo/note.png");
}

.cat-tag-btn .icon-cat {
    width: 16px;
    height: 16px;
}

.cat-tag-btn .icon-cat.icon-nhacdo {
    width: 15px;
    height: 10px;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: var(--bg-glass);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(0, 242, 254, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 242, 254, 0.25);
}

.count-badge {
    margin-left: auto;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
}

.sidebar-section {
    margin-top: 12px;
}

.sidebar-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 12px;
    padding-left: 8px;
}

.folder-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
}

.folder-item:hover {
    color: var(--text-main);
    background: var(--bg-glass);
}

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

.folder-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
}

.folder-item.active .folder-dot {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* System Status */
.system-status {
    margin-top: auto;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.green {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-rows: 52px 215px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.top-header {
    --header-control-height: 32px;
    --header-control-gap: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--header-control-gap);
    padding: 0 20px;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(10, 13, 20, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0 14px;
    border-radius: var(--radius-full);
    height: var(--header-control-height);
    width: 360px;
    flex: 0 1 360px;
    min-width: 0;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(255, 255, 255, 0.08);
}

.search-box svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.9rem;
    width: 100%;
    min-width: 0;
}

#clear-search {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Live Search Results Dropdown Overlay (Mobile View Only) */
.search-results-dropdown {
    display: none !important;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #ffffff !important;
    font-size: 0.92rem;
    text-align: left;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.search-result-item:hover, .search-result-item:active {
    background: rgba(0, 242, 254, 0.3) !important;
    border-color: #00f2fe !important;
}

.search-result-item .search-song-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #00f2fe !important;
}

.search-result-item .search-song-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    gap: 2px;
}

.search-result-item .search-song-title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.search-result-item .search-song-title .highlight-text {
    color: #00f2fe !important;
    font-weight: 800;
    background: rgba(0, 242, 254, 0.25) !important;
    padding: 0 4px !important;
    border-radius: 4px !important;
}

.search-result-item .search-song-folder {
    font-size: 0.78rem;
    color: #cbd5e1 !important;
}

.search-no-results {
    padding: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--header-control-gap);
    flex-shrink: 0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.header-actions .btn-icon {
    width: var(--header-control-height);
    height: var(--header-control-height);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.header-actions .btn-icon svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.header-actions .header-timer-btn {
    width: auto;
    min-width: var(--header-control-height);
    padding: 0 6px;
    gap: 6px;
}

.timer-badge-text {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    width: max-content;
    max-width: 90vw;
}

.toast {
    pointer-events: auto;
    min-width: 260px;
    max-width: 380px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #f1f5f9;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastPopCenter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.toast-warning {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(30, 25, 15, 0.96);
    color: #fef08a;
}

.toast.toast-success {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(15, 30, 22, 0.96);
    color: #a7f3d0;
}

@keyframes toastPopCenter {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Player Stage (Center) */
.player-stage {
    position: relative;
    display: grid;
    grid-template-columns: 135px 1fr;
    grid-template-rows: 1fr auto;
    padding: 12px 24px 14px;
    gap: 18px;
    background: linear-gradient(180deg, rgba(16, 20, 30, 0.35) 0%, rgba(8, 10, 15, 0.65) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-glass);
    overflow: hidden;
}

/* Audio Spectrum Visualizer Background */
.visualizer-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.45;
}

#visualizer-canvas {
    width: 100%;
    height: 100%;
}

/* Vinyl Turntable Display */
.turntable-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-disc {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #222 0%, #111 70%, #000 100%);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8), 0 0 12px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

.vinyl-disc.playing {
    animation: spinVinyl 12s linear infinite;
}

@keyframes spinVinyl {
    100% { transform: rotate(360deg); }
}

.vinyl-grooves {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.05);
}

.vinyl-center {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5), 0 0 10px var(--primary-glow);
    border: 2.5px solid #111;
    overflow: hidden;
    position: relative;
}

.vinyl-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.vinyl-art {
    font-size: 1.6rem;
}

/* Track Info */
.track-info {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.track-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 650px;
}

.current-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-chip {
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
}

/* Player Controls Section */
.player-controls {
    grid-column: 1 / -1;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto 160px;
    align-items: center;
    gap: 20px;
}

/* Progress Slider */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.slider-wrapper {
    position: relative;
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: height 0.15s ease, background 0.15s ease;
}

.slider-wrapper:hover {
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
}

.slider-wrapper input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    margin: 0;
}

.slider-fill {
    position: relative;
    height: 100%;
    width: 0%;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    box-shadow: 0 0 12px var(--primary-glow);
    transition: width 0.05s linear;
}

.slider-thumb {
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%) scale(0.7);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary-glow);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
    pointer-events: none;
}

.slider-wrapper:hover .slider-thumb,
.slider-wrapper.active .slider-thumb {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Tooltip time preview on hover */
.seek-tooltip {
    position: absolute;
    bottom: 18px;
    transform: translateX(-50%);
    background: #0d1019;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 10px var(--primary-glow);
    z-index: 20;
    white-space: nowrap;
}

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

.btn-mode-cycle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-mode-cycle:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.track-sub-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.btn-heart-fav {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-heart-fav:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.btn-heart-fav.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    transform: scale(1.08);
}

.btn-player-more {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-player-more:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.menu-option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.menu-option-btn span {
    color: var(--text-dim);
    transition: var(--transition);
}

.menu-option-btn.active {
    background: rgba(0, 217, 245, 0.12);
    border-color: var(--primary);
}

.menu-option-btn.active span {
    color: var(--text-main);
}

.menu-option-btn:hover {
    background: rgba(0, 242, 254, 0.12);
    border-color: var(--primary);
}

.play-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-ctrl {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-ctrl svg {
    width: 24px;
    height: 24px;
}

.btn-ctrl:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

.btn-play {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: var(--transition);
}

.btn-play svg {
    width: 20px;
    height: 20px;
}

.btn-play:hover {
    transform: scale(1.08);
    box-shadow: 0 0 35px var(--primary);
}

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

/* Volume */
.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon-small {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-icon-small svg {
    width: 20px;
    height: 20px;
}

.volume-wrapper {
    width: 100px;
}

/* Playlist Section */
.playlist-section {
    padding: 12px 24px 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: rgba(8, 10, 15, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.playlist-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.playlist-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.playlist-title span {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.playlist-sort select {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    padding-right: 8px;
    flex: 1;
}

.song-list::-webkit-scrollbar {
    width: 6px;
}

.song-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}

.song-item {
    display: grid;
    grid-template-columns: 40px 1fr auto 40px;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    background: transparent;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.song-item:hover {
    background: var(--bg-card);
}

.song-item.active {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.song-index {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: 500;
}

.song-item.active .song-index {
    color: var(--primary);
    font-weight: 700;
}

.song-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.song-title-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.highlight-text {
    color: var(--primary);
    background: rgba(0, 242, 254, 0.15);
    padding: 0 2px;
    border-radius: 2px;
}

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

.song-tags-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-tag-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.88rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.45;
    transition: var(--transition);
}

.cat-tag-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
    transform: scale(1.15);
}

.cat-tag-btn.active {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--primary);
    opacity: 1;
    box-shadow: 0 0 10px var(--primary-glow);
    transform: scale(1.08);
}

/* 3-Dots Action Menu */
.song-actions-wrapper {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.btn-song-more {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-song-more:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.song-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: rgba(18, 22, 34, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: 50;
    min-width: 130px;
    padding: 4px;
    display: flex;
    flex-direction: column;
}

.dropdown-item {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 8px 12px;
    font-size: 0.85rem;
    text-align: left;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#confirm-modal {
    z-index: 10500;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #121622;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 480px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal-content.small {
    width: 380px;
}

.management-data-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.management-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.025);
}

.management-section-title {
    margin: 0 0 2px;
    color: var(--text-main);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.management-stat-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-main);
    font-size: 0.88rem;
}

.management-stat-row strong,
.management-stat-row > span:last-child {
    text-align: right;
}

.management-stat-row-muted {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.management-progress-track {
    height: 10px;
    margin: 4px 0 2px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.management-progress-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #a78bfa);
    transition: width 180ms ease;
}

.management-data-body #management-refresh-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.management-orphan-cleanup-btn {
    width: 100%;
}

.management-orphan-cleanup-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.modal-content.admin-notes-modal-content {
    width: min(720px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    display: flex;
    flex-direction: column;
}

.admin-notes-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.btn-note-filter {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    padding: 6px 11px;
    cursor: pointer;
    font-size: 0.78rem;
}

.btn-note-filter.active,
.btn-note-filter:hover {
    color: var(--primary);
    border-color: rgba(0, 242, 254, 0.45);
    background: rgba(0, 242, 254, 0.1);
}

.admin-notes-status,
.song-request-status-message {
    min-height: 1.2em;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.admin-notes-status.is-error,
.song-request-status-message.is-error,
.song-request-empty.is-error {
    color: #fca5a5;
}

.admin-notes-list,
.song-request-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    min-height: 0;
}

.admin-notes-list {
    flex: 1;
}

.admin-note-item,
.song-request-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.admin-note-item-header,
.song-request-item-header,
.song-request-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-note-item-header time,
.song-request-item-header time,
.admin-note-item > small,
.song-request-limit,
.note-request-auth-status {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notes-header > h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.song-request-message {
    margin: 0;
    color: var(--text-main);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
}

.song-request-reply {
    margin: 0;
    padding: 8px 10px;
    border-left: 2px solid var(--primary);
    color: var(--text-muted);
    font-size: 0.82rem;
    white-space: pre-wrap;
}

.song-request-status {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.72rem;
}

.status-new { color: #67e8f9; background: rgba(34, 211, 238, 0.12); }
.status-seen { color: #fcd34d; background: rgba(250, 204, 21, 0.12); }
.status-done { color: #86efac; background: rgba(34, 197, 94, 0.12); }
.status-rejected { color: #fca5a5; background: rgba(239, 68, 68, 0.12); }

.request-notes-container {
    overflow: hidden;
}

.song-request-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 auto;
}

.song-request-textarea {
    min-height: 110px;
    padding: 12px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.16);
}

.song-request-textarea:focus {
    border-color: rgba(0, 242, 254, 0.55);
}

.song-request-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
}

.song-request-history .notes-sub-header {
    margin: 0;
}

.song-request-list {
    overflow: auto;
    padding-right: 2px;
}

.song-request-empty {
    margin: 0;
    padding: 18px 8px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.admin-note-reply {
    width: 100%;
    min-height: 58px;
    resize: vertical;
    padding: 8px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.18);
    font: inherit;
    font-size: 0.82rem;
}

.admin-note-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.timer-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 20px;
}

.timer-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.timer-btn:hover {
    background: var(--primary);
    color: #000;
}

.custom-timer-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    text-align: left;
}

.custom-timer-section label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.custom-timer-group {
    display: flex;
    gap: 8px;
}

#custom-timer-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
}

#custom-timer-input:focus {
    border-color: var(--primary);
}

.timer-submit-btn {
    background: var(--gradient-accent);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.timer-submit-btn:hover {
    box-shadow: 0 0 12px var(--primary-glow);
}

.timer-cancel-container {
    margin-top: 10px;
}

.timer-btn.danger {
    width: 100%;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.timer-btn.danger:hover {
    background: #ef4444;
    color: #fff;
}

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

.shortcut-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--primary);
    font-family: monospace;
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

/* Utilities */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Note Page Section Styling */
.notes-section {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: rgba(8, 10, 15, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    gap: 16px;
    grid-row: 2 / -1;
}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 14px;
}

.notes-title-group h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notes-title-group p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.note-save-status {
    font-size: 0.78rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
}

.notes-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.notes-unified-container {
    display: flex;
    flex-direction: column;
    background: rgba(22, 27, 38, 0.65);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    flex: 1;
    gap: 14px;
}

.notes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notes-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notes-toolbar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

.checklist-count-badge {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-glass);
    font-weight: 500;
}

.notes-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.notes-text-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 120px;
}

.notes-sub-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.notes-actions {
    display: flex;
    gap: 8px;
}

.btn-note-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-note-action:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.btn-note-action.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.notes-textarea {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
    font-family: 'Outfit', sans-serif;
}

.notes-checklist-container {
    display: flex;
    flex-direction: column;
    background: rgba(22, 27, 38, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.checklist-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checklist-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.checklist-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
}

.checklist-input-group input:focus {
    border-color: var(--primary);
}

.btn-add-checklist {
    background: var(--gradient-accent);
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.checklist-item.done span {
    text-decoration: line-through;
    color: var(--text-dim);
}

.checklist-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checklist-item span {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-main);
}

.btn-delete-check-item {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete-check-item:hover {
    color: #ef4444;
}

/* ==========================================================================
   /* ==========================================================================
   Mobile Bottom Navigation & Native App Layout (@media Queries)
   ========================================================================== */

/* Hide Mobile Elements on Desktop by default */
.mobile-bottom-nav,
.mobile-mini-player {
    display: none !important;
}

@media (max-width: 768px) {
    :root {
        font-size: 15px;
    }

    body {
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 70px;
    }

    /* Hide Desktop-only Header Action Icons on Mobile */
    .header-actions {
        display: none !important;
    }

    /* Show Mobile Navigation Bar & Mini Player on Mobile */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(12, 15, 23, 0.96);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-glass);
        align-items: center;
        justify-content: space-around;
        z-index: 1000;
        padding: 0 16px;
    }

    .mobile-nav-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        background: transparent;
        border: none;
        color: var(--text-dim);
        font-size: 0.72rem;
        font-weight: 500;
        cursor: pointer;
        padding: 6px 16px;
        border-radius: 12px;
        transition: all 0.2s ease;
    }

    .mobile-nav-tab svg {
        width: 22px;
        height: 22px;
        stroke: var(--text-dim);
        transition: all 0.2s ease;
    }

    .mobile-nav-tab.active {
        color: var(--primary);
        font-weight: 600;
    }

    .mobile-nav-tab.active svg {
        stroke: var(--primary);
        filter: drop-shadow(0 0 8px var(--primary-glow));
    }

    /* Floating Mobile Mini Player */
    .mobile-mini-player {
        display: flex !important;
        position: fixed;
        bottom: 72px;
        left: 12px;
        right: 12px;
        height: 56px;
        background: rgba(22, 28, 42, 0.95);
        backdrop-filter: blur(16px);
        border: 1px solid var(--border-glass);
        border-radius: 16px;
        align-items: center;
        justify-content: space-between;
        padding: 6px 14px;
        z-index: 999;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        cursor: pointer;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .mobile-mini-player.hidden {
        display: none !important;
    }

    .mini-player-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        overflow: hidden;
    }

    .mini-disc {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
        box-shadow: 0 0 10px var(--primary-glow);
        border: 2px solid var(--primary);
        background: #111;
    }

    .mini-disc.playing img {
        animation: spinVinyl 12s linear infinite;
    }

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

    .mini-track-info {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .mini-title {
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-main);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    .mini-btn-play {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: var(--gradient-accent);
        border: none;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 12px var(--primary-glow);
        cursor: pointer;
        flex-shrink: 0;
    }

    .mini-btn-play svg {
        width: 18px;
        height: 18px;
    }

    .app-container {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 70px);
        width: 100vw;
    }

    /* --------------------------------------------------------------------------
       MOBILE VIEW TAB 1: "Dành Cho Bạn" (Full-Screen Now Playing Player)
       -------------------------------------------------------------------------- */
    body.mobile-view-for-you {
        height: 100vh;
        height: 100dvh;
        overflow: hidden !important;
        padding-bottom: 64px;
        box-sizing: border-box;
    }

    body.mobile-view-for-you .app-container {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: unset !important;
        overflow: hidden !important;
        width: 100vw !important;
    }

    body.mobile-view-for-you .sidebar {
        display: none !important;
    }

    body.mobile-view-for-you .main-content {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        width: 100% !important;
        flex: 1 !important;
    }

    /* Show Top Header with Search Box on "Dành Cho Bạn" Tab */
    body.mobile-view-for-you .top-header {
        --header-control-height: 36px;
        display: flex !important;
        position: relative !important;
        z-index: 999999 !important;
        overflow: visible !important;
        padding: 10px 14px 8px;
        background: rgba(13, 16, 25, 0.98) !important;
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-glass);
        height: auto;
        flex-shrink: 0 !important;
    }

    body.mobile-view-for-you .search-box {
        position: relative !important;
        z-index: 999999 !important;
        overflow: visible !important;
        width: 100%;
        flex: 1;
        padding: 0 14px;
        background: rgba(255, 255, 255, 0.08);
    }

    body.mobile-view-for-you .search-results-dropdown {
        display: flex !important;
        position: absolute !important;
        top: calc(100% + 6px) !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 380px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        overscroll-behavior: contain !important;
        background: #0f172a !important;
        border: 2px solid #00f2fe !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.98), 0 0 30px rgba(0, 242, 254, 0.4) !important;
        z-index: 1000000 !important;
        padding: 8px !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    body.mobile-view-for-you .search-results-dropdown.hidden {
        display: none !important;
    }

    body.mobile-view-for-you .playlist-section,
    body.mobile-view-for-you .notes-section {
        display: none !important;
    }

    body.mobile-view-for-you .mobile-mini-player {
        display: none !important;
    }

    body.mobile-view-for-you .player-stage {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: space-evenly;
        flex: 1 !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 8px 16px 16px;
        border-bottom: none;
        background: radial-gradient(circle at 50% 25%, rgba(0, 217, 245, 0.12) 0%, rgba(9, 11, 16, 0.75) 75%);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        overflow: hidden;
    }

    body.mobile-view-for-you .turntable-wrapper {
        margin: 4px 0;
    }

    body.mobile-view-for-you .vinyl-disc {
        width: 165px;
        height: 165px;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 20px var(--primary-glow);
    }

    body.mobile-view-for-you .vinyl-center {
        width: 60px;
        height: 60px;
    }

    body.mobile-view-for-you .track-info {
        text-align: center;
        align-items: center;
        width: 100%;
        margin-bottom: 4px;
    }

    body.mobile-view-for-you .track-header h2 {
        font-size: 1.2rem;
        font-weight: 700;
        text-align: center;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #ffffff;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }

    body.mobile-view-for-you .player-controls {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 380px;
        gap: 12px;
    }

    body.mobile-view-for-you .progress-bar-container {
        width: 100%;
        gap: 10px;
        font-size: 0.78rem;
    }

    body.mobile-view-for-you .btn-mode-cycle {
        display: none !important;
    }

    body.mobile-view-for-you .control-buttons {
        position: relative;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 4px 0;
    }

    body.mobile-view-for-you .play-group {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 28px;
    }

    body.mobile-view-for-you .btn-player-more {
        position: absolute;
        right: 8px;
        width: 42px;
        height: 42px;
    }

    body.mobile-view-for-you .btn-play {
        width: 64px;
        height: 64px;
        box-shadow: 0 0 35px var(--primary-glow);
    }

    body.mobile-view-for-you .btn-play svg {
        width: 28px;
        height: 28px;
    }

    body.mobile-view-for-you .btn-ctrl svg {
        width: 26px;
        height: 26px;
    }

    body.mobile-view-for-you .volume-container {
        width: 100%;
        justify-content: center;
    }

    body.mobile-view-for-you .volume-wrapper {
        flex: 1;
        max-width: 220px;
    }

    /* --------------------------------------------------------------------------
       MOBILE VIEW TAB 2: "Của Tui" (Library & Category View)
       -------------------------------------------------------------------------- */
    body.mobile-view-library .player-stage {
        display: none !important;
    }

    body.mobile-view-library .top-header {
        display: none !important;
    }

    body.mobile-view-library .sidebar {
        display: flex !important;
        width: 100%;
        height: auto;
        padding: 12px 14px 8px;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        background: rgba(13, 16, 25, 0.95);
        position: sticky;
        top: 0;
        z-index: 100;
        overflow: hidden;
    }

    body.mobile-view-library .brand {
        margin-bottom: 10px;
        justify-content: flex-start;
    }

    body.mobile-view-library .brand-text h1 {
        font-size: 1.15rem;
    }

    /* Smooth Horizontal Touch Scroll for Category Navigation in "Của Tui" */
    body.mobile-view-library .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
        width: 100% !important;
        gap: 8px !important;
        margin-bottom: 4px !important;
        padding-bottom: 6px !important;
        scrollbar-width: none;
    }

    body.mobile-view-library .nav-menu::-webkit-scrollbar {
        display: none !important;
        height: 0px !important;
    }

    body.mobile-view-library .nav-item {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        width: auto !important;
        padding: 8px 14px !important;
        font-size: 0.85rem !important;
        border-radius: var(--radius-full) !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    body.mobile-view-library .sidebar-section {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 4px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    body.mobile-view-library .sidebar-section::-webkit-scrollbar {
        display: none;
    }

    body.mobile-view-library .sidebar-section h3 {
        display: none;
    }

    body.mobile-view-library .folder-list {
        display: flex;
        flex-direction: row;
        gap: 6px;
        white-space: nowrap;
    }

    body.mobile-view-library .folder-item {
        padding: 4px 10px;
        font-size: 0.78rem;
        border-radius: var(--radius-full);
        background: rgba(255, 255, 255, 0.04);
        flex-shrink: 0;
    }

    body.mobile-view-library .system-status {
        display: none;
    }

    body.mobile-view-library .main-content {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 140px);
        overflow: visible;
    }

    body.mobile-view-library .playlist-section,
    body.mobile-view-library .notes-section {
        display: flex;
        padding: 14px;
        height: auto;
        min-height: 350px;
        overflow: visible;
    }

    body.mobile-view-library .playlist-section.hidden,
    body.mobile-view-library .notes-section.hidden {
        display: none !important;
    }

    body.mobile-view-library .song-item {
        grid-template-columns: 24px 1fr auto 32px;
        gap: 8px;
        padding: 12px 10px;
    }

    /* Hide unlit/inactive category icons in song list rows on mobile */
    .cat-tag-btn:not(.active) {
        display: none !important;
    }
}

/* 3-Dots Dropdown Category Options Styling */
.dropdown-header-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    padding: 6px 10px 2px;
}

.dropdown-cat-item {
    justify-content: flex-start;
}

.dropdown-cat-item.active {
    color: var(--primary);
    background: rgba(0, 242, 254, 0.1);
}

.dropdown-cat-item .cat-check {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 4px 0;
}

/* Appwrite Admin Controls */
.auth-controls {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
    z-index: 2;
}

.admin-session {
    display: flex;
    align-items: center;
    gap: var(--header-control-gap);
}

.admin-user-label {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-dim);
    font-size: 0.75rem;
}

.auth-btn,
.auth-submit-btn {
    border: 1px solid rgba(0, 217, 245, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(0, 217, 245, 0.1);
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    padding: 8px 10px;
    white-space: nowrap;
    transition: var(--transition);
}

.top-header .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--header-control-height);
    padding: 0 12px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.auth-btn:hover,
.auth-submit-btn:hover {
    background: rgba(0, 217, 245, 0.2);
    transform: translateY(-1px);
}

.auth-btn.danger {
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form label {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.auth-form input {
    width: 100%;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.24);
    color: var(--text-main);
    padding: 10px 12px;
    outline: none;
}

.auth-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 217, 245, 0.12);
}

.auth-error {
    color: #fca5a5;
    font-size: 0.82rem;
    line-height: 1.35;
}

.auth-placeholder {
    color: var(--text-muted);
    line-height: 1.5;
}

#upload-placeholder-modal .modal-content {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

.upload-form input[type="file"] {
    padding: 8px;
    color: var(--text-muted);
}

.upload-file-meta {
    margin: -2px 0 2px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.upload-status {
    margin: 2px 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.upload-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(32vh, 260px);
    overflow-y: auto;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
}

.upload-file-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.upload-file-item + .upload-file-item {
    border-top: 1px solid var(--border-glass);
}

.upload-file-result {
    color: var(--text-muted);
}

.upload-file-item.is-uploading .upload-file-result {
    color: var(--primary);
}

.upload-file-item.is-success .upload-file-result {
    color: #a7f3d0;
}

.upload-file-item.is-error .upload-file-result {
    color: #fca5a5;
}

.upload-form :disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.upload-form .auth-submit-btn:disabled {
    transform: none;
}

.upload-status.is-uploading {
    color: var(--primary);
}

.upload-status.is-success {
    color: #a7f3d0;
}

.upload-status.is-error {
    color: #fca5a5;
}

@media (max-width: 900px) {
    .auth-controls {
        margin-left: 0;
    }

    .admin-user-label {
        display: none;
    }
}

/* ==========================================================================
   Lucide + Morphicons Icon System
   ========================================================================== */

/* Prev / Next buttons: span containers behave like the original SVG */
#prev-icon-container,
#next-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

/* Sidebar admin icon containers */
.sidebar-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    flex-shrink: 0;
    opacity: 0.75;
}

.folder-item:hover .sidebar-icon-container {
    opacity: 1;
}

/* Prev / Next micro-interactions */
#prev-btn,
#next-btn {
    transition: transform 120ms ease, color 120ms ease;
}

#prev-btn:hover,
#next-btn:hover {
    transform: scale(1.12);
    color: var(--text-main);
}

#prev-btn:active,
#next-btn:active {
    transform: scale(0.88);
    transition-duration: 80ms;
}

/* Mode cycle button icon container */
.mode-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    flex-shrink: 0;
}

#mode-repeat-svg {
    display: block;
}

/* Mode cycle active states */
.btn-mode-cycle.mode-one {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 217, 245, 0.1);
}

.btn-mode-cycle.mode-shuffle {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(204, 134, 209, 0.1);
}

.btn-mode-cycle.mode-sequential {
    /* default styling */
}

/* Auth button icon containers (Login, Upload, Logout) */
.btn-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    margin-right: 4px;
    flex-shrink: 0;
}

/* Play/Pause persistent SVG sizing */
#play-pause-svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* Volume persistent SVG sizing */
#vol-svg {
    display: block;
}

/* Mini player persistent SVG sizing */
#mini-pp-svg {
    display: block;
}
