/* ========== CSS Variables ========== */
:root {
    --bg-primary: #09090b;
    --bg-secondary: rgba(18, 18, 22, 0.9);
    --bg-surface: rgba(24, 24, 28, 0.8);
    --bg-elevated: rgba(38, 38, 44, 0.6);
    --bg-highlight: rgba(55, 55, 62, 0.5);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-subdued: #71717a;
    --accent: #ffffff;
    --accent-hover: #e4e4e7;
    --accent-subtle: rgba(255, 255, 255, 0.9);
    --accent-glow: rgba(255, 255, 255, 0.15);
    --success: #22c55e;
    --success-glow: rgba(34, 197, 94, 0.3);
    --sidebar-width: 280px;
    --now-playing-height: 80px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --blur-amount: 24px;
}

/* ========== Reset ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #09090b;
    color: var(--text-primary);
    display: flex;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle ambient background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 0% 0%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(255, 255, 255, 0.015) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a { text-decoration: none; color: inherit; }

button {
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    color: inherit;
}

img { display: block; }

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    height: 100%;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    border-right: 1px solid var(--border-glass);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 36px;
    padding: 0 4px;
}

.sidebar-logo span {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.sidebar-section h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-subdued);
    letter-spacing: 1.6px;
    margin-bottom: 16px;
    padding: 0 4px;
    text-transform: uppercase;
}

.sidebar-playlist {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-glass);
    border: 1px solid transparent;
}

.sidebar-playlist:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass);
    transform: translateX(4px);
}

.sidebar-playlist-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-glass);
}

.sidebar-playlist-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sidebar-playlist-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-playlist-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.sidebar-status {
    margin-top: auto;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-line;
}

/* ========== Main Content ========== */
.main-content {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ========== Playlist Header ========== */
.playlist-header {
    display: flex;
    align-items: flex-end;
    gap: 32px;
    padding: 64px 40px 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.playlist-cover {
    width: 220px;
    height: 220px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass);
}

.playlist-cover-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #27272a 0%, #18181b 50%, #09090b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding-bottom: 4px;
}

.playlist-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.8;
}

.playlist-title {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.dot { font-size: 6px; opacity: 0.6; }

.playlist-track-count {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ========== Playlist Controls ========== */
.playlist-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 40px;
}

.btn-play-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 16px var(--success-glow);
}

.btn-play-large:hover {
    background: #16a34a;
    transform: scale(1.06);
    box-shadow: 0 8px 24px var(--success-glow);
}

.btn-play-large:active {
    transform: scale(0.98);
}

.btn-play-large svg { margin-left: 3px; }

.btn-shuffle {
    color: var(--text-subdued);
    padding: 10px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.btn-shuffle:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.btn-shuffle.active { 
    color: var(--success);
}

/* ========== Track List Header ========== */
.track-list-header {
    display: grid;
    grid-template-columns: 48px 1fr 80px;
    align-items: center;
    padding: 12px 40px;
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    z-index: 10;
}

.col-num {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

.col-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-subdued);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.col-duration {
    display: flex;
    justify-content: flex-end;
    padding-right: 16px;
}

/* ========== Track List ========== */
.track-list {
    padding: 8px 24px 120px;
}

.loading-tracks {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 64px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Track Row ========== */
.track-row {
    display: grid;
    grid-template-columns: 48px 1fr 80px;
    align-items: center;
    padding: 8px 16px;
    margin: 2px 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
    user-select: none;
    border: 1px solid transparent;
}

.track-row:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass);
    transform: translateX(2px);
}

.track-row:active {
    transform: scale(0.995);
}

.track-row:hover .track-num { display: none; }
.track-row:hover .track-play-icon { display: flex; }

.track-row.active {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.15);
}

.track-row.active .track-title { color: var(--success); }
.track-row.active .track-num { color: var(--success); }

.track-num-col {
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}

.track-num {
    font-size: 14px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.track-play-icon {
    display: none;
    align-items: center;
    justify-content: center;
}

.track-play-icon svg { fill: var(--text-primary); }

.track-row.active .track-num { display: none; }
.track-row.active .track-play-icon { display: none; }
.track-row.active .track-bars { display: flex; }

.track-bars {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
}

.track-bars .bar {
    width: 3px;
    background: var(--success);
    border-radius: 1px;
    animation: barPulse 0.8s ease-in-out infinite;
}

.track-bars .bar:nth-child(1) { height: 60%; animation-delay: 0s; }
.track-bars .bar:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.track-bars .bar:nth-child(3) { height: 40%; animation-delay: 0.3s; }
.track-bars .bar:nth-child(4) { height: 80%; animation-delay: 0.45s; }

.track-row.paused .track-bars .bar {
    animation-play-state: paused;
}

@keyframes barPulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.4); }
}

.track-info-col {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.track-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-elevated);
    flex-shrink: 0;
    border: 1px solid var(--border-glass);
}

.track-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.track-title {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-fast);
    line-height: 1.3;
}

.track-artist {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    transition: color var(--transition-fast);
}

.track-artist:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.track-duration {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    padding-right: 16px;
    font-variant-numeric: tabular-nums;
}

/* ========== Now Playing Bar ========== */
.now-playing-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: var(--now-playing-height) !important;
    background: rgba(15, 15, 25, 0.85) !important;
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    border-top: 1px solid var(--border-glass);
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 9999 !important;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.now-playing-bar.visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Add bottom padding to scroll area when bar is visible */
body.now-playing-active .main-scroll {
    padding-bottom: var(--now-playing-height);
}

.now-playing-bar:hover {
    background: rgba(20, 20, 35, 0.9);
}

.now-playing-track {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.now-playing-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-elevated);
    flex-shrink: 0;
    border: 1px solid var(--border-glass);
}

.now-playing-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.now-playing-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    line-height: 1.3;
}

.now-playing-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.now-playing-controls {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.btn-play-bottom {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--success);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 12px var(--success-glow);
}

.btn-play-bottom:hover {
    transform: scale(1.06);
    background: #16a34a;
    box-shadow: 0 6px 20px var(--success-glow);
}

.btn-play-bottom svg { margin-left: 2px; }

/* ========== Now Playing Mini Progress ========== */
.now-playing-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.now-playing-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--success);
    transition: width 0.25s linear;
}

/* ========== Full Screen Player ========== */
.fullscreen-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 32px 40px;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    background: #09090b;
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
}

.fullscreen-player.open {
    transform: translateY(0);
}

.fullscreen-player::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
}

.fs-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    filter: blur(80px) brightness(0.2) saturate(1.4);
    transform: scale(1.4);
    opacity: 0.6;
    transition: background-image 0.8s ease;
}

/* FS Header */
.fs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    padding: 8px 0;
    flex-shrink: 0;
}

.fs-close, .fs-more {
    padding: 10px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    border-radius: 50%;
}

.fs-close:hover, .fs-more:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* FS More Menu */
.fs-more-container {
    position: relative;
}

.fs-more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 220px;
    background: rgba(24, 24, 28, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 8px 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s ease;
    z-index: 1000;
}

.fs-more-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.fs-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    text-align: left;
    transition: background 0.15s ease;
}

.fs-menu-item:hover {
    background: var(--bg-glass-hover);
}

.fs-menu-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.fs-menu-item span:first-of-type {
    flex: 1;
}

.fs-menu-value {
    font-size: 12px;
    color: var(--text-subdued);
}

.fs-menu-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 8px 0;
}

.fs-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

/* FS Artwork */
.fs-artwork {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    max-height: 50vh;
    min-height: 0;
}

.fs-artwork img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    aspect-ratio: 16/9;
    transition: transform 0.3s ease;
    border: 1px solid var(--border-glass);
}

.fs-artwork img:hover {
    transform: scale(1.01);
}

/* FS Track Info */
.fs-track-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    gap: 16px;
    flex-shrink: 0;
}

.fs-track-text {
    min-width: 0;
    flex: 1;
}

.fs-track-text h2 {
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.fs-track-text span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.fs-heart {
    padding: 8px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    transition: all 0.25s ease;
    border-radius: 50%;
}

.fs-heart:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.12);
}

.fs-heart.liked { color: var(--success); }

.fs-heart.liked svg {
    fill: var(--success);
    filter: drop-shadow(0 0 6px var(--success-glow));
}

/* FS Progress */
.fs-progress {
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
    flex-shrink: 0;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s ease;
}

.progress-bar-container:hover { height: 6px; }

.progress-bar-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: 4px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.progress-bar-container:hover .progress-bar-fill::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--text-primary);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.progress-times {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* FS Controls */
.fs-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 24px;
    width: 100%;
    max-width: 500px;
    flex-shrink: 0;
}

.fs-ctrl-btn {
    padding: 10px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
    border-radius: 50%;
}

.fs-ctrl-btn:hover {
    color: var(--text-primary);
    transform: scale(1.12);
    background: rgba(255, 255, 255, 0.06);
}

.fs-ctrl-btn.active {
    color: var(--success);
    position: relative;
}

.fs-ctrl-btn.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--success);
    border-radius: 50%;
}

.fs-play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.fs-play-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.fs-play-btn:active {
    transform: scale(0.98);
}

.fs-play-btn svg { margin-left: 3px; }

/* FS Bottom */
.fs-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-top: 28px;
    width: 100%;
    max-width: 500px;
    flex-shrink: 0;
}

.fs-bottom-btn {
    padding: 8px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-radius: 50%;
}

.fs-bottom-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* ========== Queue Panel ========== */
.queue-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background: rgba(18, 18, 20, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1002;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-panel.open {
    right: 0;
}

.queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.queue-close {
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.queue-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.queue-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 16px 20px 8px;
}

.queue-now-playing {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.queue-track {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.15s;
}

.queue-track:hover {
    background: rgba(255, 255, 255, 0.06);
}

.queue-track.active {
    background: rgba(34, 197, 94, 0.1);
}

.queue-track-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.queue-track-info {
    flex: 1;
    min-width: 0;
}

.queue-track-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-track.active .queue-track-title {
    color: var(--accent);
}

.queue-track-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.queue-upcoming {
    flex: 1;
    overflow-y: auto;
}

.queue-list {
    padding-bottom: 20px;
}

.queue-track-number {
    font-size: 12px;
    color: var(--text-muted);
    width: 20px;
    text-align: center;
}

/* ========== Share Modal ========== */
.share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.share-modal.open {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background: rgba(28, 28, 32, 0.98);
    border-radius: 16px;
    padding: 24px;
    width: 400px;
    max-width: 90vw;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.share-modal.open .share-modal-content {
    transform: scale(1);
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.share-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.share-modal-close {
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.share-track-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 20px;
}

.share-track-preview img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
}

.share-track-preview-info {
    flex: 1;
    min-width: 0;
}

.share-track-preview-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-track-preview-artist {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.share-link-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.share-link-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
}

.share-link-input:focus {
    border-color: var(--accent);
}

.share-copy-btn {
    padding: 12px 20px;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s;
}

.share-copy-btn:hover {
    background: #2ed573;
    transform: scale(1.02);
}

.share-copy-btn.copied {
    background: #16a34a;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.2s;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
}

#shareWhatsApp:hover { background: #25d366; color: #fff; }
#shareTelegram:hover { background: #0088cc; color: #fff; }
#shareTwitter:hover { background: #1da1f2; color: #fff; }

/* ========== Responsive ========== */
@media (max-width: 900px) {
    .sidebar { display: none; }

    .playlist-title { font-size: 36px; }

    .playlist-cover {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 600px) {
    .playlist-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 32px 16px 20px;
        gap: 20px;
    }

    .playlist-cover {
        width: 180px;
        height: 180px;
    }

    .playlist-title {
        font-size: 26px;
        letter-spacing: -1px;
    }

    .playlist-info { align-items: center; }

    .playlist-controls {
        padding: 16px 20px;
        justify-content: center;
    }

    .track-list-header { padding: 10px 16px; }
    .track-row { padding: 8px 8px; }
    .track-list { padding: 4px 6px 32px; }

    .fullscreen-player { padding: 12px 20px 24px; }
    .now-playing-bar { padding: 0 12px; }
}
