/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg: #050a14;
  --surface: #0d1626;
  --surface2: #111e34;
  --border: rgba(255,255,255,0.07);
  --accent: #e8614d;
  --accent2: #f0a070;
  --text: #f0f4ff;
  --muted: #6b7fa3;
  --input-bg: rgba(255,255,255,0.04);
  --input-border: rgba(255,255,255,0.1);
  --input-focus: rgba(232,97,77,0.35);
  --radius: 12px;
  --radius-sm: 7px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background Orbs ───────────────────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}

.orb1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #e8614d, transparent);
  top: -150px; left: -150px;
  animation: drift1 14s ease-in-out infinite alternate;
}

.orb2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #3a6cf4, transparent);
  bottom: -100px; right: -100px;
  animation: drift2 18s ease-in-out infinite alternate;
}

.orb3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #f0a070, transparent);
  top: 50%; left: 55%;
  animation: drift3 22s ease-in-out infinite alternate;
}

@keyframes drift1 { to { transform: translate(60px, 80px); } }
@keyframes drift2 { to { transform: translate(-40px, -60px); } }
@keyframes drift3 { to { transform: translate(-80px, 40px); } }

/* ── Page Layout ───────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

/* ── Header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease both;
}

.header-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(232,97,77,0.35);
}

.header-icon svg { width: 28px; height: 28px; }

.header-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.header-text h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.15;
  color: var(--text);
}

.header-text h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Card ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
  animation: fadeUp 0.7s 0.1s ease both;
}

.card-intro {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.card-intro p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
}

/* ── Form Sections ─────────────────────────────────────── */
.form-section {
  margin-bottom: 28px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-num {
  font-size: 11px;
  color: var(--accent);
  background: rgba(232,97,77,0.12);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ── Field Grid ────────────────────────────────────────── */
.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid.col-2 { grid-template-columns: 1fr 1fr; }
.field-grid.col-1 { grid-template-columns: 1fr; }

@media (max-width: 480px) {
  .field-grid.col-2 { grid-template-columns: 1fr; }
  .card { padding: 24px 18px; }
}

/* ── Field Group ───────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; }

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.01em;
}

label .hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

/* ── Input Wrap ────────────────────────────────────────── */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.unit {
  position: absolute;
  right: 12px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  pointer-events: none;
  letter-spacing: 0.05em;
}

input[type="number"],
select {
  width: 100%;
  padding: 11px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

input[type="number"]:focus,
select:focus {
  border-color: var(--accent);
  background: rgba(232,97,77,0.06);
  box-shadow: 0 0 0 3px var(--input-focus);
}

input[type="number"]::placeholder { color: var(--muted); font-weight: 300; }

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7fa3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

select option { background: #1a2540; color: var(--text); }

/* ── Submit ────────────────────────────────────────────── */
.submit-area {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.btn-predict {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: var(--radius);
  padding: 14px 36px;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 8px 28px rgba(232,97,77,0.4);
}

.btn-predict:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(232,97,77,0.5);
}

.btn-predict:active { transform: translateY(0); }

.btn-icon svg { width: 18px; height: 18px; }

.disclaimer {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  max-width: 360px;
  line-height: 1.5;
  font-weight: 300;
}

/* ── Result Page ───────────────────────────────────────── */
.result-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.result-card {
  text-align: center;
  padding: 52px 44px;
  max-width: 480px;
  width: 100%;
}

.result-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.result-pulse {
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,97,77,0.3), transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.4); opacity: 0.2; }
}

.result-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 28px rgba(232,97,77,0.4);
  position: relative;
}

.result-icon svg { width: 32px; height: 32px; }

.result-label {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}

.result-text {
  font-family: 'Syne', sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text);
}

.result-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
  max-width: 360px;
  margin: 0 auto 32px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
  background: var(--input-bg);
}

.btn-back:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-back svg { width: 16px; height: 16px; }

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
