:root {
  --bg: #ffffff;
  --fg: #1c1c1c;
  --card-bg: #f1f3f8;
}
[data-theme="dark"] {
  --bg: #121212;
  --fg: #ffffff;
  --card-bg: #1e1e1e;
}
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  padding: 20px;
}
.weather-app {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 500px;
  text-align: center;
}
h1 {
  margin-bottom: 1rem;
  font-size: 2rem;
}
.input-group {
  display: flex;
  margin-bottom: 1rem;
}
input {
  flex: 1;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 8px 0 0 8px;
  border: 2px solid #ccc;
  outline: none;
}
button {
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}
#search-btn {
  background: #007bff;
  color: white;
  border-radius: 0 8px 8px 0;
}
#voice-btn {
  background: #ff4081;
  color: white;
  margin-top: 0.5rem;
  border-radius: 8px;
}
#speak-btn {
  background: #4caf50;
  color: white;
  margin-top: 0.5rem;
  border-radius: 8px;
}
#theme-toggle {
  background: #ff9800;
  color: white;
  margin-top: 0.5rem;
  border-radius: 8px;
}
.weather-result img {
  width: 80px;
}
.temp {
  font-size: 1.5rem;
  font-weight: bold;
}
.forecast-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.forecast-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.forecast-card img {
  width: 50px;
}
