/* =========================================
   RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #1ed760;
    --green-dark: #1db954;

    --black: #050505;
    --dark: #121212;
    --card: #181818;
    --card-hover: #242424;

    --text: #ffffff;
    --muted: #a7a7a7;
    --border: #282828;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Montserrat", sans-serif;
    background: var(--black);
    color: var(--text);
    overflow: hidden;
}

button,
input {
    font-family: inherit;
}

button {
    border: none;
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================
   APP
========================================= */

.app {
    height: 100vh;

    background:
        radial-gradient(
            circle at 65% -10%,
            rgba(29, 185, 84, 0.18),
            transparent 32%
        ),
        var(--black);
}


/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    position: fixed;

    left: 0;
    top: 0;
    bottom: 90px;

    width: 245px;

    background: #050505;

    padding: 22px 12px;

    overflow-y: auto;

    z-index: 20;
}


/* =========================================
   LOGO
========================================= */

.logo {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 0 14px 28px;
}


/* Spotify icon */

.logo-circle {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: var(--green);

    display: flex;

    flex-direction: column;

    justify-content: center;

    gap: 3px;

    padding: 8px;

    flex-shrink: 0;
}

.logo-circle span {
    display: block;

    height: 2px;

    background: #000;

    border-radius: 10px;
}

.logo-circle span:nth-child(1) {
    width: 20px;
}

.logo-circle span:nth-child(2) {
    width: 17px;
}

.logo-circle span:nth-child(3) {
    width: 14px;
}


/* Spotify + Kavesh */

.logo-text {
    display: flex;

    align-items: baseline;

    gap: 7px;

    white-space: nowrap;
}

.logo-text h2 {
    font-size: 21px;

    font-weight: 800;

    letter-spacing: -0.5px;
}

.logo-text small {
    font-size: 9px;

    color: var(--green);

    font-weight: 600;

    letter-spacing: 0.3px;
}


/* =========================================
   NAVIGATION
========================================= */

.main-nav {
    display: flex;

    flex-direction: column;

    gap: 5px;
}

.nav-link {
    position: relative;

    display: flex;

    align-items: center;

    gap: 18px;

    padding: 13px 15px;

    border-radius: 7px;

    color: #b3b3b3;

    font-size: 14px;

    font-weight: 600;

    transition: all 0.2s ease;
}

.nav-link:hover {
    color: white;

    background: #181818;
}

.nav-link.active {
    background: #1f1f1f;

    color: white;
}

.nav-link.active::before {
    content: "";

    width: 3px;

    height: 25px;

    background: var(--green);

    position: absolute;

    left: 0;

    border-radius: 0 5px 5px 0;
}

.icon {
    font-size: 23px;

    line-height: 1;
}


/* =========================================
   PLAYLISTS
========================================= */

.playlist-heading {
    margin-top: 28px;

    padding: 0 15px 12px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    color: #aaa;

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: 1px;
}

.playlist-heading button {
    background: transparent;

    color: #aaa;

    font-size: 24px;

    transition: 0.2s;
}

.playlist-heading button:hover {
    color: white;

    transform: scale(1.1);
}

.playlist-list {
    display: flex;

    flex-direction: column;
}

.playlist-list a {
    padding: 9px 15px;

    color: #9b9b9b;

    font-size: 13px;

    transition: 0.2s;
}

.playlist-list a:hover {
    color: white;
}


/* =========================================
   MAIN
========================================= */

.main {
    margin-left: 245px;

    height: calc(100vh - 90px);

    overflow-y: auto;

    padding-bottom: 50px;
}


/* =========================================
   TOP BAR
========================================= */

.topbar {
    height: 76px;

    display: flex;

    align-items: center;

    gap: 20px;

    padding: 12px 25px;

    position: sticky;

    top: 0;

    z-index: 10;

    background: rgba(5, 5, 5, 0.82);

    backdrop-filter: blur(15px);
}

.navigation-buttons {
    display: flex;

    gap: 10px;
}

.navigation-buttons button {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: #121212;

    color: white;

    font-size: 27px;

    line-height: 30px;

    transition: 0.2s;
}

.navigation-buttons button:hover {
    background: #292929;
}


.search-box {
    width: 390px;

    height: 44px;

    background: #242424;

    border-radius: 30px;

    display: flex;

    align-items: center;

    padding: 0 17px;

    gap: 10px;

    transition: 0.2s;
}

.search-box:focus-within {
    background: #303030;

    box-shadow: 0 0 0 2px white;
}

.search-box span {
    font-size: 25px;

    color: #aaa;
}

.search-box input {
    width: 100%;

    border: none;

    outline: none;

    background: transparent;

    color: white;

    font-size: 13px;
}

.search-box input::placeholder {
    color: #aaa;
}


.top-actions {
    margin-left: auto;

    display: flex;

    align-items: center;

    gap: 25px;
}

.notification {
    background: transparent;

    color: white;

    font-size: 22px;
}

.notification:hover {
    color: var(--green);
}


.profile {
    display: flex;

    align-items: center;

    gap: 9px;

    font-size: 12px;

    font-weight: 600;
}

.profile-img {
    width: 34px;
    height: 34px;

    background: linear-gradient(
        135deg,
        #333,
        #777
    );

    display: flex;

    justify-content: center;

    align-items: center;

    border-radius: 50%;

    font-weight: 700;
}


/* =========================================
   CONTENT
========================================= */

.content {
    padding: 0 25px 60px;
}


/* =========================================
   HERO
========================================= */

.hero {
    min-height: 275px;

    border-radius: 10px;

    overflow: hidden;

    position: relative;

    display: flex;

    align-items: center;

    background:
        linear-gradient(
            90deg,
            #0b4935 0%,
            #0b3428 48%,
            rgba(0, 0, 0, 0.2) 100%
        );
}

.hero-content {
    padding: 40px;

    position: relative;

    z-index: 2;

    max-width: 650px;
}

.hero-label {
    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2px;

    color: #d1d1d1;
}

.hero h1 {
    margin-top: 12px;

    font-size: clamp(38px, 5vw, 64px);

    line-height: 1;

    font-weight: 800;

    letter-spacing: -2px;
}

.hero p {
    margin-top: 14px;

    color: #ddd;

    font-size: 14px;
}

.hero-buttons {
    margin-top: 25px;

    display: flex;

    gap: 12px;
}

.play-button {
    background: var(--green);

    color: black;

    padding: 12px 24px;

    border-radius: 30px;

    font-weight: 700;

    transition: 0.2s;
}

.play-button:hover {
    transform: scale(1.05);

    background: #3be477;
}

.follow-button {
    padding: 12px 24px;

    border: 1px solid #aaa;

    border-radius: 30px;

    background: transparent;

    color: white;

    font-weight: 600;

    transition: 0.2s;
}

.follow-button:hover {
    border-color: white;

    transform: scale(1.03);
}

.hero-image {
    position: absolute;

    right: 0;

    top: 0;

    width: 55%;

    height: 100%;
}

.hero-image::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            #0b4935 0%,
            transparent 60%
        );
}

.hero-image img {
    width: 100%;

    height: 100%;

    object-fit: cover;
}


/* =========================================
   SECTIONS
========================================= */

.section {
    margin-top: 35px;
}

.section-title {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 17px;
}

.section-title h2 {
    font-size: 21px;

    font-weight: 700;
}

.section-title button {
    background: transparent;

    color: #aaa;

    font-size: 12px;

    font-weight: 600;
}

.section-title button:hover {
    color: white;
}


/* =========================================
   RECENT CARDS
========================================= */

.horizontal-cards {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(130px, 1fr));

    gap: 14px;
}

.recent-card {
    display: flex;

    align-items: center;

    background: #181818;

    border-radius: 5px;

    overflow: hidden;

    cursor: pointer;

    transition: 0.25s;
}

.recent-card:hover {
    background: #282828;

    transform: translateY(-3px);
}

.recent-card img {
    width: 70px;
    height: 70px;

    object-fit: cover;

    flex-shrink: 0;
}

.recent-card span {
    padding: 10px;

    font-size: 12px;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================
   MUSIC GRID
========================================= */

.music-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(140px, 1fr));

    gap: 18px;
}

.music-card {
    background: #181818;

    padding: 13px;

    border-radius: 8px;

    cursor: pointer;

    transition: 0.25s;

    position: relative;
}

.music-card:hover {
    background: #242424;

    transform: translateY(-4px);
}

.music-card img {
    width: 100%;

    aspect-ratio: 1;

    object-fit: cover;

    border-radius: 5px;

    display: block;
}

.music-card h3 {
    margin-top: 13px;

    font-size: 13px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.music-card p {
    margin-top: 6px;

    color: #999;

    font-size: 11px;

    line-height: 1.4;
}

.card-play {
    position: absolute;

    right: 18px;

    bottom: 55px;

    width: 43px;

    height: 43px;

    border-radius: 50%;

    background: var(--green);

    color: black;

    display: flex;

    align-items: center;

    justify-content: center;

    opacity: 0;

    transform: translateY(8px);

    transition: 0.2s;

    box-shadow: 0 5px 15px #000;
}

.music-card:hover .card-play {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================
   ARTISTS
========================================= */

.artists {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(120px, 1fr));

    gap: 20px;
}

.artist {
    text-align: center;

    cursor: pointer;
}

.artist img {
    width: 100%;

    aspect-ratio: 1;

    object-fit: cover;

    border-radius: 50%;

    border: 3px solid transparent;

    transition: 0.3s;
}

.artist:hover img {
    border-color: var(--green);

    transform: scale(1.03);
}

.artist h3 {
    margin-top: 12px;

    font-size: 13px;
}


/* =========================================
   SONG TABLE
========================================= */

.song-table {
    display: flex;

    flex-direction: column;
}

.song-row {
    display: grid;

    grid-template-columns:
        45px
        1fr
        180px
        80px;

    align-items: center;

    gap: 12px;

    padding: 10px;

    border-radius: 6px;

    cursor: pointer;
}

.song-row:hover {
    background: #1d1d1d;
}

.song-number {
    color: #888;

    text-align: center;
}

.song-info {
    display: flex;

    align-items: center;

    gap: 12px;
}

.song-info img {
    width: 45px;

    height: 45px;

    object-fit: cover;

    border-radius: 4px;
}

.song-info h4 {
    font-size: 13px;
}

.song-info p {
    margin-top: 4px;

    font-size: 11px;

    color: #999;
}

.song-album {
    color: #999;

    font-size: 11px;
}

.song-duration {
    color: #999;

    font-size: 11px;
}


/* =========================================
   MUSIC PLAYER
========================================= */

.player {
    position: fixed;

    left: 0;

    right: 0;

    bottom: 0;

    height: 90px;

    background: #0b0b0b;

    border-top: 1px solid #202020;

    z-index: 50;

    display: grid;

    grid-template-columns: 30% 40% 30%;

    align-items: center;

    padding: 0 20px;
}


/* CURRENT SONG */

.current-song {
    display: flex;

    align-items: center;

    min-width: 0;
}

.current-song img {
    width: 55px;

    height: 55px;

    object-fit: cover;

    border-radius: 4px;

    flex-shrink: 0;
}

.current-info {
    margin-left: 12px;

    min-width: 0;
}

.current-info h4 {
    font-size: 12px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.current-info p {
    margin-top: 5px;

    font-size: 10px;

    color: #999;
}

.heart {
    margin-left: 18px;

    background: transparent;

    color: white;

    font-size: 22px;

    transition: 0.2s;
}

.heart:hover {
    transform: scale(1.15);
}


/* PLAYER CENTER */

.player-center {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 7px;
}

.controls {
    display: flex;

    align-items: center;

    gap: 18px;
}

.controls button {
    background: transparent;

    color: #b3b3b3;

    font-size: 14px;

    transition: 0.2s;
}

.controls button:hover {
    color: white;

    transform: scale(1.1);
}

.controls .main-play {
    width: 35px;

    height: 35px;

    border-radius: 50%;

    background: white;

    color: black;

    font-size: 15px;
}

.controls .main-play:hover {
    transform: scale(1.08);

    background: var(--green);
}

.progress-container {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 8px;
}

.progress-container span {
    width: 35px;

    color: #999;

    font-size: 9px;

    text-align: center;
}

input[type="range"] {
    appearance: none;

    height: 4px;

    border-radius: 5px;

    background: #555;

    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;

    width: 11px;

    height: 11px;

    border-radius: 50%;

    background: white;

    opacity: 0;
}

input[type="range"]:hover::-webkit-slider-thumb {
    opacity: 1;
}

#progress {
    flex: 1;
}


/* VOLUME */

.volume {
    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 10px;
}

.volume span {
    font-size: 14px;
}

#volume {
    width: 100px;
}


/* =========================================
   SEARCH
========================================= */

.hidden {
    display: none !important;
}

.search-section,
.library-section {
    padding: 30px 25px 100px;
}

.search-section h1,
.library-section h1 {
    font-size: 32px;
}

.large-search {
    width: 500px;

    max-width: 100%;

    height: 50px;

    background: white;

    border-radius: 30px;

    display: flex;

    align-items: center;

    padding: 0 20px;

    margin-top: 25px;

    color: black;
}

.large-search span {
    font-size: 25px;
}

.large-search input {
    width: 100%;

    border: none;

    outline: none;

    margin-left: 10px;

    font-size: 14px;
}

.search-result {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 10px;

    border-radius: 7px;

    cursor: pointer;

    margin-top: 5px;
}

.search-result:hover {
    background: #1e1e1e;
}

.search-result img {
    width: 55px;

    height: 55px;

    object-fit: cover;

    border-radius: 5px;
}


/* =========================================
   LIBRARY
========================================= */

.library-tabs {
    display: flex;

    gap: 10px;

    margin: 25px 0;
}

.library-tab {
    padding: 9px 18px;

    border-radius: 20px;

    background: #252525;

    color: white;
}

.library-tab:hover {
    background: #333;
}

.library-tab.active {
    background: white;

    color: black;
}


/* =========================================
   MOBILE NAV
========================================= */

.mobile-nav {
    display: none;
}


/* =========================================
   MOBILE BRAND HEADER
========================================= */

.mobile-brand {
    display: none;
}


/* =========================================
   SCROLLBAR
========================================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #444;

    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1100px) {

    .music-grid {
        grid-template-columns:
            repeat(4, minmax(140px, 1fr));
    }

    .artists {
        grid-template-columns:
            repeat(4, minmax(120px, 1fr));
    }

    .horizontal-cards {
        grid-template-columns:
            repeat(3, 1fr);
    }

}


/* =========================================
   SMALL TABLET
========================================= */

@media (max-width: 900px) {

    .sidebar {
        width: 185px;

        padding: 20px 8px;
    }


    .logo {
        justify-content: flex-start;

        padding: 0 10px 25px;
    }


    .logo-text {
        display: flex;

        align-items: baseline;

        gap: 5px;
    }


    .logo-text h2 {
        font-size: 18px;
    }


    .logo-text small {
        font-size: 8px;
    }


    .nav-link {
        justify-content: flex-start;
    }


    .nav-link span:last-child {
        display: inline;
    }


    .playlist-heading span {
        display: inline;
    }


    .playlist-list {
        display: flex;
    }


    .main {
        margin-left: 185px;
    }


    .hero-image {
        width: 60%;
    }


    .music-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    body {
        overflow: hidden;
    }


    /* -------------------------------------
       SIDEBAR HIDDEN
    ------------------------------------- */

    .sidebar {
        display: none;
    }


    /* -------------------------------------
       MAIN
    ------------------------------------- */

    .main {
        margin-left: 0;

        height: calc(100vh - 145px);

        padding-bottom: 70px;

        overflow-y: auto;
    }


    /* -------------------------------------
       MOBILE BRANDING
    ------------------------------------- */

    .main::before {

        content: "Spotify  •  by Kavesh";

        display: block;

        position: sticky;

        top: 0;

        z-index: 30;

        height: 48px;

        padding: 14px 16px 0;

        background: rgba(5, 5, 5, 0.96);

        color: white;

        font-size: 16px;

        font-weight: 800;

        letter-spacing: -0.3px;

        border-bottom: 1px solid #181818;

    }


    /* -------------------------------------
       TOPBAR
    ------------------------------------- */

    .topbar {

        height: 65px;

        padding: 10px 15px;

        position: sticky;

        top: 48px;

        z-index: 25;

        background: rgba(5, 5, 5, 0.94);

    }


    .navigation-buttons {
        display: none;
    }


    .search-box {
        width: 100%;

        height: 42px;
    }


    .top-actions {
        display: none;
    }


    /* -------------------------------------
       CONTENT
    ------------------------------------- */

    .content {
        padding: 0 15px 100px;
    }


    /* -------------------------------------
       HERO
    ------------------------------------- */

    .hero {

        min-height: 350px;

        align-items: flex-end;

    }


    .hero-content {

        padding: 25px;

        width: 100%;

    }


    .hero h1 {

        font-size: 36px;

        letter-spacing: -1.5px;

    }


    .hero-image {

        width: 100%;

        height: 100%;

    }


    .hero-image::after {

        background:

            linear-gradient(
                0deg,
                #0b4935 5%,
                rgba(0, 0, 0, 0.12) 100%
            );

    }


    /* -------------------------------------
       RECENT CARDS
    ------------------------------------- */

    .horizontal-cards {

        grid-template-columns:
            repeat(2, 1fr);

    }


    /* -------------------------------------
       MUSIC GRID
    ------------------------------------- */

    .music-grid {

        grid-template-columns:
            repeat(2, 1fr);

        gap: 12px;

    }


    .music-card {

        padding: 10px;

    }


    .music-card h3 {

        font-size: 12px;

    }


    /* -------------------------------------
       ARTISTS
    ------------------------------------- */

    .artists {

        grid-template-columns:
            repeat(3, 1fr);

        gap: 15px;

    }


    .artist h3 {

        font-size: 11px;

    }


    /* -------------------------------------
       SONG TABLE
    ------------------------------------- */

    .song-row {

        grid-template-columns:
            30px 1fr 50px;

    }


    .song-album {

        display: none;

    }


    /* -------------------------------------
       PLAYER
    ------------------------------------- */

    .player {

        bottom: 58px;

        height: 72px;

        grid-template-columns: 1fr;

        padding: 8px 12px;

    }


    .player-center {

        position: absolute;

        right: 15px;

        top: 18px;

    }


    .controls {

        gap: 12px;

    }


    .controls button:not(.main-play) {

        display: none;

    }


    .progress-container {

        display: none;

    }


    .volume {

        display: none;

    }


    .current-song img {

        width: 48px;

        height: 48px;

    }


    .current-info {

        max-width: 180px;

    }


    .heart {

        margin-left: 10px;

    }


    /* -------------------------------------
       MOBILE NAV
    ------------------------------------- */

    .mobile-nav {

        position: fixed;

        display: flex;

        left: 0;

        right: 0;

        bottom: 0;

        height: 58px;

        background: #111;

        border-top: 1px solid #222;

        z-index: 100;

        justify-content: space-around;

    }


    .mobile-nav-item {

        flex: 1;

        background: transparent;

        color: #777;

        display: flex;

        flex-direction: column;

        align-items: center;

        justify-content: center;

        gap: 3px;

        font-size: 9px;

    }


    .mobile-nav-item span {

        font-size: 20px;

    }


    .mobile-nav-item.active {

        color: white;

    }


    .mobile-nav-item.active span {

        color: var(--green);

    }


    /* -------------------------------------
       SEARCH
    ------------------------------------- */

    .search-section,
    .library-section {

        padding: 20px 15px 100px;

    }


    .search-section h1,
    .library-section h1 {

        font-size: 28px;

    }


    .large-search {

        margin-top: 20px;

    }

}


/* =========================================
   VERY SMALL PHONES
========================================= */

@media (max-width: 400px) {

    .main::before {

        font-size: 14px;

        height: 45px;

    }


    .topbar {

        top: 45px;

    }


    .hero {

        min-height: 320px;

    }


    .hero h1 {

        font-size: 31px;

    }


    .hero p {

        font-size: 12px;

    }


    .music-grid {

        gap: 9px;

    }


    .music-card {

        padding: 8px;

    }


    .current-info {

        max-width: 135px;

    }

}