* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  color: white;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 1100px;
}

/* HEADER */
.app-title {
  font-size: 28px;
  margin-bottom: 4px;
}

.app-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-bottom: 16px;
}

/* SEARCH */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-bar button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: #e94560;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.search-bar button:hover {
  background: #c73652;
}

/* TWO COLUMN ROW */
.top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* WEATHER CARD */
.weather-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.weather-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.weather-card img {
  width: 64px;
  height: 64px;
}

.weather-card p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
  text-transform: capitalize;
}

.weather-card h1 {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 12px;
}

.details {
  display: flex;
  justify-content: space-around;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* AQI CARD */
.aqi-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.aqi-card h3 {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.aqi-indicator {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.aqi-badge {
  font-size: 48px;
  font-weight: 700;
}

.aqi-label {
  font-size: 24px;
  font-weight: 600;
}

.aqi-advice {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  line-height: 1.5;
}

.pollutants {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.aqi-good { color: #00e676; }
.aqi-fair { color: #ffee58; }
.aqi-moderate { color: #ffa726; }
.aqi-poor { color: #ef5350; }
.aqi-verypoor { color: #ab47bc; }

/* BOTTOM ROW */
.bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* AI CARD */
.ai-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.ai-card h3 {
  font-size: 15px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.ai-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-input-row input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
}

.ai-input-row input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.ai-input-row button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #0f3460;
  color: white;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.ai-input-row button:hover {
  background: #16213e;
}

.ai-response {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.7;
  height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.ai-placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.ai-loading {
  color: rgba(255, 255, 255, 0.6);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ERROR */
.error {
  color: #e94560;
  text-align: center;
  margin-bottom: 12px;
  font-size: 14px;
  min-height: 18px;
}

/* MAP */
#map {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}