:root {
    --bg-base: #0B0E14;
    --bg-card: rgba(18, 22, 33, 0.75);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --bg-hover: rgba(255, 255, 255, 0.06);
    
    --primary: #5865F2;
    --primary-glow: rgba(88, 101, 242, 0.4);
    --secondary: #EB459E;
    --accent: #57F287;
    --accent-glow: rgba(87, 242, 135, 0.3);
    
    --text-main: #FFFFFF;
    --text-muted: #949BA4;
    --text-dim: #4E5058;
    
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    user-select: none;
}

/* Ambient Background Aura */
.ambient-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(235, 69, 158, 0.15) 45%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    transition: background 1s ease;
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 100vh;
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

/* Top App Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.logo-badge {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.brand-info h1 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.brand-info h1 span {
    background: linear-gradient(135deg, #5865F2, #EB459E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.status-dot.online {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.status-dot.offline {
    background: #ED4245;
}



.icon-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.icon-btn:hover {
    color: var(--text-main);
    background: var(--bg-hover);
    border-color: var(--bg-card-border);
}

/* Main Player Grid */
.player-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 1.5rem;
    flex: 1;
}

@media (max-width: 900px) {
    .player-grid {
        grid-template-columns: 1fr;
    }
}

/* Left Panel: Player Card */
.player-panel {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
}

.artwork-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.artwork-glow {
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(20px);
    opacity: 0.6;
    z-index: 1;
}

.track-artwork {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.artwork-wrapper:hover .track-artwork {
    transform: scale(1.03);
}

/* Animated 60 FPS Visualizer Overlay */
.visualizer-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    padding-bottom: 8px;
}

.v-bar {
    width: 4px;
    height: 8px;
    background: linear-gradient(to top, #5865F2, #57F287);
    border-radius: var(--radius-full);
    transition: height 0.08s ease;
}

.track-meta {
    width: 100%;
}

.track-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}



/* 60 FPS Real-time Smooth Progress Bar */
.progress-section {
    width: 100%;
    margin-top: 0.5rem;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    cursor: pointer;
    overflow: visible;
}

.progress-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #5865F2, #57F287);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.1s ease;
    pointer-events: none;
}

.progress-bar-container:hover .progress-thumb {
    opacity: 1;
}

/* Controls */
.controls-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    width: 100%;
    margin-top: 0.25rem;
}

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

.ctrl-btn.secondary {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 1rem;
}

.ctrl-btn.secondary:hover {
    background: var(--bg-hover);
    color: var(--text-main);
    transform: translateY(-2px);
}

.ctrl-btn.secondary.active {
    color: var(--accent);
    background: rgba(87, 242, 135, 0.12);
}

.ctrl-btn.primary {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 8px 25px var(--primary-glow);
}

.ctrl-btn.primary:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px var(--primary-glow);
}

/* Volume Slider */
.volume-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0 0.5rem;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    width: 38px;
    text-align: right;
}

/* Secondary Panel: Lyrics & Queue Tabs */
.secondary-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.tab-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bg-card-border);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-hover);
}

.tab-btn.active {
    color: var(--text-main);
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
}

.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Lyrics Kinetic Scroll Container */
.lyrics-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem 2rem;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}

.lyrics-placeholder {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 1.1rem;
}

.lyric-line {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.25);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
}

.lyric-line:hover {
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.03);
}

.lyric-line.active {
    font-size: 1.55rem;
    font-weight: 800;
    color: #FFFFFF;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 50px var(--primary-glow);
    transform: scale(1.02);
    transform-origin: left center;
}

.lyric-line.past {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Queue List */
.queue-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.queue-empty {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.queue-empty code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--accent);
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.queue-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(4px);
}

.queue-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.queue-item-info {
    flex: 1;
    overflow: hidden;
}

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

.queue-item-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.queue-item-duration {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}


