* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
  }
  
  :root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #1a1a2e;
    --light-color: #f7fff7;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  }
  
  body {
    background: linear-gradient(135deg, var(--dark-color), #16213e);
    color: var(--light-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background 1s ease;
  }
  
  body.sunny {
    background: linear-gradient(135deg, #ff9966, #ff5e62);
  }
  
  body.cloudy {
    background: linear-gradient(135deg, #606c88, #3f4c6b);
  }
  
  body.rainy {
    background: linear-gradient(135deg, #4b6cb7, #182848);
  }
  
  body.snowy {
    background: linear-gradient(135deg, #8e9eab, #eef2f3);
    color: #333;
  }
  
  body.night {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  }
  
  .container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .search-box {
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
  }
  
  .search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 20px;
    color: var(--light-color);
    font-size: 16px;
    outline: none;
  }
  
  .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .search-box button {
    background: transparent;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    color: var(--light-color);
    transition: all 0.3s ease;
  }
  
  .search-box button:hover {
    color: var(--primary-color);
  }
  
  .weather-box {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 30px;
  }
  
  @media (min-width: 768px) {
    .weather-box {
      flex-direction: row;
    }
  }
  
  .weather-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .weather-info h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
  }
  
  .weather-info #date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .temp-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
  }
  
  .weather-info h1 {
    font-size: 4rem;
    font-weight: 700;
  }
  
  .weather-icon {
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .weather-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .weather-info #description {
    font-size: 1.2rem;
    text-transform: capitalize;
    margin-bottom: 10px;
  }
  
  .feels-like {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
  }
  
  .details-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .detail-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .detail-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  
  .detail-icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--secondary-color);
  }
  
  .detail-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .detail-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
  }
  
  .detail-value {
    font-size: 1.2rem;
    font-weight: 600;
  }
  
  .forecast-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
  }
  
  .forecast-container h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  
  .forecast-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
  }
  
  .forecast-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
  }
  
  .forecast-card:hover {
    transform: translateY(-5px);
  }
  
  .forecast-day {
    font-size: 1rem;
    font-weight: 600;
  }
  
  .forecast-icon {
    width: 50px;
    height: 50px;
  }
  
  .forecast-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .forecast-temp {
    font-size: 1.2rem;
    font-weight: 700;
  }
  
  .forecast-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    text-transform: capitalize;
  }
  
  .loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .loader.active {
    visibility: visible;
    opacity: 1;
  }
  
  .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  
  .error-container {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .error-container.active {
    transform: translateX(0);
  }
  
  #error-message {
    flex: 1;
  }
  
  #error-close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
  }
  
  @media (max-width: 768px) {
    .weather-box {
      padding: 20px;
    }
  
    .weather-info h1 {
      font-size: 3rem;
    }
  
    .details-container {
      grid-template-columns: 1fr;
    }
  
    .forecast-cards {
      overflow-x: auto;
      grid-template-columns: repeat(5, 150px);
      padding-bottom: 10px;
    }
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .weather-box,
  .forecast-container {
    animation: fadeIn 0.5s ease forwards;
  }
  
  .forecast-card:nth-child(1) {
    animation-delay: 0.1s;
  }
  .forecast-card:nth-child(2) {
    animation-delay: 0.2s;
  }
  .forecast-card:nth-child(3) {
    animation-delay: 0.3s;
  }
  .forecast-card:nth-child(4) {
    animation-delay: 0.4s;
  }
  .forecast-card:nth-child(5) {
    animation-delay: 0.5s;
  }
  