/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ──────────────────────────────────────────────────── */
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: #dbeafe;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  color: #1e293b;
}

.app {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  background: white;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.12);
  position: relative;
}

.hidden { display: none !important; }

/* ── Search view ───────────────────────────────────────────── */
.search-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 28px;
  background: linear-gradient(175deg, #0ea5e9 0%, #38bdf8 45%, #bae6fd 100%);
}

.search-logo {
  font-size: 72px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.search-view h1 {
  font-size: 34px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
  margin-bottom: 36px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

#search-form {
  width: 100%;
  display: flex;
  gap: 8px;
}

#city-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  font-family: inherit;
  border: none;
  border-radius: 18px;
  outline: none;
  background: white;
  color: #1e293b;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
}

#city-input::placeholder { color: #94a3b8; }

#search-form button {
  padding: 0 18px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: #0284c7;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
}

#search-form button:hover  { background: #0369a1; }
#search-form button:active { transform: scale(0.96); }

.search-error {
  margin-top: 14px;
  color: #fef2f2;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  min-height: 20px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ── Weather view ──────────────────────────────────────────── */
.weather-view { min-height: 100vh; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(165deg, #0ea5e9 0%, #38bdf8 55%, #7dd3fc 100%);
  padding: 56px 24px 68px;
  text-align: center;
  color: white;
  position: relative;
}

.search-icon-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.search-icon-btn:hover { background: rgba(255, 255, 255, 0.34); }

.location-name {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}
.pin { font-size: 16px; }

.date-display {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 12px;
  font-weight: 400;
}

.hero-icon {
  width: 110px;
  height: 110px;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
}

.hero-condition {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2px;
}

.hero-temp {
  font-size: 76px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -4px;
  margin-bottom: 8px;
}

.hero-feels {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

/* ── Warning banner ────────────────────────────────────────── */
.warning-banner {
  background: linear-gradient(135deg, #f97316, #fbbf24);
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 20px;
  text-align: center;
  line-height: 1.5;
  box-shadow: 0 2px 12px rgba(249, 115, 22, 0.35);
}

/* ── Content panel ─────────────────────────────────────────── */
.content-panel {
  background: white;
  border-radius: 28px 28px 0 0;
  margin-top: -28px;
  padding-bottom: 48px;
  position: relative;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.07);
}

/* Drag-handle pill */
.content-panel::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin: 14px auto 22px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #94a3b8;
  padding: 0 20px;
  margin-bottom: 12px;
}

.divider {
  height: 1px;
  background: #f1f5f9;
  margin: 20px 20px;
}

/* ── Hourly scroll ─────────────────────────────────────────── */
.hourly-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 20px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hourly-scroll::-webkit-scrollbar { display: none; }

.hour-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 62px;
  padding: 10px 8px 12px;
  border-radius: 18px;
  background: #f8fafc;
  gap: 2px;
  transition: background 0.2s;
}

/* "Now" card highlighted */
.hour-item.hour-now {
  background: #e0f2fe;
}
.hour-item.hour-now .hour-time {
  color: #0284c7;
  font-weight: 700;
}

.hour-time {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.hour-icon {
  width: 42px;
  height: 42px;
}

.hour-pop {
  font-size: 11px;
  color: #60a5fa;
  font-weight: 500;
  height: 16px;
  line-height: 16px;
}

.hour-temp {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

/* ── Daily list ────────────────────────────────────────────── */
.daily-list { padding: 0 20px; }

.day-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid #f1f5f9;
}
.day-row:last-child { border-bottom: none; }

.day-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
}

.day-pop {
  font-size: 12px;
  color: #60a5fa;
  font-weight: 500;
  min-width: 46px;
  text-align: right;
}

.day-icon {
  width: 36px;
  height: 36px;
}

.day-temps {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  min-width: 78px;
  text-align: right;
}

/* ── Details grid ──────────────────────────────────────────── */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border-radius: 16px;
  padding: 13px 14px;
}

.detail-icon { font-size: 22px; flex-shrink: 0; }

.detail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 3px;
}

.detail-value {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

/* ── Misc ──────────────────────────────────────────────────── */
.no-data {
  font-size: 13px;
  color: #94a3b8;
  padding: 8px 20px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 420px) {
  .app { box-shadow: none; }
  .hero-temp { font-size: 64px; }
}
