﻿:root {
    --bg: #101014;
    --panel: #19191f;
    --panel-light: #222229;
    --text: #f4f4f6;
    --muted: #92929f;
    --accent: #a78bfa;
    --border: #292931;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    color: inherit;
}

.app {
    display: flex;
    min-height: calc(100vh - 100px);
}

.sidebar {
    width: 240px;
    background: #15151a;
    border-right: 1px solid var(--border);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 65px;
}

.brand-icon {
    color: var(--accent);
    font-size: 32px;
}

.brand-light {
    color: var(--accent);
}

.nav-label, .eyebrow {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-label {
    margin-bottom: 18px;
}

nav {
    display: grid;
    gap: 10px;
}

.nav-item {
    background: transparent;
    padding: 14px;
    text-align: left;
    border-radius: 9px;
    color: var(--muted);
    font-size: 14px;
}

.nav-item.active, .nav-item:hover {
    background: var(--panel-light);
    color: white;
}

.sidebar-footer {
    margin-top: auto;
    color: var(--muted);
    font-size: 12px;
    display: flex;
    gap: 9px;
    align-items: center;
}

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

.main-content {
    flex: 1;
    padding: 38px 5%;
    padding-bottom: 130px;
    min-width: 0;
}

.topbar, .section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

h1 {
    font-size: clamp(25px, 3vw, 36px);
    margin-top: 10px;
}

h1 span {
    color: var(--accent);
}

.primary-btn, .secondary-btn {
    padding: 13px 20px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 13px;
}

.primary-btn {
    background: var(--accent);
    color: #17121f;
}

.primary-btn:hover {
    background: #bca8ff;
}

.secondary-btn {
    background: var(--panel-light);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    background: #30303b;
}

.secondary-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.welcome-card {
    margin-top: 40px;
    background: linear-gradient(110deg, #28203b, #1c1b27 70%);
    border: 1px solid #39304c;
    border-radius: 18px;
    min-height: 255px;
    padding: 35px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.welcome-card h2 {
    font-size: 37px;
    line-height: 1.15;
    margin: 12px 0;
}

.welcome-card p {
    color: #aaa5b8;
    max-width: 420px;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.music-visual {
    color: #9e83e8;
    opacity: .18;
    font-size: 180px;
    padding-right: 50px;
}

.library-section {
    margin-top: 45px;
}

.section-heading h2 {
    font-size: 24px;
    margin-top: 8px;
}

.small-btn {
    padding: 9px 14px;
}

.stats {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: 12px;
    display: flex;
    gap: 15px;
    align-items: center;
    min-width: 175px;
}

.stat-icon {
    font-size: 25px;
    color: var(--accent);
}

.stat-card strong, .stat-card span:last-child {
    display: block;
}

.stat-card strong {
    font-size: 17px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card div span {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1px;
    margin-top: 4px;
}

.scan-status {
    color: var(--muted);
    font-size: 12px;
    margin: 20px 0;
    min-height: 18px;
}

.song-header, .song-row {
    display: grid;
    grid-template-columns: 40px minmax(120px, 1fr) 110px 90px 45px;
    align-items: center;
    gap: 15px;
}

.song-header {
    border-bottom: 1px solid var(--border);
    padding: 14px 12px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1px;
}

.song-row {
    padding: 13px 12px;
    border-bottom: 1px solid #222229;
    color: #ccc;
    font-size: 13px;
}

.song-row:hover {
    background: var(--panel);
}

.song-title {
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-play {
    background: transparent;
    color: var(--accent);
    font-size: 17px;
}

.song-type, .song-duration {
    color: var(--muted);
    font-size: 11px;
}

.empty-state {
    text-align: center;
    padding: 55px 15px;
    color: var(--muted);
}

.empty-icon {
    color: var(--accent);
    font-size: 45px;
    margin-bottom: 12px;
}

.empty-state h3 {
    color: white;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
}

.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: #18181e;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    align-items: center;
    padding: 12px 30px;
    gap: 25px;
    z-index: 10;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.album-placeholder {
    width: 53px;
    height: 53px;
    background: #302744;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 27px;
    flex-shrink: 0;
}

.track-info {
    min-width: 0;
}

.track-info strong, .track-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-info strong {
    font-size: 13px;
}

.track-info span {
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
}

.player-controls {
    max-width: 550px;
    width: 100%;
    justify-self: center;
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 10px;
}

.control-buttons button {
    background: transparent;
    color: var(--muted);
    font-size: 16px;
}

.control-buttons button:hover {
    color: white;
}

.control-buttons .play-btn {
    background: var(--accent);
    color: #17121f;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 13px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    color: var(--muted);
}

input[type="range"] {
    accent-color: var(--accent);
    cursor: pointer;
}

#progressBar {
    width: 100%;
}

.volume-control {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

#volumeBar {
    max-width: 100px;
    width: 100%;
}

@media (max-width: 800px) {
    .sidebar {
        width: 70px;
        padding: 25px 10px;
    }

    .brand {
        font-size: 0;
        justify-content: center;
        margin-bottom: 50px;
    }

    .nav-label, .nav-item {
        font-size: 0;
        text-align: center;
    }

    .sidebar-footer {
        font-size: 0;
        justify-content: center;
    }

    .main-content {
        padding: 25px 18px 125px;
    }

    .music-visual {
        display: none;
    }

    .player-bar {
        grid-template-columns: 1fr 1fr;
        padding: 10px;
        gap: 8px;
    }

    .volume-control {
        display: none;
    }

    .song-header, .song-row {
        grid-template-columns: 25px minmax(100px, 1fr) 45px;
    }

    .song-header span:nth-child(3),
    .song-header span:nth-child(4),
    .song-row .song-type,
    .song-row .song-duration {
        display: none;
    }
}

@media (max-width: 480px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .welcome-card {
        padding: 25px;
    }

    .welcome-card h2 {
        font-size: 30px;
    }

    .stat-card {
        min-width: 100%;
    }
}
