:root {
  --bg: #0a0e27;
  --surface: rgba(255,255,255,.04);
  --surface-hover: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.06);
  --border-hover: rgba(255,255,255,.12);
  --text: #f8fafc;
  --text-muted: rgba(255,255,255,.45);
  --text-body: rgba(255,255,255,.65);
  --accent: #06b6d4;
  --accent-2: #8b5cf6;
  --radius: 1rem;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(to bottom right, #0f172a, #1e3a8a, #164e63);
  color: var(--text-body);
  min-height: 100vh;
  overflow: hidden;
}
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; color: var(--text); }
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  flex-shrink: 0;
}
.topbar-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.logo svg { color: var(--accent); }
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
}
.search-wrap svg {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}
.form-input::placeholder { color: var(--text-muted); }
.content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 1.5rem;
}
.content > * {
  max-width: 1200px;
  margin: 0 auto;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
  min-height: 400px;
}
.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent);
}
.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.empty-state p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}
.loading-state {
  max-width: 800px;
  margin: 0 auto;
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text {
  height: 16px;
  width: 80%;
  margin-bottom: 0.75rem;
}
.skeleton-title {
  height: 32px;
  width: 50%;
  margin-bottom: 1.5rem;
}
.skeleton-card {
  height: 240px;
  width: 100%;
  margin-bottom: 1.5rem;
}
.error-state {
  max-width: 800px;
  margin: 0 auto;
}
.error-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 12px;
  font-size: 0.875rem;
  color: #fca5a5;
}
.error-banner svg {
  flex-shrink: 0;
}
.weather-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.city-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.current-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.current-weather {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(20px);
}
.current-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.temp-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.current-temp {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.weather-desc {
  font-size: 1.125rem;
  color: var(--text-body);
  text-transform: capitalize;
}
.weather-icon-large {
  font-size: 5rem;
  line-height: 1;
}
.current-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
}
.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.detail-item svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.detail-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.forecast-section {
  margin-top: 2rem;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.forecast-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.2s;
  cursor: default;
}
.forecast-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}
.forecast-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.forecast-icon {
  font-size: 2.5rem;
  margin: 0.5rem 0;
}
.forecast-temp {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.75rem 0 0.25rem;
}
.forecast-desc {
  font-size: 0.75rem;
  color: var(--text-body);
  text-transform: capitalize;
}
.forecast-range {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.popular-cities {
  max-width: 1200px;
  margin: 0 auto 2rem;
}
.popular-cities h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
@media (min-width: 768px) {
  .cities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .cities-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}
.city-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}
.city-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}
.city-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.city-card-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.city-card-icon {
  font-size: 2rem;
  line-height: 1;
}
.city-card-temp {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.city-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.city-card-loading {
  opacity: 0.5;
  pointer-events: none;
}
@media (max-width: 768px) {
  .topbar-content {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  .logo {
    justify-content: center;
  }
  .search-wrap {
    max-width: 100%;
  }
  .topbar {
    height: auto;
    padding: 1rem 1.5rem;
  }
  .content {
    padding: 1.5rem 1rem;
  }
  .city-name {
    font-size: 1.5rem;
  }
  .current-temp {
    font-size: 3rem;
  }
  .weather-icon-large {
    font-size: 3.5rem;
  }
  .current-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .current-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .forecast-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}
