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


body {
    font-family: 'Arial', sans-serif;
    background-color: #121212;
    color: white;
    overflow: hidden;
}

button {
    font: inherit;
}

:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}


.app {
    display: flex;
    height: 100vh;
    height: 100dvh;
}


.sidebar {
    width: 250px;
    background-color: #000000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    padding-bottom: 110px;
    overflow-y: auto;
}


.logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    text-decoration: none;
}

.logo i {
    font-size: 32px;
    color: #1db954;
    margin-right: 10px;
}

.logo h2 {
    color: #ffffff;
    font-size: 24px;
}


.navigation ul{
    list-style: none;
    margin-bottom: 30px;
}

.navigation li {
    margin-bottom: 15px;
}

.navigation a,
.playlists a {
    color: #b3b3b3;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.navigation a:hover,
.playlists a:hover,
.navigation a.active,
.playlists a.active {
    color: #ffffff;
}

.navigation i,
.playlists i {
    margin-right: 15px;
    width: 20px;
}


.playlists h3 {
    color: #b3b3b3;
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.playlists ul {
    list-style: none;
}

.playlists li {
    padding: 8px 0;
}

.credit {
    margin-top: auto;
    padding-top: 20px;
    color: #8a8a8a;
    font-size: 12px;
}

.credit a {
    color: inherit;
}


.main-content {
    flex: 1;
    background: linear-gradient(135deg, #1db954, #121212);
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-bottom: 90px;
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}


.search-bar {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 25px;
    padding: 8px 15px;
    width: 300px;
    max-width: 100%;
}

.search-bar input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 0;
    padding: 5px;
    font-size: 14px;
}

.search-bar button {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
}


.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content h2 {
    margin-bottom: 6px;
    font-size: 28px;
    overflow-wrap: anywhere;
}

.view-subtitle {
    min-height: 18px;
    margin-bottom: 20px;
    color: #e0e0e0;
    font-size: 14px;
}

.view-message:not(:empty) {
    color: #ffffff;
    font-size: 16px;
}


.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.song-card {
    background: #181818;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    min-width: 0;
}

.song-card:hover {
    background-color: #282828;
    transform: translateY(-5px);
}

.song-card.active h3 {
    color: #1db954;
}

.art {
    position: relative;
    margin-bottom: 12px;
}

.song-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.song-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.song-card p {
    font-size: 14px;
    color: #b3b3b3;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card:hover .play-button,
.song-card.active .play-button,
.play-button:focus-visible {
    opacity: 1;
    transform: scale(1.1);
}

.play-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #1db954;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}


.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #181818;
    border-top: 1px solid #282828;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    height: 90px;
    gap: 16px;
}

.player button {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    transition: color 0.2s ease;
}

.player button:hover:not(:disabled) {
    color: #ffffff;
}

.player-left,
.player-right {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.player-left {
    gap: 12px;
}

.player-left img {
    width: 56px;
    height: 56px;
    flex: none;
    object-fit: cover;
    border-radius: 4px;
}

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

.song-info h4,
.song-info p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.song-info p {
    color: #b3b3b3;
    font-size: 12px;
}

.song-info .player-status {
    color: #ff8a80;
}

.like-button {
    flex: none;
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 6px;
}

.like-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.player .like-button.liked,
.like-button.liked {
    color: #1db954;
}

.player-center {
    flex: 1.4;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 22px;
}

.controls button {
    font-size: 16px;
}

.player #play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #000000;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: #b3b3b3;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    flex: 1;
    height: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
    background: linear-gradient(#4d4d4d, #4d4d4d) center / 100% 4px no-repeat;
    border-radius: 2px;
}

.progress {
    width: 0;
    height: 4px;
    background-color: #1db954;
    border-radius: 2px;
}

.player-right {
    justify-content: flex-end;
    gap: 10px;
}

.volume-slider input {
    width: 110px;
    accent-color: #1db954;
    display: block;
}

@media (max-width: 768px) {
    .app {
        flex-direction: column;
    }

    .sidebar {
        width: auto;
        padding: 10px 16px;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        overflow-x: auto;
        scrollbar-width: none;
        flex: none;
    }

    .logo {
        margin-bottom: 0;
    }

    .logo i {
        font-size: 22px;
        margin-right: 0;
    }

    .logo h2,
    .playlists h3,
    .credit {
        display: none;
    }

    .navigation ul,
    .playlists ul {
        display: flex;
        margin-bottom: 0;
        gap: 14px;
    }

    .navigation li {
        margin-bottom: 0;
    }

    .playlists li {
        padding: 0;
    }

    .navigation a,
    .playlists a {
        padding: 6px 0;
        white-space: nowrap;
        font-size: 14px;
    }

    .navigation i,
    .playlists i {
        margin-right: 6px;
        width: auto;
    }

    .main-content {
        min-height: 0;
        padding-bottom: 132px;
    }

    .header {
        padding: 10px 16px;
    }

    .search-bar {
        width: 100%;
    }

    .content {
        padding: 16px;
    }

    .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .song-card {
        padding: 10px;
    }

    .play-button {
        opacity: 1;
    }

    .player {
        height: 132px;
        padding: 10px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .player-left,
    .player-center {
        flex: none;
    }

    .player-center {
        gap: 4px;
    }

    .player-right {
        display: none;
    }
}