@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    outline: none;
    box-sizing: border-box;
    text-decoration: none;
    list-style-type: none;
}

.icon {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    text-shadow: 0 2px 1px #164a68;
}

.icon.filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

:root {
    --main-word-color: #0a0d0e;
    --secondary-text-color: #6e6e6e;
    --main-accent: #E7E8E9;
}
::selection {
    background-color: #c6fbff;
    color: var(--main-word-color);
}
body {
    font-family: "Inter", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3em;
    min-height: 100vh;
    position: relative;
    overflow: auto
}

body::before {
    content: "";
    background-image: url('./assets/images/bg.webp');
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    position: absolute;
}

#menu-toggle {
    display: none;
}

.hamburger-btn {
    position: fixed;
    top: 1em;
    left: 1em;
    width: 32px;
    height: 26px;
    cursor: pointer;
    z-index: 150;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-btn span {
    height: 4px;
    background: #f2f2f290;
    border-radius: 12px;
    transition: all 0.3s;
}

nav {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.171);
    border-right: 1px solid rgba(0, 0, 0, 0.501);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    padding: 80px 20px;
    transition: left 0.35s ease;
    z-index: 100;
    border-radius: 0 25px 25px 0;
}

nav h3 {
    color: var(--main-accent);
    margin-bottom: 1em;
}

.favorite-item {
    padding: 8px 12px;
    margin: 6px 0;
    background: #ffffff93;
    color: var(--main-word-color);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease-out;
}

.favorite-item:hover {
    background: #ffffff55;
}

.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgb(255, 230, 105);
    position: absolute;
    top: 5%;
    right: 5%;
}

.fav-btn span {
    font-size: 2.5em;
}

#menu-toggle:checked~.favorites-container {
    left: 0;
}

#menu-toggle:checked+.hamburger-btn span {
    background: #f2f2f2;
}

#menu-toggle:checked+.hamburger-btn span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

#menu-toggle:checked+.hamburger-btn span:nth-child(2) {
    opacity: 0;
}

#menu-toggle:checked+.hamburger-btn span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

.input-container input {
    backdrop-filter: blur(23px) brightness(0.9) contrast(1.5);
    -webkit-backdrop-filter: blur(23px) brightness(0.9) contrast(1.5);
    background: rgba(242, 239, 232, 0.1);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 4px 4px 20px 0 rgba(120, 53, 15, 0.1),
        inset 0 0 150px rgba(245, 158, 11, 0.05),
        inset 0px 0px 4px 2px rgba(255, 255, 255, 0.15);
    width: 90vw;
    height: 4vh;
    text-align: center;
    font-size: 1.2em;
    color: #f2f2f2;
    font-weight: 500;
    font-family: "Inter", sans-serif;
}

.input-container input::placeholder {
    opacity: 0.9;
    color: var(--main-accent);
}

.input-container input::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(to left top, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 50%);
    z-index: 1;
}

.input-container input::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

main {
    padding: 1em 2.3em;
    backdrop-filter: blur(23px) brightness(0.9) contrast(1.5);
    -webkit-backdrop-filter: blur(23px) brightness(0.9) contrast(1.5);
    background: rgba(242, 239, 232, 0.01);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 4px 4px 20px 0 rgba(120, 53, 15, 0.1),
        inset 0 0 150px rgba(245, 158, 11, 0.05),
        inset 0px 0px 4px 2px rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 70vw;
    height: 450px;
}

.hidden {
    display: none !important;
}

.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInAnim 0.6s ease forwards;
}

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

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(to left top, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 50%);
    z-index: 1;
}

main::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.weather-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5em;
}

.weather-city {
    font-size: 1.6em;
    color: var(--main-word-color);
    font-weight: 500;
    margin-bottom: 0.4em;
}

.weather-temperature {
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
}

.weather-temperature-number {
    font-size: 5em;
    color: var(--main-word-color);
    margin-right: 0.7em;
}

.weather-temperature-degree {
    position: absolute;
    top: 10%;
    left: 80%;
    font-size: 2.6em;
    color: var(--main-word-color);
    opacity: 0.5;
    font-weight: 300;
}

.weather-current {
    text-align: center;
    font-size: 1.2em;
    font-weight: 500;
    color: var(--main-word-color);
}

.hourly-forecast-container {
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: center;
    gap: 1em;
    margin-bottom: 2em;
}

.hourly-forecast {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hourly-forecast-time {
    color: var(--main-accent);
}

.hourly-forecast-temperature {
    color: var(--main-accent);
    opacity: 0.6;
}

.daily-forecast-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 1em;
    gap: 0.4em;
    width: 100%;
    color: var(--main-accent);
    font-size: 1.1em;
}

.daily-forecast {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    align-items: center;
    width: 100%;
}

.daily-forecast-temperature {
    text-align: left;
    width: 1em;
    margin-left: 0.4em;
}


footer {
    color: rgba(14, 13, 15, 0.444);
    position: fixed;
    right: 0;
    bottom: 0;
    margin: 1em;
}

@media screen and (min-width: 650px) {
    main {
        width: 40vw;
        backdrop-filter: blur(12px) saturate(100%);
        -webkit-backdrop-filter: blur(12px) saturate(100%);
        background: rgba(64, 64, 55, 0.058);
    }

    .hourly-forecast-time {
        color: #f2f2f2;
    }

    .hourly-forecast-temperature {
        opacity: 1;
        color: #f2f2f2;
    }

    .daily-forecast {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2.5em;
    }
}