.app-container {
  width: min(440px, 92vw);
  margin: 32px auto 64px;
}

/* Home icon button (fixed top-left corner) */
.home-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--accent);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.home-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* Top bar: holds unit toggle, sits above the card */
.top-bar {
  margin-bottom: 8px;
}

/* Remaining Today hero section */
.remaining-section {
  margin: 16px 0 8px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.remaining-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 6px;
}

.remaining-temps {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
}

.remaining-sep {
  color: var(--muted);
  font-weight: 400;
}

/* Witty snarky comment */
.witty-comment {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.weather-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 28px var(--shadow);
  text-align: center;
}

.location-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.condition-text {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 4px 0;
}

.temp-large {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  margin: 12px 0 8px;
  color: var(--text);
}

.high-low {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 600;
}

.high-val {
  color: #e05a1f;
}

.low-val {
  color: #1f7ae0;
}

.feels-like {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

.powered-by {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 12px;
  opacity: 0.7;
}

.status-msg {
  color: var(--muted);
  text-align: center;
  padding: 60px 20px;
  font-size: 1rem;
}

.retry-btn {
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.retry-btn:hover {
  opacity: 0.9;
}

.hourly-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  margin-top: 20px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.hourly-scroll::-webkit-scrollbar {
  display: none;
}

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 52px;
}

.hourly-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.hourly-temp {
  font-size: 0.9rem;
  font-weight: 600;
}

.forecast-7day {
  margin-top: 20px;
  width: 100%;
}

.forecast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.forecast-day {
  width: 40px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

.forecast-icon {
  width: 24px;
  text-align: center;
}

.forecast-precip {
  width: 36px;
  font-size: 0.75rem;
  color: #1f7ae0;
  text-align: center;
}

.forecast-temps {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
}

.forecast-high {
  font-weight: 600;
}

.forecast-low {
  color: var(--muted);
}

.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.search-btn {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Unit toggle */
.unit-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 10px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.unit-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.unit-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Sunrise / sunset row */
.sun-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
}

/* Hourly precipitation chance */
.hourly-precip {
  font-size: 0.7rem;
  color: #1f7ae0;
  min-height: 14px;
}

.hourly-precip.hidden {
  visibility: hidden;
}

/* UV badge in 7-day rows */
.uv-badge {
  display: inline-block;
  min-width: 36px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  padding: 2px 6px;
  border-radius: 20px;
  text-align: center;
}

/* Metrics grid */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
  text-align: left;
}

.metric-tile {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
