@import url("https://fonts.googleapis.com/css2?family=Righteous&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Kalam&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", Arial, sans-serif;
    background-color: #f5f5f5;
    background-image: url(https://wallpapers.com/images/hd/weather-scenarios-collage-dbk9c5n23l7e5fgb.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
}

/* Style the header */
header {
    background-color: rgb(20 24 75 / 60%);;
    color: rgb(0, 229, 255);
    text-align: center;
    padding: 30px 0;
}

/* Style the container */
.container {
    width: 600px;
    border-style: solid;
    border-color: black;
    margin: 0 auto;
    margin-bottom: 2rem;
    padding: 30px;
    background-color: #ffffffdf;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-top: 10px;
}

@media (max-width: 1000px) {
    .container {
        width: 100%;
    }

    .navbar {
        width: 100%;
        
    }
}

.loc-details {
    margin-bottom: 30px;
}

.form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* Style the input field */
#input {
    padding: 10px;
    border: 1px solid #23777f;
    border-radius: 25px;
    font-size: 16px;
    width: 70%;
    margin-right: 10px;
}

/* Style the button */
#button {
    padding: 15px 20px;
    background-color: #28a745;
    /* Updated background color */
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    /* Smooth background and shadow transitions */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Add shadow for depth */
}

#currloc_button {
    padding: 5px 10px;
    background-color: #28a745;
    /* Updated background color */
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    /* Smooth background and shadow transitions */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Add shadow for depth */
}

#currloc_button:hover {
    background-color: rgb(0, 99, 0);
}

.button-text {
    transition: opacity 0.4s ease, transform 0.4s ease;
    /* Smooth text transitions */
}

.arrow {
    margin-left: 10px;
    opacity: 0;
    /* Hide the arrow initially */
    transform: translateX(-10px);
    /* Position arrow to the left */
    transition: transform 0.4s ease, opacity 0.4s ease;
    /* Add transition for smooth effect */
}

#button:hover {
    background-color: #218838;
    /* Darken background on hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    /* Enhance shadow on hover */
}

#button:hover .button-text {
    opacity: 0;
    /* Hide the text on hover */
    transform: translateX(-10px);
    /* Slightly move text to the left */
}

#button:hover .arrow {
    opacity: 1;
    /* Show the arrow on hover */
    transform: translateX(0);
    /* Move the arrow into position */
}


/* #result {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #cccccc;
} */

.result-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
    border: 5px solid black;
    border-radius: 17px;
    background-color: #0099ff;
}

#result {
    margin: 10px 10px 10px 10px;
    padding: 10px;
    border: 1px solid #cccccc;
    align-self: center;
}

#result .temp {
    color: #ecf0f1;
    font-size: 2.5em;
}

#result .description {
    font-size: 1.5em;
}

.result-box {
    font-size: 1em;
    text-align: center;
    color: #ecf0f1;
    padding: 20px;
    background-color: #8db6e6;
    border: 1px solid #ccc;
    border-radius: 15px;
}

/* Style the navbar */
/* Style the navbar */
.navbar {
    background: linear-gradient(135deg, #3498db, #2980b9);
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 0;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Style the navigation list */
.nav-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

/* Style the list items */
.nav-item {
    margin: 0 20px;
}

/* Style the links */
.nav-item a {
    display: block;
    color: #fff;
    font-weight: bold;
    text-align: center;
    padding: 12px 18px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Change the link color on hover */
.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #f1f1f1;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        width: 90%;
        padding: 8px 0;
    }

    .nav-item {
        margin: 0 12px;
    }
}

.landing-text {
    font-size: 12rem;
    text-align: center;
    margin-top: 100px;
    font-family: 'Righteous', cursive;
}

@media (max-width: 1450px) {
    .landing-text {
        font-size: 10em;
    }
}

.landing-text-2 {
    font-family: 'Kalam', cursive;
}

/* Style the temperature icon with color */
.fa-thermometer-half.fa-lg {
    color: #ff5733;
}

/* Style the humidity icon with color */
.fa-tint.fa-lg {
    color: #3498db;
}

/* Style the wind icon with color */
.fa-wind.fa-lg {
    color: #f39c12;
}

/* Style the sun icon with color */
.fa-sun {
    color: #ffd700;
}

/* Style the cloud icons with color */
.fa-cloud {
    color: #ecf0f1;
}

/* Style the fog icon with color */
.fa-smog {
    color: #7f8c8d;
}

/* Style the rainfall icon with color */
.fa-cloud-showers-heavy {
    color: #3498db;
}

/* Style the light rain icon with color */
.fa-cloud-rain {
    color: #3498db;
}

/* footer */
footer {
    background-color: rgb(0, 0, 0);
    color: rgb(185, 182, 182);
    text-align: center;
    padding: 5px;
    margin-top: 2px;
    position: fixed;
    left: 0;
    bottom: 0;
    position: sticky;
}

.light-text {
    color: #a5a5a5;
}

.loader {
    width: 175px;
    height: 80px;
    display: block;
    margin: auto;
    background-image: radial-gradient(circle 25px at 25px 25px, #FFF 100%, transparent 0), radial-gradient(circle 50px at 50px 50px, #FFF 100%, transparent 0), radial-gradient(circle 25px at 25px 25px, #FFF 100%, transparent 0), linear-gradient(#FFF 50px, transparent 0);
    background-size: 50px 50px, 100px 76px, 50px 50px, 120px 40px;
    background-position: 0px 30px, 37px 0px, 122px 30px, 25px 40px;
    background-repeat: no-repeat;
    position: relative;
    box-sizing: border-box;
}

.loader::after {
    content: '';
    left: 0;
    right: 0;
    margin: auto;
    bottom: 20px;
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-color: #00c3ff transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

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

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

/* Styles for the preloader */
.preloader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

dotlottie-player {
    width: 100%;
    height: 100%;
}

/* Styles for the spinner (adjust as needed) */
.spinner {
    border: 4px solid #3498db;
    /* Color of the spinner */
    border-top: 4px solid transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    /* Rotation animation */
}

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

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


/*Card CSS*/
/* Styles for the card */
.card {
    /* width: 300px; */
    margin: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.1);
}

.card-header img {
    width: 100%;
    height: auto;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.card-body {
    padding: 20px;
    background-color: #f8f8f8;
}

.card-body h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.card-body p {
    margin-top: 10px;
    font-size: 1rem;
    color: #555;
}

.card-footer {
    padding: 10px 20px;
    text-align: center;
    background-color: #3498db;
}

.card-footer a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #2980b9;
}

.card-footer a:hover {
    background-color: #1f639e;
}


.card-content {
    display: flex;
    justify-content: space-between;

}

.left-side,
.right-side {
    flex: 1;
    padding: 10px;
    align-self: center;
}

.separator {
    width: 1px;
    background-color: #cccccc;
    margin: 0 10px;
}

.result-box {
    font-size: 1em;
    text-align: left;
    color: #ecf0f1;
    padding: 20px;
    background-color: #8db6e6;
    border: 1px solid #ccc;
    border-radius: 15px;
}

.result-box p {
    margin: 5px 0;
}

.value {
    font-weight: bold;
}

.city {
    font-size: 1.2em;
}

.temp {
    font-size: 2em;
}

.description {
    font-size: 1.1em;
}

/* Mobile-First Responsive Design */
/* Smaller screens, like smartphones */
@media (max-width: 768px) {

    /* Adjust the header and landing text */
    header {
        font-size: 20px;
        margin-top: 25px;
    }

    .landing-text {
        font-size: 3.5rem;
        /* Adjust to your preference */
    }

    .landing-text-2 {
        font-size: 0.9rem;
        /* Adjust to your preference */
    }

    /* Modify the container width and padding */
    .container {
        margin-top: 4rem;
        max-width: 85%;
        padding: 10px;
    }

    /* Adjust the input and button sizes */
    #input {
        width: 60%;
        font-size: 12px;
    }

    #button {
        padding: 8px 16px;
    }

    /* Make the navbar full width and smaller text */
    .navbar {
        width: 90%;
        font-size: 14px;
        margin-top: 15px;
    }

    /* Modify the footer text size and padding */
    footer {
        position: relative;
        margin-top: 26vh;
        font-size: 12px;
        padding: 2px;
    }
}

.content {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-x: hidden;
}

/* DROPDOWN MENU */
.dropbtn {
    background-color: rgb(0, 81, 255);
    border-radius: 5px;
    color: white;
    padding: 10px;
    margin-right: 5px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #110505;
    min-width: 100px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: rgb(246, 231, 231);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    background-color: #0051ff
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {
    background-color: gray;
}

/* DROPDOWN ENDS */

/* Media query for screens between 768px and 1000px width */
@media (max-width: 1000px) and (min-width: 768px) {
    .container {
        width: 90%;
    }

    .navbar {
        width: 70%;
        font-size: 1.6rem;
    }

    .landing-text {
        font-size: 6rem;
    }
}

/* Voice search button styles */
#voice-search-btn {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 10px 15px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#voice-search-btn:hover {
  background-color: #45a049;
}

#voice-search-btn.listening {
  background-color: #f44336;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Adjust the layout to accommodate the voice search button */
.form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Make sure the input field doesn't stretch too wide */
#input {
  flex-grow: 1;
  max-width: 300px;
}
/* Navbar styling */
.navbar {
    display: flex; 
    justify-content: center; /* Centers the nav items horizontally */
    background-color: #fff; /* Change this to any background color you like */
    padding: 10px 0; /* Adjusts spacing around the navbar */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow for depth */
}

.navbar ul {
    display: flex;
    list-style-type: none; /* Removes bullet points */
    padding: 0;
    margin: 0;
}

.navbar ul li {
    margin: 0 15px; /* Adds spacing between links */
}

.navbar ul li a {
    text-decoration: none; /* Removes underline */
    color: #333; /* Adjust link color */
    font-weight: bold; /* Makes text bold */
    font-size: 16px; /* Increases font size */
    padding: 8px 15px; /* Adds padding to links */
    border-radius: 25px; /* Rounded edges */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

.navbar ul li a:hover {
    background-color: #f0f0f0; /* Changes background on hover */
    color: #000; /* Darker text on hover */
}
/* Add transition to input field */
#input {
    padding: 10px;
    border: 1px solid #23777f;
    border-radius: 25px;
    font-size: 16px;
    width: 70%;
    margin-right: 10px;
    transition: border-color 0.4s ease, box-shadow 0.4s ease; /* Add transition */
}

#input:focus {
    border-color: #28a745; /* Change border color on focus */
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.5); /* Add a shadow effect */
}
.navbar ul li a {
    text-decoration: none; /* Removes underline */
    color: #333; /* Adjust link color */
    font-weight: bold; /* Makes text bold */
    font-size: 16px; /* Increases font size */
    padding: 8px 15px; /* Adds padding to links */
    border-radius: 25px; /* Rounded edges */
    transition: background-color 0.3s ease, color 0.3s ease; /* Add color transition */
}

.navbar ul li a:hover {
    background-color: #f0f0f0; /* Changes background on hover */
    color: #000; /* Darker text on hover */
    transform: scale(1.05); /* Slight scale effect on hover */
}
.card {
    margin: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Add transition */
}

.card:hover {
    transform: translateY(-5px); /* Move card up slightly on hover */
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.2); /* Enhance shadow */
}
