:root {
    --primary: #1db954;
    --primary-dark: #19e68c;
    --primary-light: #1ed760;
    --accent: #f43f5e;
    --accent-light: #fb7185;
    --bg-black: #000000;
    --bg-dark: #121212;
    --bg-card: #181818;
    --bg-card-hover: #282828;
    --bg-sidebar: #000000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-dim: #727272;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-black);
    color: var(--text-primary);
    overflow-x: hidden;
    height: 100vh;
}

/* Background Gradient */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--success);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-80px, 80px) scale(0.9);
    }
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-black);
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
    height: 100vh;
}

.sidebar-top,
.sidebar-library {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 1rem;
}

.sidebar-top {
    padding-bottom: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 1.5rem;
}

.logo i {
    font-size: 1.5rem;
    color: var(--primary);
}

.logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-library {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0.5rem 0;
}

.library-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem 0.75rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    transition: color 0.2s ease;
    cursor: pointer;
}

.header-left:hover {
    color: white;
}

.header-left i {
    font-size: 1.25rem;
}

.add-playlist-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-playlist-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

.add-playlist-btn:hover i {
    transform: rotate(90deg);
}

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

.add-playlist-btn i {
    font-size: 1rem;
    transition: transform 0.4s ease;
}

.library-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem 1rem;
}

.filter-chip {
    padding: 0.35rem 0.75rem;
    background: #232323;
    border-radius: 500px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: background 0.2s ease;
}

.filter-chip:hover {
    background: #2a2a2a;
}

.filter-chip.active {
    background: white;
    color: black;
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.5rem;
}

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

.sidebar-list.scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    color: white;
}

.sidebar-list-item:hover {
    background: #1a1a1a;
}

.sidebar-list-item.active {
    background: #232323;
}

.item-art {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: #282828;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.liked-gradient {
    background: linear-gradient(135deg, #450af5, #c4efd9);
}

.liked-gradient i {
    color: white;
}

.item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sidebar-footer {
    padding: 0.5rem 1rem;
    background: var(--bg-dark);
    border-radius: 8px;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.admin-link:hover {
    color: white;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-item i {
    font-size: 1.2rem;
}

.badge {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: auto;
}

/* Playlist Section */
.playlist-section {
    flex: 1;
    overflow-y: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

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

.empty-state {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.875rem;
    padding: 1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(to bottom, #222222, var(--bg-dark) 40%);
    border-radius: 8px;
    margin: 8px 8px 0 0;
}

.content-header {
    padding: 2rem 2rem 1rem;
    border-bottom: none;
}

.content-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    max-width: 400px;
    transition: all 0.3s ease;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
}

#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.search-bar i {
    color: var(--text-secondary);
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Song Grid */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem;
    padding-bottom: 150px;
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.song-card {
    background: var(--bg-card);
    border: none;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.song-card:hover {
    background: var(--bg-card-hover);
    transform: none;
    box-shadow: none;
}

.song-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    background: #282828;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.fallback-icon {
    font-size: 3rem;
    color: #404040;
    z-index: 0;
}

.play-overlay {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(8px);
}

.song-card:hover .play-overlay {
    opacity: 1;
    transform: translateY(0);
}

.play-overlay button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: black;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.song-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.song-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.song-actions {
    display: none;
}

/* Player Bar */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-black);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    align-items: center;
    gap: 1rem;
    z-index: 100;
    height: 90px;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 300px;
}

.now-playing-cover {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    background: #282828;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.now-playing-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.now-playing-cover .fallback-icon {
    font-size: 1.2rem;
}

.now-playing-info {
    overflow: hidden;
    white-space: nowrap;
}

.now-playing-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.25rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: white;
    background: transparent;
}

.icon-btn.active {
    color: var(--primary);
}

.play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: none;
    color: black;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    transform: scale(1.05);
}

.progress-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #4d4d4d;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
}

.progress-bar:hover .progress-fill {
    background: var(--primary-light);
}

.time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    min-width: 35px;
}

input[type="range"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar:hover input[type="range"]::-webkit-slider-thumb {
    opacity: 1;
}

.extra-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    width: 300px;
}

.fs-main-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    position: relative;
}

.fs-control-group {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 150px;
}

.volume-control input[type="range"] {
    position: relative;
    opacity: 1;
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #4d4d4d;
    border-radius: 2px;
    cursor: pointer;
    z-index: 1;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.volume-control:hover input[type="range"]::-webkit-slider-thumb {
    opacity: 1;
}

.volume-control input[type="range"]::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
}

/* Fullscreen Player New Approach */
.fullscreen-modal {
    position: fixed;
    inset: 0;
    background: #121212;
    z-index: 9999;
    display: grid;
    grid-template-rows: auto 1fr auto;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

.fullscreen-modal.hidden {
    transform: translateY(100%);
    pointer-events: none;
}

.fullscreen-bg {
    position: absolute;
    inset: -50px;
    background-size: cover;
    background-position: center;
    filter: blur(50px) brightness(0.6);
    z-index: -2;
    transition: background-image 0.8s ease;
}

.fullscreen-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
    z-index: -1;
}

.fullscreen-content-wrapper {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fullscreen-header {
    padding: 2rem 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* View Toggle Redesign */
.view-toggle {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 4px;
    backdrop-filter: blur(10px);
}

.view-toggle .toggle-btn {
    padding: 0.5rem 1.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-toggle .toggle-btn.active {
    background: white;
    color: black;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.view-toggle .toggle-btn:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.fullscreen-body {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    padding: 0 6rem;
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    flex: 1;
}

.fullscreen-view.hidden {
    display: none !important;
}

.album-artwork {
    width: 450px;
    height: 450px;
    position: relative;
    border-radius: 20px;
    overflow: visible;
}

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

.lyrics-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lyrics-container {
    height: 500px;
    overflow-y: auto;
    padding-right: 2rem;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.lyrics-container::-webkit-scrollbar {
    display: none;
}

#synced-lyrics p {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
    line-height: 1.2;
    transition: all 0.3s ease;
    cursor: pointer;
}

#synced-lyrics p:hover {
    color: rgba(255, 255, 255, 0.6);
}

#synced-lyrics p.active {
    color: white;
    transform: scale(1.05);
}

/* Focus Glow Effect */
.album-artwork {
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.artwork-glow {
    position: absolute;
    inset: -20px;
    background: inherit;
    background-image: var(--album-gradient, linear-gradient(135deg, var(--primary), var(--accent)));
    filter: blur(40px);
    opacity: 0.4;
    z-index: -1;
    border-radius: 50%;
    animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
    from {
        transform: scale(0.9);
        opacity: 0.3;
    }

    to {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* Heart Pop Animation */
.heart-pop {
    animation: heartPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}

#fs-like-btn.active i,
#like-current-song.active i {
    color: var(--accent) !important;
    font-weight: 900 !important;
}

.fullscreen-footer {
    padding: 4rem 6rem;
    position: relative;
    z-index: 20;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.fs-song-info {
    margin-bottom: 2rem;
}

.fs-song-info h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.fs-song-info p {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.fs-progress-container {
    width: 100%;
    margin-bottom: 2rem;
}

.fs-play-circle.play-btn {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    background: white;
    color: black !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.fs-play-circle.play-btn:hover {
    transform: scale(1.1);
    background: #f0f0f0;
}

.fs-play-circle.play-btn i {
    margin-left: 4px;
    /* Optical centering for play icon */
}

.fs-play-circle.play-btn .fa-pause {
    margin-left: 0;
}

.fs-extra-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: absolute;
    right: 0;
}

@media (max-width: 1024px) {
    .fullscreen-modal {
        grid-template-rows: auto 1fr auto;
    }

    .fullscreen-body {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
        overflow-y: auto;
    }

    .album-artwork {
        max-width: 320px;
        margin: 0 auto;
    }

    .lyrics-panel {
        text-align: center;
    }

    .lyrics-container {
        height: 300px;
        padding-right: 0;
    }

    .fs-song-info h2 {
        font-size: 2rem;
    }

    .fs-song-info p {
        font-size: 1.1rem;
    }

    .fs-control-group {
        gap: 1.5rem;
    }
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 1;
}

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

.modal-header h3 {
    font-size: 1.5rem;
}

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

.modal-body input,
.modal-body textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

/* View Toggle Mobile */
.view-toggle-mobile {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
    z-index: 50;
}

.view-toggle-mobile .toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle-mobile .toggle-btn.active {
    background: white;
    color: black;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 200;
        transform: translateX(-100%);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
        transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        width: 280px;
    }

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

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .content-header {
        padding: 1rem;
    }

    .header-info {
        display: flex;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .content-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    .search-bar {
        max-width: 100%;
        width: 100%;
        padding: 0.5rem 1rem;
    }

    /* Compact Horizontal Player Bar */
    .player-bar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        height: 72px;
        padding: 0 1rem;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        cursor: pointer;
    }

    .player-bar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 2px;
        background: var(--primary);
        width: var(--progress-percent, 0%);
        transition: width 0.1s linear;
        z-index: 10;
    }

    .now-playing {
        width: auto;
        flex: 1;
        min-width: 0;
    }

    .now-playing-cover {
        width: 48px;
        height: 48px;
    }

    .now-playing-info h4 {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .now-playing-info p {
        font-size: 0.7rem;
    }

    .player-controls {
        flex: 0;
        width: auto;
        margin: 0;
    }

    .control-buttons {
        gap: 0.5rem;
    }

    .control-buttons .icon-btn {
        display: none;
        /* Hide shuffle, repeat, prev, next to focus on Play */
    }

    .control-buttons button.play-btn {
        display: flex;
        width: 44px;
        height: 44px;
        background: transparent;
        color: white;
        font-size: 1.5rem;
    }

    .progress-section {
        display: none;
        /* Progress handled by top bar indicator */
    }

    .extra-controls {
        display: none;
    }

    .view-toggle-mobile {
        display: flex;
        top: 0.75rem;
        right: 0.75rem;
    }

    .song-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .song-card {
        padding: 0.75rem;
    }

    .song-info h4 {
        font-size: 0.9rem;
    }

    .song-info p {
        font-size: 0.75rem;
    }

    .content-body {
        padding: 0.75rem;
        padding-bottom: 120px;
    }

    /* ==========================================================================
       Bulletproof Mobile Fullscreen Overhaul (V3)
       ========================================================================== */
    .fullscreen-modal {
        height: 100dvh !important;
        width: 100vw !important;
        max-width: 100vw !important;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        background: #000;
        /* Darker base for mobile depth */
    }

    .fullscreen-header {
        padding: 1rem;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .view-toggle {
        padding: 3px;
        background: rgba(255, 255, 255, 0.08);
    }

    .view-toggle .toggle-btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.75rem;
    }

    .fullscreen-body {
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 1.5rem !important;
        gap: 2vh !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        min-height: 0;
        /* Critical for flex overflow */
    }

    .album-artwork {
        height: 35vh !important;
        /* Scale by height to ensure footer visibility */
        width: auto !important;
        aspect-ratio: 1;
        max-width: 80vw !important;
        max-height: 350px !important;
        display: flex !important;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
    }

    .album-artwork img {
        height: 100%;
        width: 100%;
        object-fit: cover;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    }

    /* Focus Glow on Mobile */
    .artwork-glow {
        inset: -15px;
        filter: blur(30px);
        opacity: 0.5;
    }

    .fs-song-info {
        text-align: center;
        width: 100%;
        margin: 1vh 0;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .fs-song-info h2 {
        font-size: 1.6rem !important;
        font-weight: 800;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.2;
    }

    .fs-song-info p {
        font-size: 1rem;
        opacity: 0.6;
    }

    #synced-lyrics p {
        font-size: 1.6rem;
        text-align: center;
        width: 100%;
    }

    .fullscreen-footer {
        width: 100%;
        padding: 0 1.5rem calc(2rem + env(safe-area-inset-bottom));
        box-sizing: border-box;
        flex-shrink: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
        display: flex;
        flex-direction: column;
    }

    .fs-progress-container {
        margin-bottom: 2rem;
        padding: 0;
        width: 100%;
    }

    .fs-main-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 2rem;
    }

    /* 5-Column Grid for perfect distribution of Shuffle, Prev, Play, Next, Repeat */
    .fs-control-group {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        justify-items: center;
        width: 100%;
        max-width: 100%;
        margin: 0;
        gap: 0.5rem;
    }

    .fs-control-group .icon-btn {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
    }

    .fs-play-circle.play-btn {
        width: 64px;
        height: 64px;
        font-size: 1.8rem;
        margin: 0;
        background: white;
        color: black !important;
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
        grid-column: 3;
        /* Explicitly place in center */
    }

    .fs-extra-group {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 0.5rem;
        box-sizing: border-box;
        position: static !important;
        /* CRITICAL: Override desktop absolute positioning */
        margin-top: 1rem;
    }

    .fs-extra-group .volume-control {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
    }

    /* Re-enable compact volume slider */
    .fs-extra-group .volume-control input {
        display: block !important;
        width: 80px;
    }
}

@media (max-width: 480px) {
    .song-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .control-buttons {
        gap: 1.5rem;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

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