:root {
    --green: #1DB954;
    --black: #191414;
    --white: #FFFFFF;
    --light-black: #282828;
    --grey: #B3B3B3;
    --dark-grey: #121212;
    --hover-grey: #2a2a2a;
    --font-family: 'Circular Std', 'Inter', sans-serif;
}

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

/* Utility Classes */
.clickable-artist {
    cursor: pointer;
    text-decoration: none;
}

.clickable-artist:hover {
    text-decoration: underline;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

body {
    font-family: var(--font-family);
    background-color: var(--dark-grey);
    color: var(--white);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Layout */
.app-container {
    display: flex;
    height: calc(100vh - 90px);
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: #000000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.logo {
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--grey);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: color 0.2s;
}

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

.nav-icon {
    width: 24px;
    height: 24px;
}

.sidebar-divider {
    height: 1px;
    background-color: #282828;
    margin: 8px 0;
}

.playlist-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    background: none;
    border: none;
    color: var(--grey);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.action-btn:hover {
    color: var(--white);
}

.icon-box {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.create-playlist .icon-box {
    background-color: var(--grey);
    color: var(--black);
}

.liked-songs .icon-box {
    background: linear-gradient(135deg, #450af5, #c4efd9);
    color: var(--white);
}

/* Main Content */
.main-content {
    flex: 1;
    background: linear-gradient(180deg, #222222 0%, #121212 100%);
    overflow-y: auto;
    position: relative;
    padding: 20px 32px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

.nav-arrows {
    display: flex;
    gap: 16px;
}

.arrow-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-container {
    flex: 0 1 364px;
    position: relative;
}

.search-input {
    width: 100%;
    height: 48px;
    border-radius: 500px;
    border: none;
    padding: 6px 48px;
    color: #000;
    font-size: 14px;
}

.search-icon-input {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #121212;
}

/* Grid Layouts */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 30px;
}

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

/* Extra Large Cards for Trending */
.card-grid.large-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.card {
    background-color: #181818;
    padding: 16px;
    border-radius: 8px;
    transition: background-color 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card:hover {
    background-color: #282828;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-subtitle {
    color: var(--grey);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Player Bar */
.player-bar {
    height: 90px;
    background-color: #181818;
    border-top: 1px solid #282828;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

.now-playing {
    display: flex;
    align-items: center;
    width: 30%;
    min-width: 180px;
}

.now-playing-art {
    width: 56px;
    height: 56px;
    margin-right: 14px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.track-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 14px;
}

.track-name {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.artist-name {
    color: var(--grey);
    font-size: 11px;
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
    max-width: 722px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--grey);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: var(--white);
}

.play-pause-btn {
    width: 32px;
    height: 32px;
    background-color: var(--white);
    border-radius: 50%;
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.play-pause-btn:hover {
    transform: scale(1.05);
    color: var(--black);
}

.playback-bar {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.time-display {
    color: var(--grey);
    font-size: 11px;
    min-width: 40px;
    text-align: center;
}

.progress-container {
    flex: 1;
    height: 4px;
    background-color: #535353;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background-color: var(--white);
    border-radius: 2px;
    width: 0%;
}

.progress-container:hover .progress-bar {
    background-color: var(--green);
}

.volume-controls {
    width: 30%;
    min-width: 180px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 100px;
    height: 4px;
    background-color: #535353;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-level {
    height: 100%;
    background-color: var(--white);
    border-radius: 2px;
    width: 100%;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    border: 3px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Song List in Album/Playlist View */
.song-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.song-list th {
    text-align: left;
    color: var(--grey);
    font-weight: 400;
    font-size: 12px;
    border-bottom: 1px solid #282828;
    padding: 8px 16px;
    text-transform: uppercase;
}

.song-list td {
    padding: 8px 16px;
    color: var(--grey);
    font-size: 14px;
}

.song-row {
    transition: background-color 0.2s;
    cursor: pointer;
}

.song-row:hover {
    background-color: #2a2a2a;
}

.song-row:hover td {
    color: var(--white);
}

.song-title-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.song-title-text {
    color: var(--white);
    font-size: 16px;
}

.song-artist-text {
    font-size: 14px;
}

.download-btn {
    color: var(--grey);
    background: none;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    color: var(--white);
}