
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }



  html{
    font-size: 62.5%;
  }


  body {
    background-image: url('cloude.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    background-repeat: no-repeat;
    /* overflow: hidden; */
    min-height: 100vh;
    display: flex;
    flex-direction: column; 
    align-items: center;
  }

  #form{
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  position: absolute;
  top: 0;
  }
  #search-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 150, 255, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }

  /* ☁️ Hover effect */
  #search-btn:hover {
    background: linear-gradient(135deg, #89f7fe, #66a6ff);
    box-shadow: 0 6px 18px rgba(0, 150, 255, 0.5);
    transform: translateY(-2px);
  }

  /* 🌙 Active click feedback */
  #search-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 150, 255, 0.3);
  }

  /* 📱 Responsive button */
  @media (max-width: 480px) {
    #search-btn {
      padding: 10px 22px;
      font-size: 1rem;
    }
  }

  .container {
    margin-top: 20px;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    height: 200px;
    max-width: 400px;
    text-align: center;

  }

  #city-name{
    text-align: start;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 4rem;
  }
  #time-country{
    text-align: start;
    font-size: 1.9rem;
  }
  #temperature{
    text-align: start;
    font-size: 4rem;
  }
  #description{
    margin-top: 20px;
    font-size: 3rem;
  }
  #weather-icon{
    margin-top: 10px;
  }
  .container h1 {
    margin-bottom: 20px;
    color: #333;
  }


  .search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
  }

  .search-box input {
    flex: 1;
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
  }

  .search-box {
    position: relative;
    width: 300px; /* adjust width */
    margin: 20px auto;
  }

  #city-input {
    width: 100%;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 8px;
    border: 2px solid #ccc;
    outline: none;
  }

  #suggestions {
    position: absolute;
    top: 42px; /* input ke neeche */
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 10;
  }

  #suggestions li {
    padding: 8px 12px;
    cursor: pointer;
  }

  #suggestions li:hover,
  #suggestions li.active {
    background: #4facfe;
    color: white;
  }


  .search-box button {
    padding: 10px 20px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
  }

  .search-box button:hover {
    background-color: #357ABD;
  }


  .weather-box {
    margin-top: 15px;
  }
  .card{
  margin-top: 220px;
  height: 200px;
  }

  .weather-box  {
    background: rgba(255, 255, 255, 0.15); 
    border-radius: 20px;
    padding: 25px 30px;
    /* max-width: 350px; */
    margin: 20px auto 0;
    text-align: center;
    width: 40vw;
    /* height: 300px; */
    color: #fff;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .weather-box img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
  }

  .weather-box h2 {
    margin-bottom: 10px;
    color: #444;
  }

  .weather-box p {
    font-size: 18px;
    color: #555;
  }
  body.dark-mode .weather-box {
    background: rgba(255, 255, 255, 0.1);  
    color: #f2f2f2;                       
    backdrop-filter: blur(12px);           
  }
  body.dark-mode .weather-box h2,
  body.dark-mode .weather-box p {
    color: #f1f1f1;
  }

  .error {
    color: red;
    margin-top: 10px;
    font-size: 14px;
  }


  .hidden {
    display: none;
  }



  @media (max-width: 768px) {
    .search-box {
      flex-direction: column;
    }

    .search-box input,
    .search-box button {
      width: 100%;
    }

    .search-box button {
      margin-top: 10px;
    }

    .container {
      padding: 20px;
    position: relative;
    top: 50px;
    }
    .card{
      margin-top: 400px;
      
    }
  .weather-box{
    width: 200px;
  }
    .weather-box img {
      width: 60px;
      height: 60px;
    }

    .weather-box p {
      font-size: 16px;
    }


  }

  @media (max-width: 480px) {
    .container h1 {
      font-size: 24px;
    }

    .search-box input {
      font-size: 14px;
      padding: 8px 12px;
    }

    .search-box button {
      padding: 8px 12px;
      font-size: 14px;
    }

    .weather-box h2 {
      font-size: 20px;
    }

    .weather-box p {
      font-size: 14px;
    }
  }

  @media (max-width: 768px) {
    #city-name {
      font-size: 3rem;
      text-align: center; 
    }

    #time-country {
      font-size: 1.5rem;
      text-align: center;
    }
  }


  @media (max-width: 480px) {
    #city-name {
      font-size: 2rem;
      text-align: center;
    }

    #time-country {
      font-size: 1.2rem;
      text-align: center;
    }

  }

  @media (max-width: 480px) {
    #temperature {
      font-size: 2.2rem;
      text-align: center;
    }

    #description {
      font-size: 1.3rem;
      text-align: center;
    }

    #weather-icon {
      width: 70px;
      height: 70px;
    }
  }











      #themeToggle {
        display: none;
      }

      /* Content container */
  

      label.toggle-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background-color: var(--btn-bg-light);
        color: white;
        padding:10px  30px;
        border-radius: 25px;
        font-weight: bold;
        font-size: 2rem;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        user-select: none;
        transition: background-color 0.3s, color 0.3s;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
      }


      label.toggle-btn .icon {
        font-size: 1.2rem;
      }

      /* Search input container */
      .search-container {
        position: relative;
        margin-top: 2rem;
      }
    

      #themeToggle:checked ~ .content input {
        background-color: var(--input-bg-dark);
        color: var(--text-dark);
      }

      #themeToggle:checked ~ .content .icon {
        color: var(--cloud-color-dark);
      }

      #themeToggle:checked ~ label.toggle-btn {
        background-color: var(--btn-bg-dark);
        color: white;
      }

      #themeToggle:checked ~ label.toggle-btn .icon {
        content: "☀️";
      }

      /* Actually toggle icon change */
      #themeToggle:not(:checked) ~ label.toggle-btn .sun {
        display: none;
      }

      #themeToggle:checked ~ label.toggle-btn .moon {
        display: none;
      }

      /* Show/hide icons */
      label.toggle-btn .moon {
        display: inline-block;
      }

      label.toggle-btn .sun {
        display: none;
      }

      #themeToggle:checked ~ label.toggle-btn .moon {
        display: none;
      }

      #themeToggle:checked ~ label.toggle-btn .sun {
        display: inline-block;
      }

      #themeToggle:checked ~ body::before {
        background-color: var(--bg-dark);
      }
