* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Outfit", sans-serif;
    font-style: normal;
}

h1,
h2,
h3 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
}

:root {
    --primary-color: #0A3D62;
    --secondary-color: #178A96;
    --accent-color: #D94C2A;
    --background-color: #F1E9D2;
    --alt-background-color: #E8EEF2;
    --nav-background-color: #0A3D62;

    --text-color: #1E2A34;
    --secondary-text-color: #1F2937;
    --nav-text-color: #FFFFFF;
    --nav-text-hover-color: #D94C2A;

    --border: solid 1px #D1D5DB;
    --border-light: solid 1px #E5E7EB;
    --border-highlight: solid 1px #178A96;
}

h1 {
    font-size: 3rem;
}

h2 {
    color: var(--text-color);
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    font-size: 1.25rem;
}

body {
    max-width: 840px;
    margin: 0 auto;
    color: var(--text-color);
    background-color: var(--background-color);
}

header {
    display: grid;
    grid-template-columns: .4fr 1fr;
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    height: fit-content;
    background-color: var(--nav-background-color);
    color: var(--nav-text-color);
}

header a {
    text-decoration: none;
    color: var(--nav-text-color);
    font-size: x-large;
}

nav {
    display: flex;
    width: 100%;
    justify-content: space-evenly;
    align-items: center;
}

nav a:hover {
    color: var(--nav-text-hover-color);
}

section {
    padding: 1rem;
    border: var(--border-highlight);
    border-radius: 8px;
}

button {
    cursor: pointer;
    font-size: large;
}

footer {
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    border-top: var(--border);
}

footer p {
    font-size: 1rem;
    text-align: center;
}

/* Home Page */

#hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    width: 100%;
    overflow: hidden;
    background: var(--primary-color);
    color: var(--nav-text-color);
    text-align: center;
}

.hero-content {
    position: relative;
    /* in front of diagonal background*/
    z-index: 1;
}

#hero .bars {
    z-index: 1;
}

.bars {
    width: 5rem;
    height: 3rem;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    pointer-events: none;
}

.bar {
    width: 3px;
    height: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: bounce 1s infinite ease-in-out;
}

.bar-bg-color .bar {
    background: rgba(0, 0, 0, 0.66);
}
/* Stagger each bar with animation-delay */
.bar:nth-child(1) {
    animation-delay: 0s;
}

.bar:nth-child(2) {
    animation-delay: 0.1s;
}

.bar:nth-child(3) {
    animation-delay: 0.2s;
}

.bar:nth-child(4) {
    animation-delay: 0.3s;
}

.bar:nth-child(5) {
    animation-delay: 0.4s;
}

.bar:nth-child(6) {
    animation-delay: 0.5s;
}

.bar:nth-child(7) {
    animation-delay: 0.6s;
}

.bar:nth-child(8) {
    animation-delay: 0.7s;
}

.bar:nth-child(9) {
    animation-delay: 0.8s;
}

.bar:nth-child(10) {
    animation-delay: 0.9s;
}

#hero h1 {
    margin-bottom: 1rem;
}

#hero p {
    margin-bottom: 2rem;
    color: var(--secondary-text-color);
}

/* Search */
#search-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#search {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    outline: none;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#search:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Diagonal effect*/
.hero-diagonal {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 0;
}

/* RESULTS PAGE */
#results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

#results-grid section {
    width: 100%;
    height: 100%;

}

#results-grid img {
    width: 200px;
    height: 200px;
}

#results-grid button {
    width: 60%;
    height: auto;
    padding: .2rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 10px;
    border: var(--border-highlight);
}

#playlist-flex {
    display: flex;
    flex-direction: column;
}

#playlist-flex .pl-song-card {
    display: grid;
    grid-template-columns: .3fr 1.5fr 1fr .1fr .3fr;
    gap: 1rem;
    margin: .5rem 0 .6rem 3rem;
    border-bottom: var(--border);
}

#playlist-flex .pl-song-card img {
    align-self: center;
    width: 45px;
    height: 45px;
}

#playlist-flex .pl-song-card .remove-button {
    padding: .2rem;
    background-color: var(--background-color);
    border: none;
    color: var(--accent-color);
}
.space-above {
    margin-top: 2rem;
}

/* Animations */
@keyframes bounce {
    
    0%,
    100% {
        transform: scaleY(0.3);
    }

    50% {
        transform: scaleY(1);
    }
}
/* --- Small screen / mobile responsiveness --- */
@media (max-width: 600px) {

    body {
        max-width: 100%;
        padding: 0 1rem;
    }

    header {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0.5rem;
    }

    nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    #search-form {
        width: 100%;
        padding: 0 1rem;
    }

    #search {
        max-width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }

    #playlist-flex .pl-song-card {
        grid-template-columns: 1fr 2fr 1fr .1fr;
        margin: 0.5rem 0 0.5rem 0;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    #playlist-flex .pl-song-card img {
        width: 40px;
        height: 40px;
    }

    #playlist-flex .pl-song-card .remove-button {
        padding: 0.15rem;
        font-size: 0.9rem;
    }

    #results-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    #results-grid img {
        width: 100%;
        height: auto;
    }

    #results-grid button {
        width: 80%;
        font-size: 0.9rem;
        padding: 0.3rem;
    }
}