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

:root {
  --bg:        #060d12;
  --surface:   #0c1a23;
  --surface2:  #112433;
  --border:    rgba(0,210,180,.12);
  --border2:   rgba(0,210,180,.25);
  --accent:    #00d2b4;
  --accent2:   #00ffdc;
  --danger:    #ff4d6d;
  --warn:      #ffbe0b;
  --text:      #e8f4f2;
  --text-muted:#7fa99e;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius:    16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── BACKGROUND ────────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,210,180,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,210,180,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.parasite {
  position: fixed;
  right: -120px; top: 50%;
  transform: translateY(-50%);
  width: 500px; height: 500px;
  color: var(--accent);
  opacity: .06;
  pointer-events: none;
  animation: spin 60s linear infinite;
  z-index: 0;
}

@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* ── HEADER ────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(6,13,18,.8);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 900px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700; font-size: 1.1rem;
  color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}

.logo-icon { font-size: 1.3rem; }

.logo sup {
  font-size: .55rem;
  background: var(--accent);
  color: var(--bg);
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: .04em;
}

.header-badge {
  font-size: .72rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .06em;
}

/* ── MAIN WRAP ─────────────────────────────────────────────── */
.main-wrap {
  max-width: 720px; margin: 0 auto;
  padding: 120px 24px 80px;
  position: relative; z-index: 1;
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero { animation: fadeUp .7s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag {
  display: inline-flex; align-items: center;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border2);
  padding: 5px 14px; border-radius: 20px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 24px;
  color: var(--text);
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}

.hero-title em::after {
  content: '';
  position: absolute;
  left: 0; bottom: 4px; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: .35;
  border-radius: 2px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 20px;
}

.hero-disclaimer {
  font-size: .82rem;
  color: var(--warn);
  background: rgba(255,190,11,.06);
  border: 1px solid rgba(255,190,11,.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 36px;
  line-height: 1.5;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-size: 1rem; font-weight: 700;
  background: var(--accent);
  color: var(--bg);
  border: none; border-radius: var(--radius);
  padding: 16px 32px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .01em;
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,210,180,.3);
}

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

.btn-arrow { font-size: 1.1rem; transition: transform .2s; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-ulang { margin-top: 32px; }

/* ── HERO STATS ────────────────────────────────────────────── */
.hero-stats {
  display: flex; align-items: center; gap: 20px;
  margin-top: 40px;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat span { font-size: .75rem; color: var(--text-muted); letter-spacing: .04em; }

.stat-sep {
  width: 1px; height: 36px;
  background: var(--border2);
}

/* ── HIDDEN ────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── QUIZ CARD ─────────────────────────────────────────────── */
.quiz-section { animation: fadeUp .5s ease both; }

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 0 60px rgba(0,210,180,.05);
}

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

.quiz-progress-label {
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.btn-reset {
  font-size: .78rem;
  color: var(--text-muted);
  background: none; border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all .2s;
}
.btn-reset:hover { border-color: var(--danger); color: var(--danger); }

.progress-track {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 40px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

.question-block { margin-bottom: 40px; min-height: 100px; }

.question-number {
  font-family: var(--font-head);
  font-size: 3.5rem; font-weight: 800;
  color: var(--accent);
  opacity: .15;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -.04em;
}

.question-text {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  animation: fadeUp .3s ease both;
}

/* ── ANSWER BUTTONS ────────────────────────────────────────── */
.answer-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-ya, .btn-tidak {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head);
  font-size: 1.05rem; font-weight: 700;
  border: none; border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .02em;
}

.btn-ya {
  background: rgba(0,210,180,.12);
  color: var(--accent);
  border: 1.5px solid var(--border2);
}

.btn-ya:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,210,180,.25);
}

.btn-tidak {
  background: rgba(255,77,109,.08);
  color: #ff8fa3;
  border: 1.5px solid rgba(255,77,109,.2);
}

.btn-tidak:hover {
  background: var(--danger);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,77,109,.2);
}

.ans-icon { font-size: 1.1rem; }

/* ── GEJALA TAGS ───────────────────────────────────────────── */
.gejala-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 28px;
  min-height: 32px;
}

.g-tag {
  font-size: .72rem;
  background: rgba(0,210,180,.1);
  color: var(--accent);
  border: 1px solid var(--border2);
  padding: 4px 10px; border-radius: 20px;
  animation: popIn .2s ease;
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── LOADING ───────────────────────────────────────────────── */
.loading-section {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh;
}

.loader-wrap { text-align: center; }

.cell-spinner {
  width: 90px; height: 90px;
  position: relative;
  margin: 0 auto 28px;
}

.ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid transparent;
}

.r1 {
  border-top-color: var(--accent);
  animation: rot 1s linear infinite;
}

.r2 {
  inset: 14px;
  border-right-color: var(--accent2);
  opacity: .6;
  animation: rot 1.5s linear infinite reverse;
}

.r3 {
  inset: 28px;
  border-bottom-color: var(--accent);
  opacity: .3;
  animation: rot 2s linear infinite;
}

.dot {
  position: absolute;
  inset: 38px;
  background: var(--accent);
  border-radius: 50%;
  opacity: .5;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes rot { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.3); opacity: 1; }
}

.loading-text {
  font-family: var(--font-head);
  font-size: 1.2rem; font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.loading-sub { font-size: .85rem; color: var(--text-muted); }

/* ── HASIL ─────────────────────────────────────────────────── */
.hasil-section { animation: fadeUp .5s ease both; }

.hasil-header { margin-bottom: 32px; }

.hasil-title {
  font-family: var(--font-head);
  font-size: 2rem; font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.02em;
}

.hasil-sub { font-size: .95rem; color: var(--text-muted); }

/* ── HASIL CARDS ───────────────────────────────────────────── */
.hasil-cards { display: flex; flex-direction: column; gap: 20px; margin-bottom: 16px; }

.hasil-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 28px;
  animation: fadeUp .4s ease both;
  position: relative;
  overflow: hidden;
}

.hasil-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--accent);
  border-radius: 4px 0 0 4px;
}

.hasil-card.danger::before { background: var(--danger); }
.hasil-card.warn::before   { background: var(--warn); }

.card-nama {
  font-family: var(--font-head);
  font-size: 1.25rem; font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.hasil-card.danger .card-nama { color: var(--danger); }
.hasil-card.warn   .card-nama { color: var(--warn); }

.card-deskripsi {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-saran {
  font-size: .88rem;
  background: rgba(0,210,180,.07);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  line-height: 1.6;
}

.hasil-card.danger .card-saran {
  background: rgba(255,77,109,.07);
  border-color: rgba(255,77,109,.2);
}

.hasil-card.warn .card-saran {
  background: rgba(255,190,11,.07);
  border-color: rgba(255,190,11,.2);
}

.card-gejala-cocok {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px;
}

.cc-tag {
  font-size: .7rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(0,210,180,.1);
  color: var(--accent);
  border: 1px solid var(--border2);
}

/* ── TIDAK TERDETEKSI ──────────────────────────────────────── */
.tidak-terdeteksi {
  text-align: center;
  padding: 60px 32px;
  border: 1px dashed var(--border2);
  border-radius: 20px;
  margin-bottom: 16px;
}

.tidak-icon { font-size: 3rem; margin-bottom: 16px; }

.tidak-terdeteksi h3 {
  font-family: var(--font-head);
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: 10px;
}

.tidak-terdeteksi p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 440px; margin: 0 auto;
}

/* ── GEJALA SUMMARY ────────────────────────────────────────── */
.gejala-summary {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 8px;
}

.gs-title {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.gs-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.gs-tag {
  font-size: .78rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0,210,180,.08);
  color: var(--accent);
  border: 1px solid var(--border);
}

.gs-none { font-size: .85rem; color: var(--text-muted); font-style: italic; }

/* ── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-muted);
  position: relative; z-index: 1;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 560px) {
  .main-wrap { padding: 100px 16px 60px; }
  .quiz-card { padding: 24px 20px; }
  .hero-stats { gap: 14px; }
  .stat strong { font-size: 1.2rem; }
  .answer-row { gap: 12px; }
}
