/* ============================================================
   AILEARN 门户 · 共享样式 (shared.css)
   所有页面都 link 这一份,保持风格统一
   设计 token、导航、hero 渐变背景、卡片、toast、footer 都在这里
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --ink: #0a2540;
  --ink2: #425466;
  --muted: #8898aa;
  --border: #e6ebf1;
  --card: #ffffff;
  --accent: #635bff;
  --bg: #fafbfc;
}
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ─── 招牌渐变网格背景 ─── */
.hero-wrap {
  position: relative;
  overflow: hidden;
  background: #0a2540;
  color: #fff;
  padding-bottom: 80px;
  margin-bottom: 80px;
}
.hero-wrap::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 85% 20%, #ffb36b 0%, transparent 40%),
    radial-gradient(700px 500px at 15% 10%, #ff4d8d 0%, transparent 45%),
    radial-gradient(900px 700px at 50% 90%, #8b5cf6 0%, transparent 50%),
    radial-gradient(500px 500px at 100% 100%, #22d3ee 0%, transparent 40%);
  opacity: 0.9;
}
.hero-wrap::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 80px;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.hero-wrap .wrap { position: relative; z-index: 1; }

/* 子页面用的"小 hero" —— 不那么占空间 */
.hero-wrap.hero-compact { padding-bottom: 50px; margin-bottom: 60px; }
.hero-wrap.hero-compact .hero { padding: 50px 0 20px; }
.hero-wrap.hero-compact .hero h1 { font-size: 52px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ─── Nav ─── */
header.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0 30px;
  position: relative; z-index: 2;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; letter-spacing: -0.3px;
  color: #fff; text-decoration: none;
}
.logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, #ff4d8d, #ffb36b);
}
nav ul { list-style: none; display: flex; gap: 30px; }
nav a {
  color: rgba(255,255,255,0.82); text-decoration: none;
  font-size: 14.5px; font-weight: 500; transition: color 0.15s;
}
nav a:hover { color: #fff; }
.nav-cta {
  padding: 8px 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 500;
  backdrop-filter: blur(10px);
  transition: background 0.15s;
}
.nav-cta:hover { background: rgba(255,255,255,0.22); }

.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #635bff 0%, #8b5cf6 50%, #ff4d8d 100%);
  background-size: 200% 200%;
  animation: navAvatarBreathe 6s ease-in-out infinite;
  color: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.18);
  box-shadow:
    0 4px 14px rgba(99, 91, 255, 0.45),
    0 0 0 3px rgba(255, 255, 255, 0.08);
  transition: transform 0.18s, box-shadow 0.22s;
  cursor: pointer;
}
.nav-avatar:hover {
  transform: scale(1.08);
  box-shadow:
    0 6px 22px rgba(99, 91, 255, 0.65),
    0 0 0 4px rgba(255, 255, 255, 0.15);
}
@keyframes navAvatarBreathe {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ─── Hero ─── */
.hero { padding: 80px 0 40px; max-width: 820px; }
.hero .eyebrow {
  display: inline-block;
  font-size: 12.5px; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.85);
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}
.hero h1 {
  font-size: 72px; line-height: 1.02; letter-spacing: -2.5px;
  font-weight: 800; margin-bottom: 28px;
  color: #fff;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #ffb36b 0%, #ff4d8d 50%, #8b5cf6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 20px; max-width: 640px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
}
.hero .cta-row { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

/* 面包屑(子页面用) */
.crumbs {
  color: rgba(255,255,255,0.75); font-size: 13.5px;
  padding-top: 6px; display: flex; gap: 8px; align-items: center;
}
.crumbs a { color: rgba(255,255,255,0.75); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs .sep { opacity: 0.4; }

/* ─── 按钮 ─── */
.btn-primary {
  padding: 13px 26px; background: #fff; color: #0a2540;
  border: none; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.btn-ghost {
  padding: 13px 26px;
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px; font-size: 15px; font-weight: 500;
  text-decoration: none; backdrop-filter: blur(10px);
  transition: background 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
.btn-ink {
  padding: 13px 26px;
  background: var(--ink); color: #fff;
  border: none; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-ink:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10,37,64,0.2); }

/* ─── 小节标题 ─── */
.section-head { margin-bottom: 40px; text-align: center; }
.section-head .kicker {
  color: var(--accent); font-weight: 600; font-size: 13px;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: 42px; letter-spacing: -1.2px; font-weight: 700;
  color: var(--ink); margin-bottom: 14px;
}
.section-head p {
  font-size: 17px; color: var(--ink2); max-width: 640px; margin: 0 auto;
}

/* ─── 特性卡片 ─── */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 100px;
}
.features.cols-2 { grid-template-columns: repeat(2, 1fr); }
.features.cols-3 { grid-template-columns: repeat(3, 1fr); }
.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(10, 37, 64, 0.08);
  border-color: transparent;
}
.feature.soon { cursor: pointer; }
.feature.soon:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10, 37, 64, 0.05); }
.feature .iconwrap {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
  margin-bottom: 16px;
  color: #fff;
}
/* 8 种配色,轮替使用,顺序和首页 8 张卡对应 */
.feature.c-orange  .iconwrap { background: linear-gradient(135deg, #ffb36b, #ff9055); }
.feature.c-blue    .iconwrap { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.feature.c-green   .iconwrap { background: linear-gradient(135deg, #34d399, #10b981); }
.feature.c-pink    .iconwrap { background: linear-gradient(135deg, #f472b6, #ec4899); }
.feature.c-purple  .iconwrap { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.feature.c-amber   .iconwrap { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.feature.c-cyan    .iconwrap { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.feature.c-rose    .iconwrap { background: linear-gradient(135deg, #fb7185, #f43f5e); }

/* 兼容老首页:如果没指定 .c-* 类,用 nth-child 自动轮替 */
.features > .feature:not([class*=" c-"]):not([class^="c-"]):nth-child(1) .iconwrap { background: linear-gradient(135deg, #ffb36b, #ff9055); }
.features > .feature:not([class*=" c-"]):not([class^="c-"]):nth-child(2) .iconwrap { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.features > .feature:not([class*=" c-"]):not([class^="c-"]):nth-child(3) .iconwrap { background: linear-gradient(135deg, #34d399, #10b981); }
.features > .feature:not([class*=" c-"]):not([class^="c-"]):nth-child(4) .iconwrap { background: linear-gradient(135deg, #f472b6, #ec4899); }
.features > .feature:not([class*=" c-"]):not([class^="c-"]):nth-child(5) .iconwrap { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.features > .feature:not([class*=" c-"]):not([class^="c-"]):nth-child(6) .iconwrap { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.features > .feature:not([class*=" c-"]):not([class^="c-"]):nth-child(7) .iconwrap { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.features > .feature:not([class*=" c-"]):not([class^="c-"]):nth-child(8) .iconwrap { background: linear-gradient(135deg, #fb7185, #f43f5e); }

.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.2px; }
.feature p { font-size: 14px; color: var(--ink2); line-height: 1.55; flex: 1; }
.feature .cta-line {
  margin-top: 14px;
  font-size: 13px; font-weight: 500;
  color: var(--accent);
  display: flex; align-items: center; gap: 4px;
  opacity: 0.9;
}
.feature.soon .cta-line { color: var(--muted); }
.feature .cta-line .arrow { transition: transform 0.15s; }
.feature:hover .cta-line .arrow { transform: translateX(3px); }

.feature .badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 10.5px; letter-spacing: 0.6px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
}
.badge.live { background: #ecfdf5; color: #047857; }
.badge.soon { background: #f1f5f9; color: #64748b; }
.badge.new  { background: #fef3c7; color: #92400e; }

/* ─── 大尺寸卡片(子页面做 "4 科选择" 这种场景) ─── */
.big-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 80px;
}
@media (max-width: 720px) { .big-cards { grid-template-columns: 1fr; } }
.big-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px 32px;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
  min-height: 200px;
}
.big-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(10, 37, 64, 0.10); }
.big-card .iconwrap {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px; color: #fff;
  margin-bottom: 6px;
}
.big-card.c-orange .iconwrap { background: linear-gradient(135deg, #ffb36b, #ff9055); }
.big-card.c-blue   .iconwrap { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.big-card.c-green  .iconwrap { background: linear-gradient(135deg, #34d399, #10b981); }
.big-card.c-purple .iconwrap { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.big-card.c-pink   .iconwrap { background: linear-gradient(135deg, #f472b6, #ec4899); }
.big-card.c-cyan   .iconwrap { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.big-card h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.big-card p { color: var(--ink2); font-size: 14.5px; line-height: 1.6; flex: 1; }
.big-card .row {
  margin-top: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px;
}
.big-card .cta-line { color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.big-card.soon .cta-line { color: var(--muted); }
.big-card:hover .cta-line .arrow { transform: translateX(3px); }
.big-card .cta-line .arrow { transition: transform 0.15s; display: inline-block; }

/* ─── "即将上线" 通用空状态块 ─── */
.empty-state {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 80px 40px;
  text-align: center;
  margin-bottom: 80px;
}
.empty-state .big-icon {
  width: 88px; height: 88px; border-radius: 22px;
  margin: 0 auto 22px;
  display: grid; place-items: center; font-size: 40px; color: #fff;
}
.empty-state h2 { font-size: 30px; letter-spacing: -0.8px; font-weight: 700; margin-bottom: 10px; }
.empty-state p { color: var(--ink2); max-width: 520px; margin: 0 auto 22px; font-size: 16px; }

/* ─── Stats ─── */
.stats {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 100px;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: 36px; font-weight: 700; letter-spacing: -1px;
  background: linear-gradient(90deg, #635bff, #ff4d8d);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat span { color: var(--ink2); font-size: 14px; }

/* ─── 考试倒计时表(exams.html 用) ─── */
.exam-table {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 80px;
}
.exam-row {
  display: grid;
  grid-template-columns: 80px 1fr auto 140px;
  gap: 16px; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.exam-row:last-child { border-bottom: none; }
.exam-row:hover { background: #fafbfc; }
.exam-row.head {
  background: #f6f9fc;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.exam-row.head:hover { background: #f6f9fc; }
.exam-days {
  font-size: 24px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.exam-days.urgent { color: #dc2626; }
.exam-days.soon { color: #ea580c; }
.exam-title { font-weight: 600; color: var(--ink); }
.exam-sub   { color: var(--ink2); font-size: 13px; margin-top: 2px; }
.exam-date  { color: var(--ink2); font-size: 13.5px; }
.exam-code  {
  display: inline-block;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.6px;
  padding: 3px 10px; border-radius: 999px;
  background: #eef2ff; color: #4338ca;
  text-align: center; min-width: 72px;
}
@media (max-width: 720px) {
  .exam-row { grid-template-columns: 60px 1fr; }
  .exam-row .exam-date, .exam-row .exam-code { grid-column: 2; }
}

/* ─── Toast ─── */
#toast {
  position: fixed; bottom: 36px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #0a2540; color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(10, 37, 64, 0.25);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 999;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ─── Footer ─── */
footer.foot {
  border-top: 1px solid var(--border);
  padding: 28px 0 50px;
  color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
footer.foot a { color: var(--muted); text-decoration: none; }
footer.foot a:hover { color: var(--ink2); }

/* footer 联系我们(由 shared.js 注入) */
footer.foot.foot-has-contact {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.foot-contact-row {
  text-align: center;
  font-size: 14px;
  color: var(--ink2);
  padding: 4px 0;
}
.foot-contact-row .foot-contact-label {
  color: var(--muted);
  margin-right: 4px;
}
.foot-contact-row a {
  color: var(--accent) !important;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.foot-contact-row a:hover { opacity: 0.85; }
.foot-contact-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 12.5px;
  margin-left: 4px;
}
.foot-bottom-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ─── 内测公告弹窗(由 shared.js 注入) ─── */
.announce-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 37, 64, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 20px;
}
.announce-overlay.announce-show { opacity: 1; }
.announce-overlay.announce-fade-out { opacity: 0; }

.announce-modal {
  position: relative;
  background: var(--card);
  border-radius: 18px;
  max-width: 460px;
  width: 100%;
  padding: 38px 36px 30px;
  box-shadow: 0 20px 60px rgba(10, 37, 64, 0.25);
  text-align: center;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s cubic-bezier(.2,.7,.3,1);
}
.announce-overlay.announce-show .announce-modal {
  transform: translateY(0) scale(1);
}

.announce-close {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px;
  background: transparent; border: none;
  color: var(--muted); font-size: 24px; line-height: 1;
  cursor: pointer; border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}
.announce-close:hover { background: var(--bg); color: var(--ink); }

.announce-emoji {
  font-size: 44px;
  margin-bottom: 8px;
  line-height: 1;
}
.announce-title {
  font-size: 22px; font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.announce-body {
  font-size: 15px; line-height: 1.7;
  color: var(--ink2);
  margin-bottom: 20px;
}
.announce-body strong {
  color: var(--accent);
  font-weight: 600;
}

.announce-contact {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px 18px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.55;
}
.announce-contact-label {
  display: block;
  margin-bottom: 6px;
}
.announce-phone {
  display: inline-block;
  font-size: 19px; font-weight: 700;
  color: var(--accent) !important;
  text-decoration: none;
  letter-spacing: 0.6px;
}
.announce-phone:hover { opacity: 0.9; }
.announce-wechat {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

.announce-ok {
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  padding: 12px 32px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}
.announce-ok:hover { opacity: 0.9; }
.announce-ok:active { transform: scale(0.98); }

@media (max-width: 520px) {
  .announce-modal { padding: 32px 22px 26px; }
  .announce-title { font-size: 20px; }
  .announce-body { font-size: 14.5px; }
  .announce-phone { font-size: 18px; }
}

/* ─── 响应式 ─── */
@media (max-width: 960px) {
  .features, .stats { grid-template-columns: repeat(2, 1fr); }
  .features.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 48px; }
  .hero-wrap.hero-compact .hero h1 { font-size: 40px; }
}
@media (max-width: 520px) {
  .features, .features.cols-2, .features.cols-3, .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .hero-wrap.hero-compact .hero h1 { font-size: 32px; }
  nav ul { display: none; }
  .stats { padding: 24px 18px; }
}
