/* ══════════════════════════════════════════════════════════════
   Notion 一日實作班 — 報名前測驗（Apple-like 風格 v2）
   繼承 shared/variables.css 品牌變數
   ══════════════════════════════════════════════════════════════ */

:root {
  --primary-surface: #EDF8FA;
  --primary-border: #B2E0E5;
  --accent-surface: #FEF3EC;
  --accent-border: #FBCFB2;
  --accent-text: #7A3F1A;
  --error: #D94F4F;
}

/* ── Layout ───────────────────────────────────────── */
html, body {
  font-family: var(--font-sans);
  background:
    radial-gradient(ellipse 1200px 600px at 50% -10%, rgba(33, 164, 177, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 800px 400px at 80% 100%, rgba(231, 126, 71, 0.06) 0%, transparent 60%),
    var(--bg-cream);
  background-attachment: fixed;
  color: var(--text-medium);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern', 'liga', 'calt';
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

/* ── Header ───────────────────────────────────────── */
.header {
  text-align: center;
  margin-bottom: 48px;
}

.header-badge {
  display: inline-block;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.header h1 {
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #1A1A1A 0%, #4B5563 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header h1 em {
  font-style: normal;
  -webkit-text-fill-color: var(--primary);
}

.header p {
  color: var(--text-light);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ── Progress (sticky glassmorphism) ─────────────── */
.progress-wrap {
  position: sticky;
  top: 20px;
  z-index: 10;
  margin-bottom: 36px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.progress-meta strong {
  color: var(--primary);
  font-weight: 600;
}

.progress-bar-bg {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 999px;
  transition: width 0.6s var(--ease);
  width: 0%;
}

/* ── Section ──────────────────────────────────────── */
.section { margin-bottom: 40px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
}

/* ── Question Card ────────────────────────────────── */
.question-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 36px 36px 32px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.4s var(--ease), border-color 0.2s ease;
}

.question-card:hover {
  box-shadow: var(--shadow-lg);
}

.question-card.answered {
  border-color: var(--primary-border);
}

.question-card.error {
  border-color: var(--error);
  background: #FFFBFB;
}

.question-card.gate-card {
  background: var(--bg-soft);
}

/* ── Special Badge ────────────────────────────────── */
.special-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.badge-orange {
  background: var(--accent-surface);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.badge-teal {
  background: var(--primary-surface);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
}

/* ── Question Label ───────────────────────────────── */
.question-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.5;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}

.q-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--primary-tint);
  color: var(--primary-dark);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ── Options ──────────────────────────────────────── */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-soft);
  font-size: 15.5px;
  color: var(--text-medium);
  line-height: 1.5;
  transition: all 0.25s var(--ease);
  user-select: none;
}

.option-label:hover {
  border-color: var(--primary);
  background: var(--primary-tint);
  color: var(--text-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(33, 164, 177, 0.12);
}

.option-label:active {
  transform: translateY(0);
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
  /* 隱藏原生 input，用 .option-key 代替 */
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.option-key {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.option-label:hover .option-key {
  background: var(--primary);
  color: #fff;
}

.option-label.selected {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--text-dark);
  font-weight: 500;
}

.option-label.selected .option-key {
  background: var(--primary);
  color: #fff;
}

/* ── No-device Notice ─────────────────────────────── */
.device-notice {
  display: none;
  margin-top: 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(231, 126, 71, 0.06) 0%, rgba(231, 126, 71, 0.02) 100%);
  border: 1px solid rgba(231, 126, 71, 0.15);
  border-radius: 14px;
  font-size: 14px;
  color: var(--accent-text);
  line-height: 1.7;
}

/* ── Submit ────────────────────────────────────────── */
.submit-wrap {
  text-align: center;
  padding-top: 12px;
  padding-bottom: 32px;
}

.submit-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 380px;
  letter-spacing: 0.2px;
  font-family: inherit;
  transition: all 0.3s var(--ease);
  box-shadow: 0 8px 24px rgba(33, 164, 177, 0.35);
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(33, 164, 177, 0.45);
}

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

.error-hint {
  display: none;
  margin-top: 14px;
  font-size: 13px;
  color: var(--error);
  font-weight: 500;
}

/* ── Results ──────────────────────────────────────── */
.results-container {
  display: none;
  margin-top: 48px;
  padding-bottom: 32px;
  animation: resultIn 0.7s var(--ease);
}

@keyframes resultIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.results-multi-header {
  text-align: center;
  margin-bottom: 32px;
}

.results-multi-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.results-multi-header p {
  font-size: 15px;
  color: var(--text-light);
}

/* ── Result Card ──────────────────────────────────── */
.result-card {
  background: var(--bg-white);
  border-radius: 28px;
  padding: 40px 36px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 600px 300px at 50% 0%, rgba(33, 164, 177, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.result-card.res-physical  { border-top: 4px solid var(--primary); }
.result-card.res-intensive { border-top: 4px solid #2F2F2F; }
.result-card.res-selfpaced { border-top: 4px solid var(--accent); }

.result-icon {
  font-size: 44px;
  margin-bottom: 14px;
  line-height: 1;
  position: relative;
}

.result-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  position: relative;
}

.res-physical  .result-label { background: var(--primary-surface); color: var(--primary-dark); }
.res-intensive .result-label { background: #F0F0F0; color: #444; }
.res-selfpaced .result-label { background: var(--accent-surface); color: var(--accent-text); }

.result-heading {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 16px;
  letter-spacing: -0.015em;
  position: relative;
}

.result-body {
  font-size: 15px;
  color: var(--text-medium);
  line-height: 1.8;
  position: relative;
}

.result-note {
  margin-top: 18px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(231, 126, 71, 0.06) 0%, rgba(231, 126, 71, 0.02) 100%);
  border: 1px solid rgba(231, 126, 71, 0.15);
  border-radius: 14px;
  font-size: 13.5px;
  color: var(--accent-text);
  line-height: 1.7;
  position: relative;
}

.result-cta-btn {
  display: inline-block;
  margin-top: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.2px;
  font-family: inherit;
  transition: all 0.3s var(--ease);
  box-shadow: 0 8px 24px rgba(33, 164, 177, 0.3);
  position: relative;
}

.result-cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(33, 164, 177, 0.4);
}

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

.res-selfpaced .result-cta-btn {
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(231, 126, 71, 0.3);
}

.res-selfpaced .result-cta-btn:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 32px rgba(231, 126, 71, 0.4);
}

.res-intensive .result-cta-btn {
  background: #2F2F2F;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.res-intensive .result-cta-btn:hover {
  background: #1A1A1A;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.retry-btn {
  display: block;
  margin: 16px auto 0;
  padding: 12px 28px;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.25s var(--ease);
}

.retry-btn:hover {
  color: var(--text-dark);
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.02);
}

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  margin-top: 56px;
  padding: 32px 20px 40px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  text-decoration: none;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  opacity: 0.8;
}

.footer-brand span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--primary); }

.footer-copy {
  font-size: 12px;
  color: var(--text-light);
  opacity: 0.6;
}

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 640px) {
  .container { padding: 40px 18px 0; }
  .header { margin-bottom: 40px; }
  .question-card {
    padding: 28px 24px 24px;
    border-radius: 20px;
  }
  .question-label { font-size: 16px; }
  .option-label {
    padding: 14px 16px;
    font-size: 14.5px;
  }
  .submit-btn { font-size: 15px; padding: 15px 0; }
  .result-card {
    padding: 32px 24px;
    border-radius: 22px;
  }
  .result-cta-btn {
    display: block;
    text-align: center;
  }
  .section { margin-bottom: 32px; }
  .footer-links { gap: 14px; }
}
