:root {
    --dynamic-gradient: linear-gradient(135deg, rgba(66, 3, 169, 0.6), rgba(144, 186, 252, 0.6), rgba(99, 71, 255, 0.6));

    --dynamic-backgroundImg: url('assets/bg.jpg');
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: white;
    font-weight: 600;
}

body {
    background-image: var(--dynamic-backgroundImg);
    width: 100%;
    height: 100dvh;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 100vh;
    padding: 20px;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dynamic-gradient);  /* This is the dynamic gradient for the background */
    background-size: 300% 300%;
    animation: gradientBG 10s ease infinite;
    z-index: -1;
    backdrop-filter: blur(3px);
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* body {
    background-image: url('assets/bg.jpg');
    width : 100%;
    height: 100dvh;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(15px);
    z-index: -1;
} */

/*Utility classes*/
.regular-txt {
    font-weight: 400;
}

.main-container {
    width: 300px;
    height: 496px;;
    background: linear-gradient(to top, rgb(0,0,0,0.15), rgb(255, 255, 255, 0.15));
    border: solid;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(100px);
    padding: 20px;
    transition: transform 0.3s ease;
    z-index: 1;
    
}

.main-container:hover {
    transform: translateY(-5px);
    background: linear-gradient(to left, rgb(0,0,0,0.15), rgb(255, 255, 255, 0.15));
}

.input-container {
    position: relative;
}

.city-input {
    width: 100%;
    padding: 10px 10px;
    border-radius: 12px;
    border: 3px solid transparent;
    background: rgba(0,0,0,0.15);
    font-weight: 500;
    transition: 0.25s border;
    padding-right: 45px;
}

.city-input:hover {
    border: 3px solid #007BFF;
}

.city-input::placeholder {
    color: rgb(255,255,255,0.75);
}

.search-btn {
    background: none;
    position: absolute;
    right : 16px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    cursor: pointer;
    display: flex;
}


button {
    background-color: none;
    color: #0056b3;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

 button:hover {
    background-color: rgb(0, 86, 179,0.3);
    
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

/*section for weather info*/
.weather-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
    border-radius: 12px;
    border-color: aliceblue;
    background: none
} 

.location-date-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

/*Local Time*/
.local-time-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.local-time {
    display: flex;
    align-items: center;
    
}

.local-time-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    margin-top: 4px;
}

.location:hover .local-time-tooltip {
    opacity: 1;
    visibility: visible;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2px 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
}

/*Weather Summary*/
.weather-summary-container {
    display: flex;
    justify-content: space-between;
}

.weather-summary-info {
    text-align: end;
}

.weather-summary-img {
    width: 120px;
    height: 120px;
}

.weather-conditions-container{
    display: flex;
    justify-content: space-between; 

}

.condition-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.condition-item span {
    font-size: 30px;
}

.forecast-items-container {
    display: flex;
    gap: 15px;
    overflow: auto;
    padding-bottom: 12px;
}

.forecast-items-container::-webkit-scrollbar {
    height: 8px;
}

.forecast-items-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 99px;
}

.forecast-items-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 99px;
}



.forecast-item {
    min-width: 70px;
    background: rgba(0,0,0,0.1);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.forecast-item:hover {
    background: rgba(0,0,0,0.15);
}

.forecast-item img{
    width: 35px;
    height: 35px;
}

/*end of Weather Info section*/

/*Section: Message*/

.section-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    margin-top: 25%;
}

.section-message img {
    width: fit-content;
    height: 180px;
}
/*End Section: Message*/

/*Time Box*/
.time-box {
    position: fixed;
    bottom: 60px;
    right: 20px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.time-box:hover {
    transform: translateY(-3px);
    background: linear-gradient(to left, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.25));
    box-shadow: 0 10px 40px rgba(31, 38, 135, 0.3);
}

.time-box .material-symbols-outlined {
    font-size: 1.6rem;
    color: white;
}

#current-time {
    font-weight: 7800;
    color: white;
}

/*CopyRight Footer*/
footer {
    position: fixed;
    bottom: 20px;
    right: 20px;
}


/* Tablet Responsive
@media screen and (max-width: 1300px) {
    .main-container {
        width: 400px;
        height: auto;
        min-height: 496px;
    }

    .weather-conditions-container {
        flex-wrap: wrap;
        gap: 15px;
    }

    .condition-item {
        width: 45%;
    }

    .forecast-items-container {
        padding-bottom: 20px;
    }

    .forecast-item {
        min-width: 85px;
    }
}

/* Mobile Responsive 
@media screen and (max-width: 768px) {
    body {
        padding: 15px;
    }

    .main-container {
        width: 100%;
        max-width: 350px;
        height: auto;
        min-height: 496px;
        padding: 15px;
    }

    .weather-summary-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .weather-summary-info {
        text-align: center;
    }

    .weather-conditions-container {
        flex-direction: column;
        gap: 15px;
    }

    .condition-item {
        width: 100%;
        justify-content: space-between;
    }

    .forecast-items-container {
        gap: 10px;
    }

    .forecast-item {
        min-width: 70px;
        padding: 8px;
    }

    .section-message img {
        height: 150px;
    }

    footer {
        position: relative;
        text-align: center;
        bottom: auto;
        right: auto;
        margin-top: 20px;
    }
} */