/* ============ MUET GO · 全站样式（浅色 + 深色 hero 点缀） ============ */
/* 设计方向：参照 ylpte.com 的专业 SaaS 风
   配色 60-30-10：白色底 60% / 靛蓝主色 #4f46e5 30% / 青绿点缀 10%
   难忘元素：深色 hero 区（靛蓝渐变）承接浅色内容，形成强对比
   字体：Inter（正文）+ 几何感标题 */

:root {
  /* 主色（靛蓝） */
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --primary-glow: rgba(79, 70, 229, .25);

  /* 强调色（青绿 / 琥珀） */
  --accent: #0f766e;
  --accent2: #d97706;

  /* 背景层级（浅色） */
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --card: #ffffff;
  --card-solid: #ffffff;

  /* 文字 */
  --text: #111827;
  --text-muted: #6b7280;

  /* 边框 */
  --border: #e5e7eb;
  --border-strong: #c7c9d1;

  /* 状态色 */
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 4px 12px rgba(17,24,39,.06);
  --shadow-lg: 0 8px 24px rgba(17,24,39,.10);
  --shadow-glow: 0 8px 24px rgba(79,70,229,.18);

  --font: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --topbar-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* 入场动画 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.app > * { animation: fadeUp .45s cubic-bezier(.2,.7,.2,1) both; }
.app > *:nth-child(2) { animation-delay: .05s; }
.app > *:nth-child(3) { animation-delay: .1s; }
.app > *:nth-child(4) { animation-delay: .15s; }
.app > *:nth-child(5) { animation-delay: .2s; }

/* ============ 顶部导航 ============ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 24px;
  padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.brand-logo { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.brand-logo .accent { color: var(--primary); }
.brand-sub { font-size: 12px; color: var(--text-muted); display: none; }

.nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.nav a {
  color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: .18s; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: #f3f4f6; }
.nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.menu-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--text); }

.mobile-menu { display: none; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm); padding: 10px 18px;
  font-size: 15px; font-weight: 600; transition: transform .12s, box-shadow .18s, background .18s;
  line-height: 1.2; position: relative;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.3); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(79,70,229,.35); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: #f3f4f6; color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 13px 24px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ============ 主容器 ============ */
.app { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 20px 48px; }
.section-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.5px; color: var(--text); }
.section-sub { color: var(--text-muted); margin-bottom: 24px; }

/* 卡片 */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.card + .card { margin-top: 16px; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--text); }

/* 栅格 */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); transition: .18s;
}
.input::placeholder, .textarea::placeholder { color: #9ca3af; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.textarea { min-height: 100px; resize: vertical; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-green { background: #ecfdf5; color: #059669; }
.tag-orange { background: #fffbeb; color: #d97706; }
.tag-red { background: #fef2f2; color: #dc2626; }
.tag-gray { background: #f3f4f6; color: var(--text-muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(80px);
  background: #111827; color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 14px; z-index: 999; opacity: 0; transition: .3s; max-width: 90vw;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* 加载动画 */
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { text-align: center; padding: 48px 0; color: var(--text-muted); }

.muted { color: var(--text-muted); font-size: 14px; }

/* ============ 首页 Hero（深色点缀，难忘元素） ============ */
.hero {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 52px 48px;
  color: #fff;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
  box-shadow: 0 16px 40px rgba(49,46,129,.35);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 75% 15%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(ellipse 50% 60% at 15% 90%, rgba(167,139,250,.25), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; top: -50px; right: -30px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,.5), transparent 70%);
  filter: blur(30px); animation: float 8s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.hero h1 { position: relative; z-index: 1; font-size: 38px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; margin-bottom: 16px; }
.hero h1 .hl { color: #a5b4fc; }
.hero p { position: relative; z-index: 1; font-size: 17px; color: #c7d2fe; max-width: 560px; margin-bottom: 30px; }
.hero .hero-actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.hero .btn-primary:hover { background: #eef2ff; }
.hero .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.hero .btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* 首页功能卡片 */
.feature-card { padding: 24px; text-align: left; transition: transform .18s, box-shadow .18s; position: relative; overflow: hidden; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); border-color: var(--primary); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 14px;
  background: var(--primary-light);
}

/* 答题区 */
.question-block { margin-bottom: 24px; }
.question-text { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.option {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; margin-bottom: 8px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .18s, background .18s, transform .1s;
  background: #fff;
}
.option:hover { border-color: var(--primary); background: var(--primary-light); transform: translateX(2px); }
.option.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.option.correct { border-color: var(--success); background: #ecfdf5; }
.option.wrong { border-color: var(--danger); background: #fef2f2; }
.option-letter {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  background: #f3f4f6; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--text-muted);
}
.option.selected .option-letter { background: var(--primary); color: #fff; }
.option.correct .option-letter { background: var(--success); color: #fff; }
.option.wrong .option-letter { background: var(--danger); color: #fff; }

.explain-box {
  background: #f5f7ff; border-left: 3px solid var(--primary); border-radius: 8px;
  padding: 12px 14px; font-size: 14px; margin-top: 10px;
}
.explain-box.explain-success { background: #ecfdf5; border-left-color: var(--success); }
.explain-box.explain-tip { background: #fffbeb; border-left-color: var(--warning); }

/* 报名卡片选中态 */
.exam-select-card.selected-card {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* 技巧文章正文 */
.article-content h3 { color: var(--primary-dark); font-size: 18px; margin: 20px 0 10px; font-weight: 700; }
.article-content p { margin-bottom: 12px; color: #374151; }
.article-content ul, .article-content ol { margin: 0 0 14px 20px; color: #374151; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--text); }

/* 页脚 */
.footer { border-top: 1px solid var(--border); background: #fff; padding: 24px 20px; text-align: center; }
.footer-inner { max-width: 1200px; margin: 0 auto; font-size: 14px; }
.footer .muted { margin-top: 4px; }

/* ============ 响应式断点 ============ */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .brand-sub { display: none; }
  .hero h1 { font-size: 30px; }
}

@media (max-width: 640px) {
  :root { --topbar-h: 56px; }
  .topbar-inner { padding: 0 14px; gap: 12px; }
  .brand-sub { display: none; }
  .nav { display: none; }
  .menu-toggle { display: block; }

  .mobile-menu {
    display: block; background: #fff; border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .mobile-menu.open { max-height: 420px; }
  .mobile-menu a {
    display: block; padding: 14px 20px; color: var(--text); font-size: 16px; font-weight: 500;
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu a.active { color: var(--primary); background: var(--primary-light); }

  .app { padding: 20px 14px 40px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-title { font-size: 23px; }
  .hero { padding: 36px 22px; border-radius: 16px; }
  .hero h1 { font-size: 25px; }
  .hero p { font-size: 15px; }
  .card { padding: 18px; }
}

@media (min-width: 1200px) {
  .brand-sub { display: inline; }
}
