:root {

    --background: #0b0b12;
    --surface: #12121d;
    --surface-light: #191927;
    --border: rgba(255,255,255,.07);

    --primary: #8b5cf6;
    --secondary: #38bdf8;

    --text: #f4f4f8;
    --muted: #88889c;

    --success: #34d399;

}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}


body {

    background: var(--background);

    color: var(--text);

    font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

    min-height: 100vh;

    padding-bottom: 160px;

}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


.container {

    width: 100%;
    max-width: 1100px;

    margin: auto;

    padding: 25px 20px;

}


/* HEADER */

.header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 38px;

}


.brand {

    display: flex;

    align-items: center;

    gap: 12px;

}


.brand-icon {

    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: linear-gradient(
    135deg,
    var(--primary),
    #4f46e5
    );

    box-shadow: 0 5px 25px rgba(139,92,246,.25);

    font-size: 20px;

}


.brand h1 {

    font-size: 19px;

    font-weight: 800;

    letter-spacing: 1px;

}


.brand span {

    display: block;

    color: var(--muted);

    font-size: 11px;

    margin-top: 3px;

    letter-spacing: 1.5px;

}


.refresh-button {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 11px 15px;

    border-radius: 11px;

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text);

    text-decoration: none;

    font-size: 12px;

    transition: .2s;

}


.refresh-button:hover {

    border-color: var(--primary);

    color: #c4b5fd;

}


/* HERO */

.hero {

    position: relative;

    overflow: hidden;

    padding: 32px;

    border-radius: 22px;

    background:
    radial-gradient(
    circle at 90% 20%,
    rgba(139,92,246,.24),
    transparent 35%
    ),
    linear-gradient(
    120deg,
    #19152c,
    #111321
    );

    border: 1px solid rgba(139,92,246,.15);

    margin-bottom: 25px;

}


.hero-label {

    color: #b9a4ff;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;

    margin-bottom: 13px;

}


.hero h2 {

    font-size: clamp(25px, 5vw, 37px);

    font-weight: 800;

    margin-bottom: 10px;

}


.hero p {

    color: #a5a2b8;

    font-size: 13px;

    line-height: 1.7;

    max-width: 430px;

}


.hero-decoration {

    position: absolute;

    right: 45px;

    top: 50%;

    transform: translateY(-50%);

    font-size: 90px;

    color: rgba(255,255,255,.06);

}


/* STATISTICS */

.statistics {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 14px;

    margin-bottom: 28px;

}


.stat-card {

    background: var(--surface);

    border: 1px solid var(--border);

    padding: 18px;

    border-radius: 16px;

}


.stat-icon {

    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(139,92,246,.13);

    color: #b9a4ff;

    margin-bottom: 12px;

}


.stat-value {

    font-size: 25px;

    font-weight: 800;

}


.stat-label {

    color: var(--muted);

    font-size: 11px;

    margin-top: 5px;

}


/* SEARCH */

.search-section {

    margin-bottom: 27px;

}


.section-title {

    font-size: 16px;

    font-weight: 700;

    margin-bottom: 15px;

}


.search-box {

    display: flex;

    align-items: center;

    gap: 13px;

    padding: 0 17px;

    height: 56px;

    border-radius: 14px;

    background: var(--surface);

    border: 1px solid var(--border);

    transition: .2s;

}


.search-box:focus-within {

    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(139,92,246,.10);

}


.search-box i {

    color: var(--muted);

}


.search-box input {

    flex: 1;

    min-width: 0;

    border: none;

    outline: none;

    background: transparent;

    color: var(--text);

    font-size: 14px;

}


.search-box input::placeholder {

    color: #68687b;

}


.search-clear {

    border: none;

    background: transparent;

    color: var(--muted);

    display: none;

    padding: 5px;

}


.search-clear.visible {
    display: block;
}


/* MUSIC LIST */

.music-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 15px;

}


.music-count {

    color: var(--muted);

    font-size: 11px;

}


.music-list {

    display: flex;

    flex-direction: column;

    gap: 9px;

}


.music-item {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 14px;

    border-radius: 15px;

    background: var(--surface);

    border: 1px solid var(--border);

    transition: .2s;

}


.music-item:hover {

    background: var(--surface-light);

    border-color: rgba(139,92,246,.3);

}


.music-item.active {

    border-color: rgba(139,92,246,.55);

    background: rgba(139,92,246,.08);

}


.music-cover {

    flex-shrink: 0;

    width: 47px;
    height: 47px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: linear-gradient(
    145deg,
    #292044,
    #18213a
    );

    color: #b9a4ff;

    font-size: 18px;

}


.music-info {

    flex: 1;

    min-width: 0;

}


.music-name {

    font-size: 13px;

    font-weight: 700;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    margin-bottom: 6px;

}


.music-artist {

    color: var(--muted);

    font-size: 11px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.music-format {

    color: #77778b;

    font-size: 9px;

    margin-top: 5px;

    text-transform: uppercase;

}


.play-button {

    flex-shrink: 0;

    width: 39px;
    height: 39px;

    border: none;

    border-radius: 50%;

    background: rgba(139,92,246,.15);

    color: #b9a4ff;

    transition: .2s;

}


.play-button:hover {

    background: var(--primary);

    color: white;

    transform: scale(1.06);

}


.music-item.active .play-button {

    background: var(--primary);

    color: white;

}


/* EMPTY STATE */

.empty-state {

    display: none;

    text-align: center;

    padding: 50px 20px;

    background: var(--surface);

    border: 1px dashed var(--border);

    border-radius: 17px;

}


.empty-state.visible {
    display: block;
}


.empty-state i {

    font-size: 35px;

    color: #55556b;

    margin-bottom: 15px;

}


.empty-state h3 {

    font-size: 15px;

    margin-bottom: 8px;

}


.empty-state p {

    color: var(--muted);

    font-size: 12px;

}


/* CACHE INFORMATION */

.cache-information {

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 25px;

    padding: 14px 16px;

    border: 1px solid var(--border);

    background: var(--surface);

    border-radius: 12px;

    color: var(--muted);

    font-size: 10px;

}


.cache-status {

    display: flex;

    align-items: center;

    gap: 7px;

}


.cache-status i {
    color: var(--success);
}


/* FIXED PLAYER */

.player-container {

    position: fixed;

    z-index: 100;

    bottom: 0;

    left: 0;

    width: 100%;

    padding: 13px 20px calc(13px + env(safe-area-inset-bottom));

    background: rgba(15,15,25,.94);

    border-top: 1px solid rgba(255,255,255,.09);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);

}


.player-content {

    max-width: 1100px;

    margin: auto;

}


.player-track {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 10px;

    min-width: 0;

}


.player-cover {

    flex-shrink: 0;

    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: linear-gradient(
    145deg,
    var(--primary),
    #3346a5
    );

}


.player-info {

    flex: 1;

    min-width: 0;

}


.player-title {

    font-size: 12px;

    font-weight: 700;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.player-artist {

    color: var(--muted);

    font-size: 10px;

    margin-top: 4px;

}


.player-indicator {

    color: var(--success);

    font-size: 10px;

}


.audio-element {

    display: block;

    width: 100%;

    height: 35px;

    outline: none;

}


.audio-element::-webkit-media-controls-panel {

    background: #e8e8ef;

}


/* FOOTER */

.footer {

    text-align: center;

    color: #555568;

    font-size: 10px;

    margin-top: 25px;

}


/* RESPONSIVE */

@media (min-width: 700px) {

    .container {
        padding-top: 35px;
    }

    .statistics {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero {
        padding: 42px;
    }

    .music-item {
        padding: 16px;
    }

}


@media (max-width: 420px) {

    .hero {
        padding: 25px 21px;
    }

    .hero-decoration {
        right: 12px;
        font-size: 65px;
    }

    .brand h1 {
        font-size: 16px;
    }

    .refresh-button {
        padding: 10px 12px;
    }

    .refresh-button span {
        display: none;
    }

}


/* ARTIST GROUPS */

.artist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.artist-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: .2s;
}

.artist-group[open] {
    border-color: rgba(139, 92, 246, .35);
}

.artist-summary {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    cursor: pointer;
    list-style: none;
    transition: .2s;
}

.artist-summary::-webkit-details-marker {
    display: none;
}

.artist-summary:hover {
    background: var(--surface-light);
}

.artist-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(139, 92, 246, .14);
    color: #b9a4ff;
    font-size: 17px;
}

.artist-info {
    flex: 1;
    min-width: 0;
}

.artist-name {
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artist-music-count {
    color: var(--muted);
    font-size: 10px;
    margin-top: 5px;
}

.artist-arrow {
    color: var(--muted);
    font-size: 12px;
    transition: transform .25s;
}

.artist-group[open] .artist-arrow {
    transform: rotate(180deg);
}

/* MUSIC LIST INSIDE ARTIST */

.artist-group .music-list {
    padding: 0 12px 12px;
}

.artist-group .music-item {
    background: rgba(255, 255, 255, .025);
}

.artist-group .music-item + .music-item {
    margin-top: 8px;
}

/* HIDDEN SEARCH RESULTS */

.artist-group.is-hidden {
    display: none;
}

/* RESPONSIVE */

@media (max-width: 420px) {

    .artist-summary {
        padding: 14px;
    }

    .artist-icon {
        width: 39px;
        height: 39px;
    }

}
