body {
    background: linear-gradient(to bottom right, #01235a, #0020b0, #651ee8);
    font-family: 'Inter', Times, serif;
    font-weight: light;
}

header {
    font-weight: 300;
    color: white;
    font-family: 'Playfair Display', Times, serif;
    padding-left: 40px;
    margin-bottom: 30px;
}

header>h1 {
    font-weight: 300;
    font-size: 48px;
    margin-bottom: 0;
    color: white;
}

main,
footer {
    animation: fadeIn 0.6s ease-out;
    transition: 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

span {
    font-family: 'Inter', Times, serif;
    font-weight: 200;
}

h2 {
    font-family: 'Playfair Display', Times, serif;
    font-weight: lighter;
}

.hero {
    background: linear-gradient(to bottom right, #1441d6, #0020b0, #651ee8);
    padding: 20px 20px 20px 20px;
    margin: auto 40px;
    margin-left: 40px;
    border-radius: 16px;
    height: 460px;
    width: 1110px;
    transition: transform 0.3s ease 0s, box-shadow 0.3s ease 0s;
    cursor: pointer;
}

.hero:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
    transition-delay: 0s !important;
    transition-duration: 0.3s !important;
}

.date-location {
    color: white;
    margin-bottom: 0;
}

.date-location h2 {
    font-family: 'Inter', Times, serif;
    font-weight: 300;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 0;
}

.date-location p {
    font-size: 14px;
    margin-top: 0;
}

.weather-info {
    display: flex;
    justify-content: space-between;
}

.weather-icon {
    width: 140px;
    font-size: 6rem;
}

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

    50% { 
        transform: rotate(180deg); 
    }

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

.loading-spin {
    animation: spin 2s linear infinite;
    opacity: 0.7;
    cursor: wait;
    color: white;
}

.ph-sun {
    color: yellow;
}

.ph-cloud {
    color: lightgray;
}

.ph-cloud-sun {
    color: rgb(214, 211, 127);
}

.ph-snowflake, .ph-waves {
    color: white;
}

.ph-cloud-rain {
    color: rgb(163, 172, 255);
}

.ph-cloud-lightning {
    color: rgb(0, 145, 255);
}

.temperature {
    color: white;
}

.temperature>h2 {
    font-family: 'Inter', Times, serif;
    font-weight: lighter;
    font-size: 70px;
    margin: 0;
}

.celsius {
    font-size: 40px;
}

.additional-metrics {
    text-align: center;
    display: flex;
    gap: 200px;
    margin-top: 60px;
}

.description {
    margin-top: 0;
    color: white;
    font-size: 12px;
}

.metric {
    color: white;
}

.metric-1 {
    display: flex;
    gap: 30px;
}

.metric-1>.ph {
    padding-top: 10px;
    margin-top: 20px;
    height: 40px;
    width: 40px;
    text-align: center;
    font-size: 2rem;
    color: white;
    background-color: rgba(27, 31, 86, 0.378);
    border-radius: 100px;
}

.metric-2>.ph {
    padding-top: 10px;
    margin-top: 20px;
    height: 40px;
    width: 40px;
    text-align: center;
    font-size: 2rem;
    color: white;
    background-color: rgba(27, 31, 86, 0.378);
    border-radius: 100px;
}

.metric-2 {
    display: flex;
    gap: 30px;
}

.metric h3 {
    font-family: 'Inter', Times, serif;
    font-weight: 300;
    margin-bottom: 5px;
}

.today-forecast {
    margin-left: 40px;
    margin-top: 50px;
    color: white;
}

.forecast-cards {
    font-size: 15px;
    display: flex;
    gap: 80px;
    align-self: center;
    width: fit-content;
    margin-top: 30px;
    background-color: rgba(134, 142, 249, 0.378);
    padding-right: 50px;
    padding-left: 50px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease 0s;
    cursor: pointer;
}

.forecast-cards:hover {
    background-color: rgba(134, 142, 249, 0.66);
    transition-delay: 0s !important;
    transition-duration: 0.3s !important;
}

.forecast-cards i {
    font-size: 2rem;
}

.seven-day-forecast {
    color: white;
    margin-left: 40px;
    margin-top: 50px;
}

.forecast-card {
    text-align: center;
    background-color: rgba(134, 142, 249, 0.378);
    border-radius: 12px;
    padding: 10px 10px;
    width: 100px;
    transition: transform 0.3s ease 0s;
    cursor: pointer;
}

.forecast-card>i {
    font-size: 2rem;
}

.forecast-card>ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.forecast-cards h3 {
    font-family: 'Inter', Times, serif;
    font-weight: 300;
    color: white;
}

.forecast-card h3 {
    font-family: 'Inter', Times, serif;
    font-weight: 300;
    color: white;
}

.forecast-days {
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

.forecast-card:hover {
    background-color: rgba(134, 142, 249, 0.66);
    transition-delay: 0s !important;
    transition-duration: 0.3s !important;
}

footer {
    margin-top: auto;
    text-align: center;
    padding: 30px 0;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.6);
    box-shadow: black;
    font-size: 0.9rem;
}

#backToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(116, 123, 224, 0.66);
    color: white;
    backdrop-filter: blur(5px);
    border: 0.5px solid white;
    border-radius: 30%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

#backToTopBtn.show {
    opacity: 1;
    bottom: 30px;
}

#backToTopBtn:hover {
    background: rgba(134, 142, 249, 0.66);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 1200px) {
    body {
        min-height: 100vh;
        margin-right: 5;
    }

    header {
        padding-left: 0;
        margin-left: 0;
        text-align: center;
    }

    .hero {
        width: 90%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 40px;
        text-align: left;
        margin-left: 1;
        margin-right: auto;
    }

    .hero-divider {
        display: flex;
        flex-direction: column;
        gap: 20px;
        flex: 1;
    }

    .weather-info {
        display: flex;
        gap: 70px;
        justify-content: space-between
    }

    .weather-icon {
        width: 100px;
        padding-right: 0;
    }

    hr {
        display: none;
    }

    .additional-metrics {
        flex-direction: column;
        flex: 1;
        gap: 20px;
        margin-top: 0;
    }

    .today-forecast {
        margin-left: 5em;
    }

    .today-forecast>h2 {
        text-align: center;
    }

    .seven-day-forecast {
        text-align: center;
        margin-left: 0;
    }

    .forecast-cards {
        gap: 48px;
        justify-content: flex-start;
        margin: auto;
        margin-left: 0;
    }

    .forecast-days {
        display: flex;
        flex-direction: column;
        gap: 20px;
        justify-content: center;
    }

    .forecast-card {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        width: 100%;
        align-items: center;
        padding: 15px 20px;
        box-sizing: border-box;
        justify-content: unset;
        text-align: unset;
        margin-bottom: 10px;
        margin-left: 0;
    }

    .forecast-card p {
        text-align: left;
    }

    .forecast-card i {
        justify-self: center;
    }

    .forecast-card ul {
        text-align: right;
        display: block;
    }
}

@media screen and (max-width: 480px) {
    body {
        height: auto;
        width: auto;
        margin-right: 0;
    }

    header {
        text-align: center;
        padding-left: 0;
        margin-left: 0;
    }

    .hero {
        justify-content: center;
        margin-left: 0;
        margin-right: auto;
        width: 90%;
        display: block;
        padding: 15px 15px 2px 10px;
    }

    .weather-info {
        justify-content: space-between;
        gap: 85px;
    }

    .weather-icon {
        width: 100px;
        padding-right: 0;
    }

    .metric-1,
    .metric-2 {
        padding-left: 0;
    }

    .today-forecast {
        text-align: center;
        margin-left: 0;
    }

    .seven-day-forecast {
        text-align: center;
        margin-left: 1;
    }

    .forecast-cards {
        margin-left: 1;
        margin-right: 1;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 20px;
        -webkit-overflow-scrolling: touch;
    }

    .forecast-cards>div {
        min-width: 70px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .forecast-cards::-webkit-scrollbar {
        display: none;
    }

    .forecast-cards {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}