* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top,
            #202020 0,
            #111 45%,
            #0b0b0b 100%
        );

    color: #fff;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

button,
input {
    font-family: inherit;
}

button {
    -webkit-appearance: none;
}


/* =========================
   APP
========================= */

.app {
    width: 100%;
    max-width: 650px;

    min-height: 100vh;

    margin: 0 auto;

    padding-bottom: 330px;
}


/* =========================
   HEADER
========================= */

.header {
    padding: 24px 20px 18px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subtitle {
    margin-top: 5px;

    color: #8f8f8f;

    font-size: 14px;
}


/* =========================
   SEARCH
========================= */

.search-box {
    position: relative;

    display: flex;
    align-items: center;

    margin-top: 20px;

    height: 50px;

    border-radius: 15px;

    background: #202020;
}

.search-icon {
    margin-left: 15px;

    font-size: 18px;

    opacity: 0.75;
}

#search {
    width: 100%;
    height: 100%;

    padding: 0 42px 0 12px;

    border: none;
    outline: none;

    background: transparent;

    color: #fff;

    font-size: 16px;
}

#search::placeholder {
    color: #777;
}

.clear-search {
    position: absolute;

    right: 10px;

    width: 30px;
    height: 30px;

    border: none;
    border-radius: 50%;

    background: #333;

    color: #aaa;

    font-size: 20px;
    line-height: 25px;

    cursor: pointer;

    display: none;
}


/* =========================
   SECTION
========================= */

.section-header {
    display: flex;

    align-items: baseline;
    justify-content: space-between;

    padding: 4px 20px 10px;
}

.section-header h2 {
    margin: 0;

    font-size: 20px;
}

#track-count {
    color: #777;

    font-size: 13px;
}


/* =========================
   TRACKS
========================= */

.tracks {
    padding: 0 12px;
}

.track {
    display: flex;

    align-items: center;

    gap: 13px;

    padding: 10px 8px;

    border-radius: 13px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.1s ease;
}

.track:hover {
    background: #1b1b1b;
}

.track:active {
    transform: scale(0.985);
}

.track.active {
    background: #202020;
}


/* cover */

.cover {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #303030,
            #171717
        );

    font-size: 25px;

    overflow: hidden;
}

.cover img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* info */

.track-info {
    min-width: 0;

    flex: 1;
}

.track-title {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 16px;
    font-weight: 700;
}

.track-artist {
    margin-top: 5px;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    color: #888;

    font-size: 14px;
}


/* play */

.track-play {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #292929;

    font-size: 16px;
}

.track.active .track-play {
    background: #fff;
    color: #000;
}


/* =========================
   EMPTY
========================= */

.empty-state {
    padding: 70px 30px;

    text-align: center;
}

.hidden {
    display: none !important;
}

.empty-icon {
    font-size: 48px;
}

.empty-title {
    margin-top: 15px;

    font-size: 18px;
    font-weight: 700;
}

.empty-text {
    margin-top: 8px;

    color: #777;

    font-size: 14px;
    line-height: 1.5;
}


/* =========================
   PLAYER
========================= */

.player {
    position: fixed;

    z-index: 100;

    left: 50%;
    bottom: 0;

    transform: translateX(-50%);

    width: 100%;
    max-width: 650px;

    padding:
        15px
        18px
        calc(15px + env(safe-area-inset-bottom));

    border-top: 1px solid #292929;

    background:
        rgba(24, 24, 24, 0.96);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 -10px 30px rgba(0, 0, 0, 0.35);
}


/* player top */

.player-top {
    display: flex;

    align-items: center;

    gap: 12px;
}

.player-cover {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #343434,
            #171717
        );

    font-size: 22px;
}

.player-info {
    min-width: 0;
}

.player-title {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 15px;
    font-weight: 700;
}

.player-artist {
    margin-top: 4px;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    color: #888;

    font-size: 13px;
}


/* =========================
   PROGRESS
========================= */

.progress-container {
    margin-top: 10px;
}

#progress,
#volume {
    width: 100%;

    margin: 0;

    cursor: pointer;

    accent-color: #fff;
}

.time-row {
    display: flex;

    justify-content: space-between;

    margin-top: 3px;

    color: #777;

    font-size: 11px;
}


/* =========================
   CONTROLS
========================= */

.controls {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 38px;

    margin-top: 8px;
}

.control-button,
.play-button {
    border: none;

    color: #fff;

    cursor: pointer;
}

.control-button {
    width: 42px;
    height: 42px;

    padding: 0;

    background: transparent;

    font-size: 24px;
}

.play-button {
    width: 52px;
    height: 52px;

    padding: 0;

    border-radius: 50%;

    background: #fff;

    color: #000;

    font-size: 19px;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.3);
}

.control-button:active,
.play-button:active {
    transform: scale(0.92);
}


/* =========================
   VOLUME
========================= */

.volume-row {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 8px;

    color: #888;

    font-size: 13px;
}

.volume-row input {
    flex: 1;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 480px) {

    .header {
        padding-top: 20px;
    }

    .logo {
        font-size: 25px;
    }

    .app {
        padding-bottom: 325px;
    }

    .controls {
        gap: 32px;
    }

    .player {
        padding-left: 14px;
        padding-right: 14px;
    }
}