@media only screen and (min-width: 1025px) and (orientation: landscape) {
    body::before {
        content: "";
        display: block;
        position: fixed;
        top: 3vh;
        left: 20vw;
        width: 724px;
        height: 278px;
        background-image: url("https://weather4u.cc/image/logo_W4U.svg");
        background-size: 17.1vw 6.65vw;
        background-repeat: no-repeat;
        z-index: 90;
        pointer-events: none;
    }

    body,
    * {
        margin: 0;
        padding: 0;
    }

    * {
        box-sizing: border-box;
    }

    body {
        min-height: 100vh;
        overflow: hidden;
        background: linear-gradient(
            to bottom,
            #6992b8 0%,
            #dceffa 50%,
            #5b82a0 100%
        );
        animation: gradientAnimation 30s ease-in-out infinite;
        background-size: 100% 200%;
    }

    @keyframes gradientAnimation {
        0%,
        100% {
            background-position: 0% 33%;
        }
        50% {
            background-position: 0% 66%;
        }
    }

    nav {
        padding: 1.8vw;
    }

    nav ul {
        float: right;
        margin-top: 0.6vh;
        margin-right: 20vw;
    }

    nav li {
        display: inline-block;
        float: left;
    }

    nav li:not(:first-child) {
        margin-left: 2vw;
    }

    nav a {
        font-size: 1.8vh;
        font-family: "Barlow Condensed", sans-serif;
        font-weight: 600;
        color: #48637b;
        text-decoration: none;
        letter-spacing: 0.005vh;
        display: inline-block;
        outline: none;
        background-color: rgba(255, 255, 255, 0.65);
        box-shadow: 0vw 0.3vh 0.6vh rgba(0, 0, 0, 0.2);
        border-radius: 0.15vw;
        padding: 0.1vw 0.2vw;
        position: relative;
        border-radius: 25px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        text-transform: uppercase;
        height: 30px;
        width: 90px;
        opacity: 1;
        border: 0.5px solid rgba(22, 76, 167, 0.6);
    }

    nav a span {
        color: rgba(22, 76, 167, 1);
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.35px;
    }

    nav a:hover {
        color: #5e81a2;
        text-decoration: none;
        animation: rotate 0.7s ease-in-out both;
    }

    nav a:hover span {
        animation: storm 0.7s ease-in-out both;
        animation-delay: 0.06s;
    }

    @keyframes rotate {
        0% {
            transform: rotate(0deg) translate3d(0, 0, 0);
        }
        25% {
            transform: rotate(3deg) translate3d(0, 0, 0);
        }
        50% {
            transform: rotate(-3deg) translate3d(0, 0, 0);
        }
        75% {
            transform: rotate(1deg) translate3d(0, 0, 0);
        }
        100% {
            transform: rotate(0deg) translate3d(0, 0, 0);
        }
    }

    @keyframes storm {
        0% {
            transform: translate3d(0, 0, 0) translateZ(0);
        }
        25% {
            transform: translate3d(4px, 0, 0) translateZ(0);
        }
        50% {
            transform: translate3d(-3px, 0, 0) translateZ(0);
        }
        75% {
            transform: translate3d(2px, 0, 0) translateZ(0);
        }
        100% {
            transform: translate3d(0, 0, 0) translateZ(0);
        }
    }

    #clouds {
        position: fixed;
        z-index: -1;
        width: 100%;
        height: 100vh;
    }

    .cloud {
        width: 200px;
        height: 60px;
        background: #fff;
        border-radius: 200px;
        position: relative;
    }

    .cloud:before,
    .cloud:after {
        content: "";
        position: absolute;
        background: #fff;
        width: 100px;
        height: 80px;
        top: -15px;
        left: 10px;
        border-radius: 100px;
        transform: rotate(30deg);
    }

    .cloud:after {
        width: 120px;
        height: 120px;
        top: -55px;
        left: auto;
        right: 15px;
    }

    .x1 {
        left: 525px;
        top: 15%;
        transform: scale(0.75);
        opacity: 0.01;
        animation: moveclouds 28s linear infinite;
    }

    .x2 {
        left: 200px;
        transform: scale(0.6);
        opacity: 0.01;
        animation: moveclouds 50s linear infinite;
        top: 25%;
    }

    .x3 {
        left: -250px;
        top: 35%;
        transform: scale(0.8);
        opacity: 0.01;
        animation: moveclouds 40s linear infinite;
    }

    .x4 {
        left: 470px;
        top: 45%;
        transform: scale(0.75);
        opacity: 0.01;
        animation: moveclouds 36s linear infinite;
    }

    .x5 {
        left: -150px;
        top: 48%;
        transform: scale(0.8);
        opacity: 0.01;
        animation: moveclouds 45s linear infinite;
    }

    .x6 {
        left: 320px;
        top: 51%;
        transform: scale(0.3);
        opacity: 0.01;
        animation: moveclouds 20s linear infinite;
    }

    @keyframes moveclouds {
        0% {
            margin-left: 1200px;
        }
        100% {
            margin-left: -1200px;
        }
    }

    #top-container {
        position: absolute;
        top: 15vh;
        width: 45vw;
        display: flex;
        margin: 0 auto;
        justify-content: center;
        align-items: center;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
    }

    #searchbar-container {
        align-self: center;
        width: 80%;
        z-index: 3;
    }

    #searchform {
        width: 100%;
        display: flex;
    }

    #searchbar {
        font-family: "Lato", sans-serif;
        font-size: 1.5vh;
        font-weight: 600;
        letter-spacing: 0.02em;
        width: 90%;
        padding: 9px;
        border-radius: 6px;
        border: 2px solid #fff;
        background-color: rgba(255, 255, 255, 0.85);
        outline: none;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
        flex-grow: 1;
        margin-right: 1em;
    }

    #searchbtn {
        font-family: "Lato", sans-serif;
        font-size: 1.6vh;
        font-weight: 600;
        padding: 10px 20px;
        border: none;
        border-radius: 6px;
        background-color: #006699;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    #searchbtn:hover {
        background-color: #004466;
    }

    #place-container {
        position: absolute;
        top: 23.25vh;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        display: flex;
        justify-content: center;
        margin: 0 auto;
        text-align: center;
    }

    .place {
        font-family: "Lato", serif;
        font-weight: 400;
        font-size: 1.7vh;
        line-height: 1.45;
        color: rgb(64, 64, 64);
        letter-spacing: 0.01em;
    }

    #radio-container {
        font-family: "Lato", serif;
        font-weight: 400;
        font-size: 1.7vh;
        color: rgb(64, 64, 64);
        letter-spacing: 0.01em;
        position: absolute;
        top: 28.5vh;
        width: 58vw;
        display: flex;
        justify-content: flex-end;
        text-decoration: none;
        left: 50%;
        transform: translateX(-50%);
        gap: 1vw;
    }

    #radio-container input[type="radio"] {
        display: none;
    }

    #radio-container label {
        position: relative;
        padding-left: 1vw;
        cursor: pointer;
    }

    #radio-container label:before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1.6vh;
        height: 1.6vh;
        border: 0px solid #999;
        border-radius: 50%;
        background-color: #999;
    }

    #radio-container label:hover:before {
        border: none;
        background-color: #666;
    }

    #radio-container input[type="radio"]:checked + label:before {
        border: none;
        background-color: #006699;
        content: "\2713";
        text-align: center;
        font-size: 1.3vh;
        color: white;
        text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    }

    #longterm-box {
        width: initial;
        height: initial;
    }

    #grafiek-container {
        position: absolute;
        top: 30vh;
        width: 60vw;
        height: 40vh;
        z-index: 99;
        left: 20vw;
    }

    #output-container {
        position: absolute;
        top: 73vh;
        left: 50%;
        transform: translateX(-50%);
        width: 60vw;
        /* display: flex; */
        justify-content: center;
        /* margin: 0 auto; */
        text-align: center;
    }

    .output {
        font-family: "Lato", serif;
        font-weight: 400;
        font-size: 1.4vh;
        line-height: 1.5;
        color: #404040;
        letter-spacing: 0.01em;
    }
}

@media only screen and (max-width: 1024px) and (orientation: landscape) {
    body::before {
        content: "";
        display: block;
        position: fixed;
        top: 3vh;
        left: 10vw;
        width: 724px;
        height: 278px;
        background-image: url("https://weather4u.cc/image/logo_W4U.svg");
        background-size: 30.8vh 12vh;
        background-repeat: no-repeat;
        z-index: 90;
        pointer-events: none;
    }

    body,
    * {
        margin: 0;
        padding: 0;
        font-family: "Barlow Condensed", sans-serif;
    }

    body {
        min-height: 100vh;
        background: linear-gradient(
            to bottom,
            #b2c8da 0%,
            #dfe6f0 50%,
            #8dacc6 100%
        );
    }

    #clouds {
        display: none;
    }

    .cloud {
        display: none;
    }

    #top-container {
        position: absolute;
        top: 15vh;
        width: 45vw;
        display: flex;
        margin: 0 auto;
        justify-content: center;
        align-items: center;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
    }

    #searchbar-container {
        align-self: center;
        width: 45vw;
        z-index: 3;
    }

    #searchform {
        width: 100%;
        display: flex;
    }

    #searchbar {
        font-family: "Lato", sans-serif;
        font-size: 1.7vh;
        font-weight: 700;
        letter-spacing: 0.01em;
        width: 80%;
        padding: 5px;
        border-radius: 6px;
        border: 2px solid #fff;
        background-color: rgba(255, 255, 255, 0.85);
        outline: none;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
        flex-grow: 1;
        margin-right: 1em;
    }

    #searchbtn {
        font-size: 2.4vh;
        padding: 10px 20px;
        border: none;
        border-radius: 6px;
        background-color: #006699;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    #searchbtn:hover {
        background-color: #004466;
    }

    #place-container {
        position: absolute;
        top: 27.5vh;
        left: 50%;
        transform: translateX(-50%);
        width: 80vw;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 1vh 0;
    }

    .place {
        font-family: "Lato", serif;
        font-weight: 400;
        font-size: 2vh;
        color: rgb(64, 64, 64);
        letter-spacing: 0.01em;
    }

    #radio-container {
        display: none;
    }

    #longterm-box {
        width: initial;
        height: initial;
    }

    #grafiek-container {
        position: absolute;
        top: 32vh;
        width: 80vw;
        height: 40vh;
        z-index: 99;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(255, 255, 255, 0.1);
    }

    #output-container {
        position: absolute;
        top: 73vh;
        left: 50%;
        transform: translateX(-50%);
        width: 80vw;
        justify-content: center;
        text-align: center;
    }

    .output {
        font-family: "Lato", serif;
        font-weight: 400;
        font-size: 1.4vh;
        line-height: 1.5;
        color: #404040;
        letter-spacing: 0.01em;
    }

    .nav-container {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: -1;
        background: rgba(31, 34, 39, 0.7);
        opacity: 0;
        transition: all 0.2s ease;
    }

    .nav-container ul {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 100%;
    }

    .nav-container li {
        display: block;
        float: none;
        width: 100%;
        text-align: right;
        margin-bottom: 10px;
    }

    .nav-container li:not(:first-child) {
        margin-left: 0;
    }

    .nav-container a {
        padding: 10px 25px;
        opacity: 0;
        color: white;
        font-family: "Barlow", sans-serif;
        font-size: 2.1vh;
        line-height: 1.8;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 0.02vh;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav-container li:nth-child(1) a {
        transition-delay: 0.2s;
    }

    .nav-container li:nth-child(2) a {
        transition-delay: 0.3s;
    }

    .nav-container li:nth-child(3) a {
        transition-delay: 0.4s;
    }

    .nav-container li:nth-child(4) a {
        transition-delay: 0.5s;
    }

    .nav-open {
        position: fixed;
        right: 10vw;
        top: 10px;
        display: block;
        width: 48px;
        height: 48px;
        cursor: pointer;
        z-index: 9999;
        border-radius: 50%;
    }

    .nav-open i {
        display: block;
        width: 20px;
        height: 2px;
        background: #1f2227;
        border-radius: 2px;
        margin-left: 14px;
    }

    .nav-open i:nth-child(1) {
        margin-top: 16px;
    }

    .nav-open i:nth-child(2) {
        margin-top: 4px;
        opacity: 1;
    }

    .nav-open i:nth-child(3) {
        margin-top: 4px;
    }

    #nav:checked + .nav-open {
        transform: rotate(45deg);
    }

    #nav:checked + .nav-open i {
        background: white;
        transition: transform 0.2s ease;
    }

    #nav:checked + .nav-open i:nth-child(1) {
        transform: translateY(6px) rotate(180deg);
    }

    #nav:checked + .nav-open i:nth-child(2) {
        opacity: 0;
    }

    #nav:checked + .nav-open i:nth-child(3) {
        transform: translateY(-6px) rotate(90deg);
    }

    #nav:checked ~ .nav-container {
        z-index: 9990;
        opacity: 1;
    }

    #nav:checked ~ .nav-container ul li a {
        opacity: 1;
        transform: translateY(0);
    }

    #radio-container {
        display: none;
    }
}

@media only screen and (max-width: 1024px) and (orientation: portrait) {
    body::before {
        background-image: url("https://weather4u.cc/image/logo_W4U.svg");
        background-repeat: no-repeat;
        background-size: 26.1vh 10vh;
        content: "";
        display: block;
        height: 278px;
        left: 3vw;
        pointer-events: none;
        position: fixed;
        top: 2vh;
        width: 724px;
        z-index: 90;
    }

    body,
    * {
        margin: 0;
        padding: 0;
        font-family: "Barlow Condensed", sans-serif;
    }

    body {
        min-height: 100vh;
        background: linear-gradient(
            to bottom,
            #b2c8da 0%,
            #dfe6f0 50%,
            #8dacc6 100%
        );
    }

    #clouds {
        display: none;
    }

    .cloud {
        display: none;
    }

    #top-container {
        position: fixed;
        top: 16vh;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
        display: flex;
        justify-content: flex-start;
        width: 94vw;
    }

    #searchbar-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 94vw;
        z-index: 3;
    }

    #searchform {
        width: 80%;
        display: flex;
    }

    #searchbar {
        font-family: "Lato", sans-serif;
        font-size: 1.35vh;
        font-weight: 700;
        letter-spacing: 0.01em;
        width: 80%;
        padding: 3px;
        border-radius: 5px;
        border: 2px solid #fff;
        background-color: rgba(255, 255, 255, 0.85);
        outline: none;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
        flex-grow: 1;
        margin-right: 10px;
    }

    #searchbtn {
        font-size: 1.4vh;
        padding: 7px 14px;
        border: none;
        border-radius: 5px;
        background-color: #006699;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    }

    #searchbtn:hover {
        background-color: #004466;
    }

    #place-container {
        position: fixed;
        top: 24vh;
        left: 50%;
        transform: translateX(-50%);
        width: 96vw;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .place {
        font-family: "Lato", sans-serif;
        font-size: 1.5vh;
        font-weight: 400;
        letter-spacing: 0.01em;
        color: #000;
        text-align: center;
        width: 94%;
    }

    #longterm-box {
        position: relative;
        top: 34vh;
        width: 210vw;
        height: 70vh;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        touch-action: pan-x;
    }

    #grafiek-container {
        width: 198vw;
        height: 30vh;
        z-index: 3;
        left: 4vw;
    }

    #output-container {
        position: relative;
        top: 0vh;
        width: 210vw;
        z-index: 4;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 1vh 0;
    }

    .output {
        font-family: "Lato", sans-serif;
        font-size: 0.8vh;
        line-height: 1.3vh;
        font-weight: 400;
        letter-spacing: 0.01em;
        color: #404040;
    }

    .nav-container {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: -1;
        background: rgba(31, 34, 39, 0.7);
        opacity: 0;
        transition: all 0.2s ease;
    }

    .nav-container ul {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 100%;
    }

    .nav-container li {
        display: block;
        float: none;
        width: 100%;
        text-align: right;
        margin-bottom: 10px;
    }

    .nav-container li:not(:first-child) {
        margin-left: 0;
    }

    .nav-container a {
        padding: 10px 25px;
        opacity: 0;
        color: white;
        font-family: "Barlow", sans-serif;
        font-size: 2.1vh;
        line-height: 1.8;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 0.02vh;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav-container li:nth-child(1) a {
        transition-delay: 0.2s;
    }

    .nav-container li:nth-child(2) a {
        transition-delay: 0.3s;
    }

    .nav-container li:nth-child(3) a {
        transition-delay: 0.4s;
    }

    .nav-container li:nth-child(4) a {
        transition-delay: 0.5s;
    }

    .nav-open {
        position: fixed;
        right: 10px;
        top: 10px;
        display: block;
        width: 48px;
        height: 48px;
        cursor: pointer;
        z-index: 9999;
        border-radius: 50%;
    }

    .nav-open i {
        display: block;
        width: 20px;
        height: 2px;
        background: #1f2227;
        border-radius: 2px;
        margin-left: 14px;
    }

    .nav-open i:nth-child(1) {
        margin-top: 16px;
    }

    .nav-open i:nth-child(2) {
        margin-top: 4px;
        opacity: 1;
    }

    .nav-open i:nth-child(3) {
        margin-top: 4px;
    }

    #nav:checked + .nav-open {
        transform: rotate(45deg);
    }

    #nav:checked + .nav-open i {
        background: white;
        transition: transform 0.2s ease;
    }

    #nav:checked + .nav-open i:nth-child(1) {
        transform: translateY(6px) rotate(180deg);
    }

    #nav:checked + .nav-open i:nth-child(2) {
        opacity: 0;
    }

    #nav:checked + .nav-open i:nth-child(3) {
        transform: translateY(-6px) rotate(90deg);
    }

    #nav:checked ~ .nav-container {
        z-index: 9990;
        opacity: 1;
    }

    #nav:checked ~ .nav-container ul li a {
        opacity: 1;
        transform: translateY(0);
    }

    #radio-container {
        display: none;
    }
}

.hidden {
    display: none;
}
