:root {
    --primary-blue: #3b82f6;
    --primary-hover: #1d4ed8;
    --bg-dark: #0f172a;
    --glass-white: rgba(255, 255, 255, 0.03);
    --border-white: rgba(255, 255, 255, 0.05);
    --text-muted: #94a3b8;
}

.music-container {
    background: var(--bg-dark);
    border-radius: 24px;
    color: white;
    max-width: 950px;
    margin: 20px auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    font-family: 'Inter', sans-serif;
    padding: 5px 50px;
}

.music-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f8f9fa;
    letter-spacing: 0.5px;
}

.music-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 6px 40px;
    gap: 60px;
    margin-bottom: 15px;
}

.hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.player-info {
    margin-bottom: 10px;
}

.player-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: #ffffff;
}

.player-artist {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.hero-art {
    width: 220px;
    height: 220px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.artist-item.active .artist-name {
    color: #272727;
    font-weight: 500;
}

.hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
}

.player-btn {
    background: transparent;
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.player-btn:hover {
    transform: scale(1.1);
}

.player-btn-main {
    background: #ffffff;
    color: #000000;
    width: 60px;
    height: 60px;
    font-size: 1.4rem;
}

.player-controls .player-btn:not(.player-btn-main) {
    width: 55px;
    height: 55px;
}

.player-controls .player-btn:not(.player-btn-main) i {
    font-size: 1.4rem;
}

.player-btn-main:hover {
    transform: scale(1.08);
}

.player-progress-bg {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
}

.player-progress-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 10px;
    width: 0%;
}

.music-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 275px;
    overflow-y: auto;
    padding-right: 8px;
}

.music-list::-webkit-scrollbar { width: 5px; }
.music-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.music-list::-webkit-scrollbar-thumb { background: var(--primary-blue); border-radius: 10px; }

.music-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--glass-white);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.music-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.music-item.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.music-item-art {
    margin-right: 15px;
    color: var(--primary-blue);
}

.artist-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 20px 4px 24px;
    max-width: 950px;
    margin: 0 auto;
    justify-content: flex-start;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.artist-item {
    background: transparent;
    border: 0;
    padding: 0;
    text-align: center;
    min-width: 145px;
    max-width: 145px;
    flex: 0 0 145px;
    cursor: pointer;
    transition: transform 0.2s ease;
    scroll-snap-align: start;
}

.artist-item:hover {
    transform: translateY(-5px);
}

.artist-item:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.8);
    outline-offset: 4px;
    border-radius: 12px;
}

.artist-img {
    width: 145px;
    height: 145px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 2px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.artist-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
    min-height: 2.4em;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.artist-row::-webkit-scrollbar {
    height: 8px;
}

.artist-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.artist-row::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.85);
    border-radius: 999px;
}

.explore-container.sidebar-collapsed #music .music-container,
.explore-container.sidebar-collapsed #music .artist-row {
    max-width: 1080px;
}

@media (max-width: 768px) {
    .music-container {
        max-width: 620px;
        margin: 5px auto;
        padding: 10px;
    }

    .music-hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 12px;
        gap: 12px;
    }

    .hero-art {
        width: 140px;
        height: 140px;
    }

    .player-title {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .player-artist {
        font-size: 0.85rem;
    }

    .player-controls {
        justify-content: center;
        gap: 30px !important;
        margin-bottom: 10px;
    }

    .player-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .player-btn-main {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .music-list {
        max-height: 160px;
        gap: 4px;
    }

    .music-item {
        padding: 6px 10px;
        border-radius: 8px;
    }

    .artist-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        justify-content: stretch;
        padding: 14px 8px 20px;
        overflow: visible;
    }

    .artist-item {
        min-width: 0;
        max-width: none;
        flex: none;
        width: 100%;
    }

    .artist-img {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        border-radius: 16px;
        margin-bottom: 8px;
    }

    .artist-name {
        font-size: 0.78rem;
        font-weight: 500;
        color: var(--text-muted);
        text-align: center;
        overflow: hidden;
        display: -webkit-box;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.3;
        min-height: 2.4em;
        margin-top: 6px;
    }
}