:root {
  --primary: #009688;
  --primary-light: #e0f2f1;
  --bg: #fafafa;
  --card: #ffffff;
  --text: #212121;
  --text-sec: #757575;
  --divider: #e0e0e0;
  --hi: #e53935;
  --lo: #1e88e5;
  --shadow: 0 2px 4px rgba(0,0,0,0.14), 0 1px 5px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 500px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px;
  border: 1px solid #37474f;
}

/* --- Modern Hero Card --- */
.now-hero {
  background: linear-gradient(135deg, rgba(0, 150, 136, 0.85) 0%, rgba(0, 121, 107, 0.85) 100%);
  color: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-radius: 50px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 2px solid #37474f;
}

.now-row.top {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 20px;
}

.now-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  text-align: center;
}

.hero-temp {
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-meta-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-emoji {
  font-size: 48px;
  line-height: 1;
}

.hero-desc {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
}

.stat-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-lab {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.stat-val {
  font-size: 18px;
  font-weight: 600;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(135deg, rgba(0, 150, 136, 0.9) 0%, rgba(0, 121, 107, 0.9) 100%);
  color: #fff;
  border: 2px solid #37474f;
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.8;
}

.modal-main {
  text-align: center;
  margin-bottom: 30px;
}

.modal-emoji { font-size: 72px; line-height: 1.2; }
.modal-temp { font-size: 64px; font-weight: 300; margin: 10px 0; }
.modal-desc { font-size: 20px; font-weight: 500; opacity: 0.9; }

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
}

.modal-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-stat-lab {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.modal-stat-val {
  font-size: 16px;
  font-weight: 600;
}

.section-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.card-header-row {
  display: flex;
  justify-content: flex-start;
}

/* --- Hourly scroll --- */
.hour-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 4px;
  scrollbar-width: none;
}

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

.hour-card {
  min-width: 72px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.hour-card.is-now {
  background: var(--primary-light);
  border-color: var(--primary);
}

.hour-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sec);
}

.hour-emoji {
  font-size: 24px;
  line-height: 1;
}

.hour-temp {
  font-size: 16px;
  font-weight: 700;
}

.hour-detail {
  font-size: 10px;
  color: var(--text-sec);
  line-height: 1.3;
}

.hour-rain {
  font-size: 10px;
  font-weight: 700;
  color: var(--lo);
}

.hour-uv {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sec);
}

.uv-sig {
  color: #d32f2f;
}

/* --- Significant highlights --- */
.wind-sig {
  color: #e65100;
  font-weight: 700;
}

.wind-sig {
  color: #d32f2f;
  font-weight: 700;
}

.hour-card .wind-sig {
  color: #d32f2f;
  font-weight: 700;
}


.hour-card .cold-sig {
  color: #1565c0;
  font-weight: 700;
}

.now-range.sig-range {
  background: rgba(255,255,255,0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

.now-wind.sig-wind {
  background: rgba(255,255,255,0.15);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  opacity: 1;
}

/* --- Notes --- */
.notes-card {
  background: #fff8e1;
  border-left: 3px solid #ffa000;
  border-right: none;
  border-top: none;
  border-bottom: none;
  border-radius: 2px;
  box-shadow: none;
}

.notes-card .note {
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  padding: 2px 0;
}

/* --- Footer --- */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-sec);
  padding: 8px 0 16px;
}
