:root{
  --bg: #f6fbff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;

  --blue-50: #e0f2fe;
  --blue-200:#7dd3fc;
  --blue-500:#0ea5e9;

  --orange-500:#f97316;
  --orange-600:#ea580c;

  --green-600:#16a34a;
  --red-600:#dc2626;

  --shadow: 0 10px 30px rgba(2, 132, 199, 0.12);
  --shadow-soft: 0 6px 16px rgba(15, 23, 42, 0.08);

  --radius-lg: 18px;
  --radius-md: 14px;

  --ring: 0 0 0 4px rgba(14, 165, 233, 0.18);
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(900px 500px at 20% -10%, rgba(14,165,233,0.18), transparent 60%),
              radial-gradient(700px 420px at 90% 0%, rgba(249,115,22,0.15), transparent 55%),
              var(--bg);
  color: var(--text);
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 12px;
  padding: 10px 12px;
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}
.skip-link:focus{ left: 12px; z-index: 10; }

.app-header{
  padding: 28px 16px 10px;
}

.header-inner{
  max-width: 980px;
  margin: 0 auto;
}

.title{
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 2.1rem);
  letter-spacing: -0.02em;
}

.subtitle{
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 65ch;
}

.container{
  max-width: 980px;
  margin: 14px auto 34px;
  padding: 0 16px;
}

.card{
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(14,165,233,0.12);
}

.prediction-card{ padding: 18px; }

.card-header{ margin-bottom: 14px; }
.card-title{ margin: 0; font-size: 1.05rem; }
.card-hint{ margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }

.form{ margin-top: 10px; }

.grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 720px){
  .prediction-card{ padding: 14px; }
  .grid{ grid-template-columns: 1fr; }
}

.field{ display: grid; gap: 7px; }

.label{
  font-size: 0.92rem;
  font-weight: 600;
  color: #0b2440;
}

input, select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(14,165,233,0.25);
  background: linear-gradient(180deg, rgba(224,242,254,0.45), rgba(255,255,255,0.9));
  color: var(--text);
  outline: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

input::placeholder{ color: rgba(71,85,105,0.7); }

input:focus, select:focus{
  border-color: rgba(14,165,233,0.65);
  box-shadow: var(--ring);
}

.actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}

.btn{
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.btn:active{ transform: translateY(1px) scale(0.99); }

.btn-primary{
  background: linear-gradient(180deg, rgba(14,165,233,1), rgba(2,132,199,1));
  color: white;
  box-shadow: 0 10px 22px rgba(14,165,233,0.25);
  flex: 1 1 220px;
}

.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 14px 28px rgba(14,165,233,0.3); }

.btn-secondary{
  background: rgba(14,165,233,0.08);
  color: var(--blue-500);
  border: 1px solid rgba(14,165,233,0.25);
  flex: 0 0 auto;
}

.btn-secondary:hover{ transform: translateY(-1px); background: rgba(14,165,233,0.12); }

.loading{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(14,165,233,0.08);
  border: 1px dashed rgba(14,165,233,0.35);
}

.spinner{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(14,165,233,0.25);
  border-top-color: rgba(14,165,233,0.95);
  animation: spin 800ms linear infinite;
}

@keyframes spin{ to { transform: rotate(360deg); } }

.result{
  margin-top: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(224,242,254,0.35), rgba(255,255,255,0.92));
  border: 1px solid rgba(14,165,233,0.18);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.result-inner{ padding: 16px; }

.result[hidden]{ display: none; }

.result:not([hidden]){
  animation: popIn 260ms ease both;
}

@keyframes popIn{
  from{ opacity: 0; transform: translateY(8px) scale(0.99); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

.badge-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge{
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: white;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.badge--high{ background: linear-gradient(180deg, rgba(220,38,38,1), rgba(190,18,60,1)); }
.badge--moderate{ background: linear-gradient(180deg, rgba(249,115,22,1), rgba(234,88,12,1)); }
.badge--low{ background: linear-gradient(180deg, rgba(22,163,74,1), rgba(21,128,61,1)); }

.weather-icon{
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 8px 14px rgba(14,165,233,0.15));
}

.result-title{ margin: 12px 0 6px; font-size: 1.05rem; }
.risk-level{ font-weight: 900; }

.result-rec{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.toast{
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: white;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 18px 35px rgba(0,0,0,0.22);
  max-width: calc(100vw - 28px);
  border: 1px solid rgba(255,255,255,0.14);
}

.toast-message{ font-weight: 600; }

.footer{
  text-align: center;
  color: rgba(71,85,105,0.9);
  padding: 22px 12px;
  font-size: 0.95rem;
}

