:root {
  --bg: #0b1a2b;
  --bg-card: #132b47;
  --accent: #4fb0ff;
  --accent-strong: #125ca8;
  --text: #eef4fb;
  --muted: #9db2c9;
  --danger: #ff5d5d;
  --warn: #ffb648;
  --ok: #58d68d;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}

.app-header {
  padding: 16px 16px 8px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header h1 {
  font-size: 1.4rem;
  margin: 0;
}

.muted { color: var(--muted); margin: 4px 0; }
.muted.small { font-size: 0.78rem; }

.banner {
  background: var(--warn);
  color: #201400;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-top: 8px;
}
.banner p { margin: 0 0 8px; }
.banner p:last-child { margin-bottom: 0; }

.retry-btn {
  background: #201400;
  color: var(--warn);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.banner-hint {
  font-size: 0.75rem;
  opacity: 0.85;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 1.2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
}

.card h2 {
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--accent);
}

.current-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.weather-icon { font-size: 2.4rem; }
.current-temp { font-size: 2.6rem; font-weight: 600; }

.current-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 12px 0 0;
}
.current-details div { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 6px; }
.current-details dt { color: var(--muted); font-size: 0.85rem; }
.current-details dd { margin: 0; font-weight: 500; }

.day-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-item {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  overflow: hidden;
}

.day-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.day-summary::-webkit-details-marker { display: none; }
.day-summary .day-name { flex: 1 1 auto; font-size: 0.9rem; }
.day-summary .day-icon { font-size: 1.2rem; }
.day-summary .day-temps { font-size: 0.9rem; white-space: nowrap; }
.day-summary .day-temps .max { font-weight: 600; }
.day-summary .day-precip { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

.hour-list {
  padding: 4px 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.hour-row {
  display: grid;
  grid-template-columns: 44px 28px 40px 1fr 1fr;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hour-row:last-child { border-bottom: none; }
.hour-time { color: var(--muted); }
.hour-icon { font-size: 1rem; }
.hour-temp { font-weight: 600; }
.hour-precip, .hour-wind { color: var(--muted); font-size: 0.78rem; }

.radar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
}
.radar-link-arrow { color: var(--accent); font-size: 1.3rem; }

.app-footer {
  padding: 16px;
  text-align: center;
}

.error-text { color: var(--danger); }

/* Regenradar-Vollbildseite (radar.html) */
body.radar-page {
  margin: 0;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
}

#radar-map-full {
  position: fixed;
  inset: 0;
  height: 100dvh;
  width: 100vw;
  background: #0e2036;
}

.radar-back {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 12px;
  z-index: 1000;
  text-decoration: none;
  font-size: 1.4rem;
}

.radar-legend {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  right: 12px;
  z-index: 1000;
  background: rgba(11, 26, 43, 0.8);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  font-size: 0.72rem;
}
.legend-title {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.72rem;
}
.legend-row { display: flex; align-items: center; gap: 6px; padding: 1px 0; white-space: nowrap; }
.legend-row .chip {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.radar-banner {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 64px;
  right: 64px;
  z-index: 1000;
  text-align: center;
}

.radar-controls-full {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  z-index: 1000;
  background: rgba(11, 26, 43, 0.85);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radar-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.radar-time { font-size: 1.1rem; font-weight: 600; }

.now-btn {
  background: var(--accent-strong);
  color: var(--text);
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.radar-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.radar-slider-row input[type="range"] { flex: 1; }

.step-btn {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  font-size: 0.9rem;
}
