/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  background-image: url('../images/Bg.jpg');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  color:azure;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header */
.header {
  color: white;
  padding: 0;
  height:64px;
  display:flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter:blur(12px);
  background-color: rgba(3,24,22,0.2);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Navigation */
.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-list a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-list a:hover {
  color: #4CAF50;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main Content */
.main {
  flex: 1;
  padding: 3rem 0;
}

h1 {
  font-size: 3rem;
  text-align: center;
}

.main .container{
  max-width:800px;
  margin: 0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
}

/*search-container */
.search-container{
  width:100%;
  max-width:600px;
  border-radius: 4px;
  overflow:hidden;
  font-size: 1rem;
 }

.search_box{
  width:100%;
  display:flex;
  justify-content:space-between;

  align-items:center;
  gap:4px;
  font-size: 1rem;
}

#city_input {
  flex:1;
  min-width:0;
 
  font-size: 1rem;
  border:none;
  padding:16px 24px;
  border-radius:12px;

}

#city_input::placeholder{
  color:#9D9D9D;
}

#city_input:focus{
  outline:none;
  border:none;
}

#btn_findweather{
  flex:0 0 auto;
  margin-left:10px;

  padding: 16px 16px;
  font-size: 24px;
  border-radius: 12px;
  border: none;
  color: #fff;
  background-color: #43ACFF;
  white-space: nowrap;
  font-size: 1rem;
}

.location-bar{
  width:100%;
  border:none;
  padding:15px 20px;
  text-align: left;
  display: flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
  color:#333;
  gap:4px;
}

.location-bar:hover{
  background-color:rgba(3,24,22,0.2);
  backdrop-filter:blur(20px);
  border-radius:12px;
  color:#fff;
}

.location-icon{
  width:20px;
  height:20px;
}

.country_div{
  display:flex;
  flex-direction :column;
}

.country{
  font-size :10px;
}

.details-grid{
  display: flex;
  justify-content: center;
  gap:40px;
}

.weather-card {
  width: 100%;
  margin-top: 30px;
  padding: 20px;
  background-color: rgba(3,24,22,0.2);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.hourly-weather-card h3 {
  margin-bottom: 20px;
  font-size: 20px;
  color: #43ACFF;
}

.hourly-items {
  margin-top: 2%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.hourly-item {
  background-color: rgba(67, 172, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(67, 172, 255, 0.3);
  transition: all 0.3s ease;
}

.hourly-item:hover {
  background-color: rgba(67, 172, 255, 0.2);
  transform: translateY(-5px);
  border-color: rgba(67, 172, 255, 0.6);
}

.hourly-time {
  font-weight: bold;
  color: #43ACFF;
  font-size: 16px;
  margin-bottom: 8px;
}

.hourly-temp {
  font-size: 20px;
  margin-bottom: 5px;
}

.hourly-desc {
  font-size: 14px;
  color: #B0E0E6;
  text-transform: capitalize;
}





/* Footer */
.footer {
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* 汉堡菜单 */
  .mobile-toggle {
    display:block;
    position:relative;
    z-index:2000;
    
    cursor:pointer;
    font-size:2rem;
    border-radius:5px;
    padding:5px;
  }
  /* mobile devices side container */
  .nav-list {
    position: fixed;
    top: 64px;
    right: 0;
    height:calc(100vh - 64px);
    width:65%;
    background:linear-gradient(
      135deg,
      rgba(255,255,255,0.35),
      rgba(255,255,255,0.15)
    );
    backdrop-filter: blur(28px);
    border-left:1px solid rgba(255,255,255,0.4);

    display:flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items:center;
    gap:16px;
    padding-top:32px;

    /* hidden right side */
    transform:translateX(100%);
    transition:transform 0.4s cubic-bezier(0.4,0,0.2,1);
    z-index:1900;
  }

   .nav-list.active{
    transform:translateX(0);
  }

  .nav-list li{
    width:80%;
    list-style:none;
  }
  

  /* the link  */
  .nav-list a {
    display:block;
    width:100%;
    padding:12px 32px;

    border-radius:14px;
    color:white;
    text-decoration:none;
    font-size:1.2rem;
    transition: background-color 0.2s;
  }

    .nav-list a:hover,
    .nav-list a:active{
      background-color:rgba(255,255,255,0.2);
    }  
}