@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Madimi+One&display=swap');



:root {
    --txt-small: 15px;
    --bg-gradient: linear-gradient(to bottom, #8261D4, #B994D6);
    --cards-bg: #a679f35b;
    --input-bg: #a679f374;
    --input-color: #CFCFCF;
    --txt-dim-color: #CFCFCF;
    --heading-font: "Madimi One", sans-serif;
    --normal-font: "Lato",
        sans-serif;
    --card-shadow: 0px 2px 4px 0px #646464;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
    /* flex-direction: row; */
}

body,
html {
    overflow-y: auto;
}

img {
    width: 200px;
    height: 200px;
}

.container {
    position: relative;
    width: 100vw;
    height: fit-content;
    max-width: 100vw;
    min-height: 100vh;
    background-image: url("./images/bg.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--bg-gradient);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-inline: 50px;
    overflow-y: auto;
    /* gap: 10px; */
}

nav.navbar {
    width: 100%;
    height: 5vh;
    min-width: 100%;
    background: none;
    display: flex;
    justify-content: space-between;
    align-items: end;
    overflow: visible;
}

nav a {
    position: relative;
    text-decoration: none;
    color: white;
    font-size: var(--txt-small);
    color: var(--txt-dim-color);
    font-family: var(--normal-font);
    transition: all .2s ease;
    overflow: visible;
}

nav a::before{
    content: '';
    position: absolute;
    /* top: 18px; */
    bottom: -2px;
    left: -5px;
    width: 100%;
    height: 3px;
    background: white;
    z-index: 1000;
    transform-origin: left;
    transform: scaleX(0);
    transition: all .2s cubic-bezier(0.01, -0.02, 1, 0.34);
}
nav a:hover::before{
    transform: scaleX(1.2);
}



nav a:hover {
    color: white;
}

section.main {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 5vh);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

header.app-header {
    width: 100%;
    display: flex;
    height: fit-content;
    min-height: fit-content;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: var(--heading-font);
    font-size: 40px;
    overflow: hidden;
}

header h1 {
    font-size: 33px;
    letter-spacing: 1.4px;
    /* font-weight: 300; */
}

form {
    width: 500px;
    max-width: 100%;
    background: var(--input-bg);
    height: 50px;
    display: flex;
    flex-direction: row;
    box-shadow: var(--card-shadow);
    border-radius: 50px;
    font-family: var(--normal-font);

    /* glass morphism */
    background: var(--cards-bg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

form:focus-within {
    border: 1px solid var(--txt-dim-color);
}

form input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: var(--txt-small);
    font-family: var(--normal-font);
    text-indent: 25px;
}



input::placeholder {
    color: var(--input-color);
}

form button {
    width: fit-content;
    padding-inline: 20px;
    padding-block: 15px;
    border: none;
    outline: none;
    cursor: pointer;
    background: transparent;
    color: var(--txt-dim-color);
    transition: all .14s ease;
}

form button:hover {
    color: white;
}

.weather-card {
    position: relative;
    width: 0px;
    height: fit-content;
    min-height: 250px;
    max-width: 100%;
    background: var(--cards-bg);
    box-shadow: var(--card-shadow);
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    padding-block: 30px;
    padding-inline: 30px;
    gap: 15px;
    transition: all 1.3s ease;
    overflow: hidden;
    opacity: 0;
    animation: zoomCard .4s ease 1 forwards;

    /* glass morphism */
    background: var(--cards-bg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.weather-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cards-bg);
    transition: all 1.4s ease;
}

.weather-card.active::before {
    animation: fade 1.3s ease 1;
    animation-direction: normal;
    animation-fill-mode: forwards;
}

.weather-card .card-rows {
    width: 100%;
    height: fit-content;
    min-height: 40px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    color: var(--txt-dim-color);
    font-style: italic;
    font-family: var(--normal-font);
    font-size: var(--txt-small);
    align-items: center;
    /* gap: 10px; */
}







.weather-card .card-top .temperature-value {
    display: flex;
    font-size: 30px;
    color: white;
    font-family: var(--heading-font);
}

.card-top span sup{
    font-weight: 100;
    font-size: 13px;
    font-family: sans-serif;
}

.weather-card .card-center img {
    width: 100px;
    height: 100px;
}

.weather-images {
    position: relative;
}






.details-card {
    position: relative;
    width: 1100px;
    max-width: 100%;
    height: fit-content;
    min-height: fit-content;
    display: flex;
    flex-direction: row;
    background: var(--cards-bg);
    box-shadow: var(--card-shadow);
    border-radius: 25px;
    animation: slideRight .4s ease 1 forwards .5s;
    transform-origin: left;
    transform: scaleX(0);
    flex-wrap: wrap;

    /* glass morphism */
    background: var(--cards-bg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.details-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -250px;
    width: 250px;
    height: 110%;
    background: linear-gradient(to right, transparent, #ffffff30, transparent);
    transform: skewX(-30deg);
    animation: shine 3s ease infinite 1s;
    animation-direction: normal;
}

.details-card span {
    width: 100%;
    min-width: 150px;
    height: 100px;
    flex: 1;
    display: flex;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: var(--normal-font);
    cursor: pointer;
    /* border-radius: 15px; */
    gap: 5px;
    transition: all .24s ease;
    /* padding-block: 20px; */
    z-index: 1000;
}

.details-card span h2 {
    font-family: var(--heading-font);
    font-weight: 500;
    letter-spacing: 1.5px;
    word-break: break-all;
}

.details-card span p {
    color: var(--txt-dim-color);
}

.details-card span:hover {
    background: #7c52c4;
}








@keyframes fade {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes zoomCard {
    from {
        width: 0px;
        height: 0px;
        opacity: 0;
    }

    to {
        width: 525px;
        height: 240px;
        opacity: 1;
    }
}

@keyframes slideRight {
    from {
        transform: scaleX(0);
        opacity: 0;
    }

    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes shine {
    0% {
        left: -250px;
    }

    40% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}





@media screen and (max-width:500px) {
    *::-webkit-scrollbar{
        display: none;
    }
    .container {
        padding-inline: 10px;
    }
    nav.navbar{
        padding-inline: 10px;
    }
    section.main {
        padding-inline: 5px;
        padding-block: 50px;
        width: 100%;
    }
}