/* Custom Design System: Midnight Amethyst & Aurora */
:root {
    --bg-primary: #050508;
    --bg-surface: rgba(13, 12, 21, 0.45);
    --bg-surface-opaque: #0d0c15;
    --bg-glass-card: rgba(255, 255, 255, 0.03);
    
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-light: rgba(255, 255, 255, 0.04);
    
    --color-text-primary: #f3f4f6;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    
    /* Vibrant Glow Accents */
    --color-accent-purple: #8b5cf6;
    --color-accent-pink: #ec4899;
    --color-accent-blue: #3b82f6;
    
    --glow-purple: 0 0 15px rgba(139, 92, 246, 0.45);
    --glow-pink: 0 0 15px rgba(236, 72, 153, 0.45);
    --glow-blue: 0 0 15px rgba(59, 130, 246, 0.45);
    
    --font-heading: 'Outfit', sans-serif;
    --font-ui: 'Plus Jakarta Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-ui);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* --- AURORA FLOATING BACKGROUNDS --- */
.aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #0c0b14, var(--bg-primary));
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    mix-blend-mode: screen;
    animation: floatAnimation 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--color-accent-purple);
    top: -50px;
    left: 10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--color-accent-blue);
    bottom: -100px;
    right: 15%;
    animation-delay: -5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: var(--color-accent-pink);
    top: 40%;
    left: 45%;
    animation-delay: -10s;
}

@keyframes floatAnimation {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(60px, -40px) scale(1.1) rotate(180deg); }
    100% { transform: translate(-40px, 50px) scale(0.9) rotate(360deg); }
}

/* --- AUTH SCREENS --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    z-index: 10;
    position: relative;
}

.auth-card {
    background: var(--bg-surface);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--glow-purple);
    animation: fadeIn 0.4s ease-out;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.glow-icon {
    font-size: 40px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px var(--color-accent-purple));
    animation: pulse 2s infinite;
}

.auth-logo h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    background: linear-gradient(135deg, #ffffff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.auth-logo p {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 25px;
    border: 1px solid var(--border-glass-light);
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    padding: 10px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 14px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab-btn.active {
    background: var(--color-accent-purple);
    color: white;
    box-shadow: var(--glow-purple);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#display-name-group {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
}

#display-name-group.show {
    max-height: 80px;
    opacity: 1;
    margin-bottom: 0px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: var(--color-text-secondary);
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass-light);
    border-radius: 12px;
    color: white;
    padding: 12px 16px 12px 42px; /* Extra left padding for the icon */
    font-family: var(--font-ui);
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--color-accent-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.input-wrapper:focus-within .input-icon {
    color: var(--color-accent-purple);
}

/* Password Toggle Button */
.password-toggle-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: white;
}

.password-toggle-btn .lucide {
    width: 18px;
    height: 18px;
}

.btn {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-pink));
    color: white;
    box-shadow: var(--glow-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-purple), 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* --- APP CONTAINER LAYOUT --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background: var(--bg-surface);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-right: 1px solid var(--border-glass);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.brand-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 5px var(--color-accent-purple));
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--color-text-secondary);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--color-accent-purple);
    box-shadow: inset 10px 0 20px rgba(139, 92, 246, 0.05);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass-light);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-blue));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    box-shadow: var(--glow-purple);
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.btn-logout {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* --- MAIN PANEL --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 90px; /* Leave space for player bar */
}

.main-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--border-glass-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(5, 5, 8, 0.2);
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2px 6px 2px 16px;
    width: 350px;
    max-width: 100%;
}

.search-bar-wrapper input {
    background: none;
    border: none;
    color: white;
    font-family: var(--font-ui);
    font-size: 14px;
    width: 100%;
    height: 36px;
}

.search-bar-wrapper input:focus {
    outline: none;
}

.search-bar-wrapper button {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
}

.header-profile-mobile {
    display: none;
}

.content-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Hide scrollbars but keep functionality */
.content-scroll-container::-webkit-scrollbar {
    width: 6px;
}
.content-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* --- PANES --- */
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-pane.active {
    display: block;
}

/* --- HOME DASHBOARD --- */
.welcome-banner {
    margin-bottom: 30px;
}

.welcome-banner h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-banner p {
    color: var(--color-text-secondary);
    font-size: 15px;
}

.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

/* --- TRACKS GRID / LAYOUTS --- */
.tracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.track-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass-light);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.track-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.track-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-play-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    background: var(--color-accent-purple);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    box-shadow: var(--glow-purple);
}

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

.track-card h4 {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.track-card p {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- TRACKS LIST --- */
.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass-light);
    cursor: pointer;
    transition: all 0.2s;
}

.track-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.15);
}

.row-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    overflow: hidden;
}

.row-artwork {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

.row-song-info {
    overflow: hidden;
}

.row-song-info h4 {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.row-song-info p {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.row-action-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
}

.row-action-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--color-text-secondary);
    border: 1px dashed var(--border-glass);
    border-radius: 16px;
    font-size: 14px;
}

/* --- DETAIL PAGES --- */
.btn-back {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 25px;
}

.detail-header {
    display: flex;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 35px;
}

.detail-image {
    width: 180px;
    height: 180px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.playlist-placeholder-image {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    background: linear-gradient(135deg, #1e1b4b, #311042);
    border: 1px solid var(--border-glass);
}

.detail-info {
    flex: 1;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--color-accent-purple);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
}

.detail-info h2 {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
}

.detail-info p {
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* --- PLAYER BAR CONSOLE --- */
.player-bar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: rgba(13, 12, 21, 0.5);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-top: 1px solid var(--border-glass);
    padding: 0 30px;
    z-index: 100;
    display: flex;
    align-items: center;
}

.player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.player-song-details {
    display: flex;
    align-items: center;
    width: 25%;
    gap: 15px;
}

#player-artwork {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.03);
}

.player-song-info {
    overflow: hidden;
}

#player-song-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

#player-song-artist {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-action-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px;
    border-radius: 50%;
}

.player-action-btn:hover, .player-action-btn.active {
    color: white;
}

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

/* Central Controls */
.player-controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 50%;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-play-btn {
    width: 42px;
    height: 42px;
    background: white;
    border: none;
    border-radius: 50%;
    color: black;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

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

.player-seekbar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 500px;
}

.player-seekbar-wrapper span {
    font-size: 11px;
    color: var(--color-text-secondary);
    width: 35px;
}

#player-time-current {
    text-align: right;
}

.seekbar-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.seekbar-progress {
    height: 100%;
    background: var(--color-accent-purple);
    width: 0%;
    border-radius: 2px;
}

.seekbar-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.1s;
}

.seekbar-progress-bar:hover .seekbar-handle {
    opacity: 1;
}

/* Extra Controls */
.player-extra-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
    width: 25%;
}

.quality-select-wrapper select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-family: var(--font-ui);
    font-size: 11px;
    padding: 4px 8px;
    outline: none;
    cursor: pointer;
}

.player-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100px;
}

.volume-slider-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

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

.volume-slider-handle {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.1s;
}

.volume-slider-bar:hover .volume-slider-handle {
    opacity: 1;
}

/* --- QUEUE DRAWER --- */
.queue-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: rgba(10, 10, 16, 0.9);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-left: 1px solid var(--border-glass);
    z-index: 200;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.queue-drawer.open {
    right: 0;
}

.queue-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.queue-drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
}

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

#queue-tracks-list {
    flex: 1;
    overflow-y: auto;
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-card {
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    animation: scaleUp 0.25s ease-out;
}

.modal-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.playlists-selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    margin: 20px 0;
}

.playlist-option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass-light);
    color: white;
    text-align: left;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: var(--font-ui);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-option-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--color-accent-purple);
}

.bottom-nav {
    display: none;
}

/* --- MOBILE LAYOUTS & TOUCH INTERACTION --- */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .main-content {
        padding-bottom: 140px; /* Room for bottom player and bottom navigation */
    }
    
    .main-header {
        padding: 0 20px;
        height: 60px;
    }
    
    .search-bar-wrapper {
        width: 100%;
    }
    
    .content-scroll-container {
        padding: 20px;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .detail-image {
        width: 140px;
        height: 140px;
    }
    
    .detail-info h2 {
        font-size: 26px;
    }
    
    /* --- MOBILE PLAYER EXPANSION --- */
    .player-bar-container {
        height: 64px;
        bottom: 60px; /* Sits above mobile bottom nav */
        padding: 0 15px;
        border-radius: 16px 16px 0 0;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        background: rgba(13, 12, 21, 0.95);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.4);
    }
    
    .mobile-drag-handle {
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        cursor: pointer;
        display: block;
    }
    
    /* Expanded Mobile Player States */
    .player-bar-container.expanded {
        top: 0;
        bottom: 0;
        height: 100vh;
        border-radius: 0;
        padding: 40px 30px;
        background: radial-gradient(circle at 50% 10%, #17112e, #050508 80%);
    }
    
    .player-bar-container.expanded .player-content {
        flex-direction: column;
        justify-content: space-around;
        height: 100%;
    }
    
    /* Song details on expanded mobile player */
    .player-bar-container.expanded .player-song-details {
        width: 100%;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 30px;
    }
    
    .player-bar-container.expanded #player-artwork {
        width: 250px;
        height: 250px;
        border-radius: 20px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), var(--glow-purple);
    }
    
    .player-bar-container.expanded #player-song-title {
        font-size: 20px;
        margin-top: 15px;
    }
    
    .player-bar-container.expanded #player-song-artist {
        font-size: 15px;
    }
    
    /* Controls on expanded mobile player */
    .player-bar-container.expanded .player-controls-container {
        width: 100%;
        margin: 20px 0;
    }
    
    .player-bar-container.expanded .player-controls {
        gap: 30px;
    }
    
    .player-bar-container.expanded .player-play-btn {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
    
    /* Extra controls on expanded mobile player */
    .player-bar-container.expanded .player-extra-controls {
        width: 100%;
        justify-content: space-around;
        margin-bottom: 30px;
    }
    
    .player-bar-container.expanded .player-volume-wrapper {
        width: 140px;
    }
    
    /* Compact layouts for collapsed mobile player */
    .player-bar-container:not(.expanded) .player-controls-container {
        display: none; /* Hide seek bar on mini player */
    }
    
    .player-bar-container:not(.expanded) .player-extra-controls {
        display: none; /* Hide extra controls on mini player */
    }
    
    .player-bar-container:not(.expanded) .player-song-details {
        width: 60%;
    }
    
    .player-bar-container:not(.expanded) .player-song-details #player-fav-btn {
        display: none !important;
    }
    
    .player-bar-container:not(.expanded) .mobile-mini-controls {
        display: flex !important;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }
    
    .player-bar-container:not(.expanded) .mobile-mini-controls .player-action-btn {
        padding: 6px;
        width: 38px;
        height: 38px;
        display: flex;
        justify-content: center;
        align-items: center;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 50%;
        color: white;
    }
    
    /* --- STICKY BOTTOM NAVIGATION (MOBILE) --- */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(7, 7, 10, 0.85);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-top: 1px solid var(--border-glass-light);
        z-index: 99;
        justify-content: space-around;
        align-items: center;
    }
    
    .bottom-nav-item {
        background: none;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--color-text-secondary);
        font-family: var(--font-ui);
        font-size: 10px;
        font-weight: 500;
        cursor: pointer;
        flex: 1;
    }
    
    .bottom-nav-item .nav-icon {
        font-size: 18px;
    }
    
    .bottom-nav-item.active {
        color: var(--color-accent-purple);
        text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* --- PREMIUM LUCIDE ICON STYLES --- */
.lucide {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
    display: inline-block;
    vertical-align: middle;
}

.brand-icon .lucide {
    width: 24px;
    height: 24px;
    color: var(--color-accent-purple);
}

.glow-icon .lucide {
    width: 48px;
    height: 48px;
    color: var(--color-accent-purple);
}

.active-heart {
    fill: var(--color-accent-pink);
    stroke: var(--color-accent-pink) !important;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* --- DESKTOP MINI WIDGET MODE --- */
body.mini-widget-mode {
    background: radial-gradient(circle at 50% 10%, #17112e, #050508 80%);
}

body.mini-widget-mode .sidebar {
    display: none !important;
}

body.mini-widget-mode .main-content {
    display: none !important;
}

body.mini-widget-mode .app-container {
    justify-content: center;
    align-items: center;
    padding: 20px;
    height: 100vh;
    width: 100vw;
}

body.mini-widget-mode .player-bar-container {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 320px;
    height: auto !important;
    background: rgba(13, 12, 21, 0.85);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid var(--border-glass-light) !important;
    border-radius: 24px !important;
    padding: 30px 24px 24px 24px !important;
    box-shadow: var(--glow-purple);
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.mini-widget-mode .player-content {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
}

body.mini-widget-mode .player-song-details {
    width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
}

body.mini-widget-mode #player-artwork {
    width: 180px !important;
    height: 180px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

body.mini-widget-mode .player-song-info {
    width: 100% !important;
    overflow: visible !important;
}

body.mini-widget-mode #player-song-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
}

body.mini-widget-mode #player-song-artist {
    font-size: 14px !important;
}

body.mini-widget-mode .player-controls-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
}

body.mini-widget-mode .player-controls {
    justify-content: center !important;
    gap: 16px !important;
}

body.mini-widget-mode .player-seekbar-wrapper {
    width: 100% !important;
}

body.mini-widget-mode .player-extra-controls {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 12px !important;
}

/* Hide volume progress bar and quality selector in mini mode */
body.mini-widget-mode .player-volume-wrapper .volume-slider-bar,
body.mini-widget-mode .quality-select-wrapper,
body.mini-widget-mode #player-queue-btn {
    display: none !important;
}

body.mini-widget-mode .player-volume-wrapper {
    width: auto !important;
}

/* Absolute position for the restore button on the card */
body.mini-widget-mode #player-widget-toggle {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: white !important;
}
