/* ============================================================
   線上學習平台首頁 · 阿里云活动页风格设计系统
   设计 DNA：阿里云蓝 #1366EC → 紫 #856EFA → 珊瑚 #FFA091 签名渐变
   浅蓝底 #E6EEFC / 大圆角 16-24px / 柔和投影 / 胶囊按钮
   ============================================================ */

:root {
  --primary: #1366ec;
  --primary-deep: #1154c0;
  --primary-soft: #3080ff;
  --violet: #856efa;
  --coral: #ffa091;
  --orange: #ff6a00;

  --grad-text: linear-gradient(85deg, #1366ec 0%, #856efa 69%, #ffa091 99%);
  --grad-btn: linear-gradient(135deg, #3080ff 0%, #1366ec 100%);
  --grad-orange: linear-gradient(135deg, #ff9500 0%, #ff6a00 100%);
  --grad-soft: linear-gradient(270deg, #efeefe 0%, #e5effd 100%);
  --grad-page: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);

  --bg: #f7f9fc;
  --tint: #e6eefc;
  --tint-deep: #e8effd;
  --surface: #ffffff;

  --title: #16192c;
  --text: #5e6470;
  --muted: #727c8d;
  --line: #e0e6f0;

  --price: #ff4b4b;
  --free: #00b365;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --pill: 999px;

  --shadow-sm: 0 1px 2px rgba(19, 32, 77, 0.05), 0 4px 16px rgba(19, 32, 77, 0.06);
  --shadow-md: 0 4px 8px rgba(19, 32, 77, 0.06), 0 12px 32px rgba(19, 32, 77, 0.1);
  --shadow-lg: 0 8px 16px rgba(19, 32, 77, 0.08), 0 20px 48px rgba(19, 32, 77, 0.14);

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1160px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Noto Sans SC", "Source Han Sans SC", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--grad-page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.icon { width: 1em; height: 1em; fill: currentColor; display: block; }

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

/* 渐变强调文字（阿里云签名手法） */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================== Header ============================== */

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(19, 102, 236, 0.08);
  color: var(--title);
}

.header-inner {
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: var(--header-h);
  flex: none;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-nav { display: flex; align-items: center; height: var(--header-h); }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: var(--header-h);
  padding: 0 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 150ms var(--ease);
}

.nav-link .caret { width: 10px; height: 10px; opacity: 0.6; }

.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--grad-text);
  opacity: 0;
  transform: scaleX(0.4);
  transition: all 200ms var(--ease);
}

.nav-link:hover,
.menu:hover > .nav-link { color: var(--primary); }
.nav-link:hover::after,
.menu:hover > .nav-link::after { opacity: 1; transform: scaleX(1); }

.menu { position: relative; height: var(--header-h); }

.menu-panel {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  min-width: 168px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid rgba(19, 102, 236, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 40;
  animation: dropIn 200ms var(--ease);
}

.menu-panel a {
  display: block;
  margin: 0 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  white-space: nowrap;
  font-size: 14px;
  transition: all 150ms var(--ease);
}

.menu-panel a:hover { background: var(--tint); color: var(--primary); }
.menu:hover > .menu-panel,
.menu.is-open > .menu-panel { display: block; }

.news-menu { min-width: 360px; }

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.search {
  display: flex;
  align-items: center;
  width: 200px;
  height: 38px;
  padding: 0 6px 0 16px;
  background: #f2f5fa;
  border: 1px solid transparent;
  border-radius: var(--pill);
  transition: all 200ms var(--ease);
}

.search:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(19, 102, 236, 0.12);
}

.search input {
  flex: 1;
  width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: var(--title);
}

.search input::placeholder { color: #aab3c5; }

.search button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #7c8699;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  border-radius: 50%;
  transition: all 150ms var(--ease);
}

.search button:hover { color: var(--primary); background: var(--tint); }

.tool-menu { position: relative; height: var(--header-h); display: flex; align-items: center; }

.admin-toggle {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--pill);
  background: var(--grad-btn);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(19, 102, 236, 0.28);
  transition: all 200ms var(--ease);
}

.admin-toggle:hover,
.tool-menu.is-open .admin-toggle {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(19, 102, 236, 0.36);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 19px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  transition: all 150ms var(--ease);
}

.icon-btn:hover { color: var(--primary); background: var(--tint); }

.avatar-btn {
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  background: var(--tint);
  transition: box-shadow 200ms var(--ease);
}

.avatar-btn:hover { box-shadow: 0 0 0 3px rgba(19, 102, 236, 0.25); }

.avatar-btn img,
.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.dropdown {
  display: none;
  position: absolute;
  top: calc(var(--header-h) - 6px);
  right: 0;
  background: #fff;
  border: 1px solid rgba(19, 102, 236, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  color: var(--text);
  z-index: 50;
  animation: dropIn 200ms var(--ease);
}

@keyframes dropIn {
  from { transform: translateY(-6px); }
  to { transform: translateY(0); }
}

.tool-menu.is-open .dropdown { display: block; }

.admin-dropdown { min-width: 150px; padding: 8px 0; }
.admin-dropdown a {
  display: block;
  margin: 0 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: all 150ms var(--ease);
}
.admin-dropdown a:hover { background: var(--tint); color: var(--primary); }

/* 身份入口下拉（首页「管理后台」）：管理后台 / 我的教育 / 我的学习 */
.id-dropdown { min-width: 236px; padding: 8px; }
.id-dropdown-hd {
  padding: 6px 10px 8px;
  font-size: 11.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.id-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
}
.id-dropdown a b { flex: none; font-size: 13.5px; font-weight: 600; color: var(--text); }
.id-dropdown a small {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.id-dropdown a:hover { background: var(--tint); text-decoration: none; }
.id-dropdown a.is-current { background: var(--tint); }
.id-dropdown a.is-current b { color: var(--primary); }
.id-check {
  flex: none;
  font-style: normal;
  font-size: 11px;
  color: var(--primary);
  background: rgba(19, 102, 236, 0.10);
  border-radius: 999px;
  padding: 1px 7px;
}

.notify-dropdown { width: 360px; right: -40px; }
.notify-tabs { display: flex; padding: 0 8px; border-bottom: 1px solid var(--line); }
.notify-tabs button {
  flex: 1;
  height: 46px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.notify-tabs button.is-active {
  color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}
.notify-empty { padding: 28px 20px 12px; text-align: center; }
.notify-empty img { width: 120px; margin: 0 auto 12px; border-radius: var(--radius); }
.notify-empty p { margin: 0; color: var(--muted); }
.notify-foot {
  display: block;
  text-align: center;
  padding: 13px;
  border-top: 1px solid var(--line);
  color: var(--primary);
  font-weight: 500;
}
.notify-foot:hover { background: var(--tint); }

.user-dropdown { width: 280px; padding: 20px 20px 0; }
.user-brief { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.user-brief img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.user-brief strong { display: block; color: var(--title); font-size: 16px; font-weight: 700; }
.user-brief span,
.user-brief p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.user-brief a { color: var(--primary); }
.user-links { display: flex; border-top: 1px solid var(--line); }
.user-links a,
.logout {
  display: block;
  text-align: center;
  color: var(--text);
  padding: 14px 8px;
  transition: color 150ms var(--ease);
}
.user-links a { flex: 1; }
.user-links a:hover,
.logout:hover { color: var(--primary); background: var(--tint); }
.logout { border-top: 1px solid var(--line); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  margin-left: 4px;
  border: 0;
  background: transparent;
  color: var(--title);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* ============================== Hero ============================== */

.hero { padding: 20px 0 8px; }

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  min-height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(115deg, #ffffff 0%, #f4f7ff 42%, #e5effd 100%);
  border: 1px solid rgba(19, 102, 236, 0.08);
  box-shadow: var(--shadow-md);
  isolation: isolate;
}

/* 背景光斑，营造阿里云活动页的层次感 */
.hero-card::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: -120px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(133, 110, 250, 0.22) 0%, rgba(133, 110, 250, 0) 68%);
  z-index: 0;
  pointer-events: none;
}

.hero-media {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 26%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 26%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

/* 學段入口：全齡段定位的第一層表達，K12 四段 + 考公職考兩段並列 */
.stages { padding: 10px 0 6px; }

.stages-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 16px 20px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(19, 102, 236, 0.09);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  overflow: hidden;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), border-color 250ms var(--ease);
}

/* 左侧学段色条，六段各异但同属蓝紫体系 */
.stage-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #856efa 0%, #b9aefd 100%);
}

.stage-card:nth-child(2)::before { background: linear-gradient(180deg, #3080ff 0%, #1366ec 100%); }
.stage-card:nth-child(3)::before { background: linear-gradient(180deg, #0ea5c6 0%, #4cc9de 100%); }
.stage-card:nth-child(4)::before { background: var(--grad-orange); }
/* 成人兩段：改用深藍金，與 K12 區分開 */
.stage-card:nth-child(5)::before { background: linear-gradient(180deg, #1d3a7a 0%, #1366ec 100%); }
.stage-card:nth-child(6)::before { background: linear-gradient(180deg, #b8860b 0%, #e0a83a 100%); }

.stage-card.is-adult {
  background: linear-gradient(180deg, #fbfcff 0%, #f2f6ff 100%);
  border-color: rgba(19, 102, 236, 0.14);
}

.stage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(19, 102, 236, 0.22);
}

.stage-age {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.stage-card.is-adult .stage-age { color: #1d3a7a; }
.stage-card:nth-child(6).is-adult .stage-age { color: #a9750a; }

.stage-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--title);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.stage-desc {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 40px 56px 60px;
  max-width: 640px;
}

.hero-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--pill);
  background: rgba(19, 102, 236, 0.08);
  border: 1px solid rgba(19, 102, 236, 0.18);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-overlay h1 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(28px, 2.9vw, 40px);
  font-weight: 900;
  line-height: 1.28;
  color: var(--title);
  letter-spacing: -0.02em;
}

.hero-overlay h1 em {
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-overlay p {
  margin: 16px 0 0;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.02em;
}

.hero-actions { display: flex; gap: 14px; margin-top: 32px; }

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border-radius: var(--pill);
  background: var(--grad-btn);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(19, 102, 236, 0.32);
  transition: all 200ms var(--ease);
}

.btn-hero:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(19, 102, 236, 0.42);
}

.btn-hero:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--pill);
  border: 1.5px solid rgba(19, 102, 236, 0.35);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  color: var(--primary);
  font-size: 16px;
  font-weight: 500;
  transition: all 200ms var(--ease);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ============================== 区块标题 ============================== */

.section { background: transparent; padding-bottom: 8px; }
.dynamic {
  background: var(--grad-soft);
  border-radius: var(--radius-lg);
  margin: 32px auto 24px;
  width: min(calc(var(--container) + 48px), calc(100% - 16px));
}

.text-line { margin: 56px 0 28px; text-align: center; }

.text-line h2 {
  position: relative;
  margin: 0;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 900;
  color: var(--title);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.text-line h2 span {
  position: relative;
  z-index: 1;
  padding: 0;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-line h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: var(--grad-text);
}

.dynamic .text-line { margin-top: 40px; }
.dynamic .text-line h2::after { display: none; }

.subtitle { margin: 12px 0 0; font-size: 15px; color: var(--muted); }

/* ============================== 课程卡片 ============================== */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.course-card,
.class-card,
.teacher-card {
  background: #fff;
  border: 1px solid rgba(19, 102, 236, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 250ms var(--ease), transform 250ms var(--spring), border-color 250ms var(--ease);
}

.course-card:hover,
.class-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(19, 102, 236, 0.18);
}

.cover {
  position: relative;
  display: block;
  aspect-ratio: 270 / 152;
  background: var(--tint);
  overflow: hidden;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 统一多来源实拍图的色感，避免冷暖差异过大 */
  filter: saturate(0.92) contrast(1.03);
  transition: transform 400ms var(--ease);
}
.cover:hover img { transform: scale(1.04); }

.badge-trial {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--pill);
  background: var(--grad-btn);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  box-shadow: 0 4px 10px rgba(19, 102, 236, 0.3);
}
.badge-trial .icon { width: 12px; height: 12px; }

.live-time {
  position: absolute;
  left: 12px;
  right: auto;
  bottom: 12px;
  padding: 4px 12px;
  border-radius: var(--pill);
  background: rgba(22, 25, 44, 0.66);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
}

.card-body { padding: 14px 16px 16px; }

.card-title {
  margin: 0;
  color: var(--title);
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 150ms var(--ease);
}
.card-title a:hover { color: var(--primary); }

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  color: #9aa3b5;
  font-size: 12px;
}
.meta-count { display: inline-flex; align-items: center; gap: 4px; }
.price { color: var(--price); font-size: 13px; font-weight: 600; }
.price.is-free { color: var(--free); }

.more-wrap { text-align: center; margin: 32px 0 40px; }

.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 36px;
  border: 1.5px solid rgba(19, 102, 236, 0.3);
  border-radius: var(--pill);
  background: #fff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  transition: all 200ms var(--ease);
}

.more-btn:hover {
  background: var(--grad-btn);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(19, 102, 236, 0.3);
}

.more-btn .icon { width: 12px; height: 12px; }

/* ============================== 筛选器 ============================== */

.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.cats, .sort { display: flex; align-items: center; }
.cats { gap: 8px; flex-wrap: wrap; }

.cats button,
.sort button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  transition: all 200ms var(--ease);
}

.cats button {
  height: 36px;
  padding: 0 18px;
  border-radius: var(--pill);
  background: rgba(19, 102, 236, 0.06);
  color: var(--text);
  font-weight: 500;
}

.cats button:hover { background: var(--tint); color: var(--primary); }
.cats button.is-active {
  background: var(--grad-btn);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(19, 102, 236, 0.28);
}

.sort button {
  height: 36px;
  padding: 0 18px;
  background: rgba(19, 102, 236, 0.06);
  color: var(--muted);
  font-weight: 500;
}
.sort button:first-child { border-radius: var(--pill) 0 0 var(--pill); }
.sort button:last-child { border-radius: 0 var(--pill) var(--pill) 0; }
.sort button + button { margin-left: 1px; }
.sort button.is-active {
  position: relative;
  z-index: 1;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 0 1.5px var(--primary) inset;
}

/* ============================== 班级卡片 ============================== */

.class-card { position: relative; }
.class-card .card-body { padding: 14px 16px 16px; }
.class-card .card-title { white-space: normal; height: 48px; }

.badge-cert {
  display: inline-block;
  margin-right: 6px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--grad-orange);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  vertical-align: 1px;
}

.mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 25, 44, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 250ms var(--ease);
}
.cover:hover .mask,
.class-card:hover .mask { opacity: 1; }

.join {
  display: inline-block;
  padding: 10px 26px;
  border-radius: var(--pill);
  background: var(--grad-orange);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(255, 106, 0, 0.36);
  transition: all 200ms var(--ease);
}
.join:hover { filter: brightness(1.08); transform: translateY(-2px); color: #fff; }

/* ============================== 教师卡片 ============================== */

.teacher-card { padding: 32px 20px 26px; text-align: center; }
.teacher-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.teacher-card img {
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--tint);
}

.teacher-card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.teacher-card h3 a { color: var(--title); }
.teacher-card h3 a:hover { color: var(--primary); }
.teacher-role { margin-top: 6px; color: var(--muted); font-size: 12px; }

.teacher-about {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 22px;
  height: 66px;
  overflow: hidden;
}

.follow {
  display: inline-block;
  min-width: 88px;
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--pill);
  background: var(--grad-btn);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms var(--ease);
}

.follow:hover,
.follow.is-on {
  background: rgba(19, 102, 236, 0.1);
  color: var(--primary);
  box-shadow: none;
}

/* ============================== 考公職考 · 考試日曆 ============================== */

.exams { background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 62%); }

.exam-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.exam-card {
  position: relative;
  display: block;
  padding: 22px 22px 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(19, 102, 236, 0.09);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), border-color 250ms var(--ease);
}

.exam-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(19, 102, 236, 0.22);
}

.exam-card h3 {
  margin: 0;
  padding-right: 92px;
  font-size: 17px;
  font-weight: 800;
  color: var(--title);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.exam-sub {
  margin: 5px 0 16px;
  font-size: 12.5px;
  color: var(--muted);
}

.exam-status {
  position: absolute;
  right: 18px;
  top: 20px;
  padding: 3px 10px;
  border-radius: var(--pill);
  background: rgba(19, 102, 236, 0.09);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.exam-status.is-open { background: rgba(255, 122, 69, 0.12); color: #e2622a; }
.exam-status.is-urgent { background: rgba(229, 72, 77, 0.12); color: #d93a3f; }

.exam-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px dashed rgba(19, 102, 236, 0.12);
  font-size: 13px;
}

.exam-row span { color: var(--muted); flex: none; }
.exam-row b { color: var(--text); font-weight: 600; text-align: right; }

.exam-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.exam-link .icon { width: 14px; height: 14px; transition: transform 200ms var(--ease); }
.exam-card:hover .exam-link .icon { transform: translateX(3px); }

/* ============================== 会员 ============================== */

.vip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.vip-card {
  position: relative;
  display: block;
  height: 168px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint);
  transition: all 250ms var(--ease);
}
.vip-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.vip-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.vip-card:hover img { transform: scale(1.04); }

.vip-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 25, 44, 0) 42%, rgba(22, 25, 44, 0.6) 100%);
  z-index: 1;
}

.vip-name {
  position: absolute;
  left: 20px;
  bottom: 42px;
  z-index: 2;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.vip-desc {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
}

/* ============================== 动态 ============================== */

.dynamic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-bottom: 32px;
}

.panel {
  background: #fff;
  border: 1px solid rgba(19, 102, 236, 0.07);
  border-radius: var(--radius);
  min-height: 280px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.panel-hd h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--title);
  font-size: 16px;
  font-weight: 700;
}
.hot {
  color: var(--orange);
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(255, 106, 0, 0.35));
}
.more-icon { color: #c0c8d8; font-size: 18px; transition: color 150ms var(--ease); }
.more-icon:hover { color: var(--primary); }
.panel-bd { padding: 18px; }

.group-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}
.group-item { display: flex; gap: 10px; min-width: 0; }
.group-item img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  background: var(--tint);
}
.group-item strong {
  display: block;
  color: var(--title);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 150ms var(--ease);
}
.group-item strong:hover { color: var(--primary); }
.group-meta {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  color: #aab3c5;
  font-size: 12px;
}
.group-meta span { display: inline-flex; align-items: center; gap: 3px; }

.news-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.news-feature a {
  position: relative;
  display: block;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
}
.news-feature img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92) contrast(1.03); }
.news-feature span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8px 6px;
  background: linear-gradient(transparent, rgba(22, 25, 44, 0.7));
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-list li a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--text);
  transition: color 150ms var(--ease);
}
.news-list li:last-child a { border-bottom: 0; }
.news-list li a:hover { color: var(--primary); }
.news-list em { flex: none; color: #aab3c5; font-style: normal; font-size: 12px; }
.news-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.feed + .feed { margin-top: 16px; }
.feed { display: flex; gap: 12px; }
.feed img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--tint);
}
.feed-title { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.feed-title a { color: var(--title); font-weight: 500; }
.feed-title a:hover { color: var(--primary); }
.stars { color: #f5a623; letter-spacing: 1px; font-size: 12px; }
.feed p { margin: 4px 0 0; color: var(--text); }
.feed time { display: block; margin-top: 4px; color: #aab3c5; font-size: 12px; }

/* ============================== Promo / Footer ============================== */

.cta { padding: 8px 0 48px; }

.cta-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, #1154c0 0%, #1366ec 45%, #6c5ce7 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(19, 102, 236, 0.26);
}

.cta-card::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.cta-card::after {
  content: "";
  position: absolute;
  right: 60px;
  bottom: -180px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 160, 145, 0.45) 0%, rgba(255, 160, 145, 0) 70%);
}

.cta-copy { position: relative; z-index: 1; }
.cta-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 900;
  letter-spacing: -0.01em;
}
.cta-copy p { margin: 0; font-size: 15px; color: rgba(255, 255, 255, 0.82); }

.cta-card .btn-hero {
  position: relative;
  z-index: 1;
  flex: none;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 10px 24px rgba(6, 16, 52, 0.22);
}
.cta-card .btn-hero:hover { background: #fff; filter: none; transform: translateY(-2px); }

.footer {
  background: var(--grad-soft);
  border-top: 1px solid rgba(19, 102, 236, 0.08);
  color: var(--muted);
  text-align: center;
  padding: 28px 16px 32px;
  font-size: 13px;
}
.footer p { margin: 8px 0; }
.footer a { color: var(--primary); }
.footer a:hover { color: var(--primary-deep); text-decoration: underline; }

/* ============================== 悬浮客服 ============================== */

.consult {
  position: fixed;
  right: 20px;
  top: 50%;
  z-index: 60;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.consult-item { position: relative; }
.consult-item > button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--primary);
  font-size: 19px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(19, 102, 236, 0.1);
  transition: all 200ms var(--ease);
}
.consult-item > button:hover,
.consult-item > button.is-active {
  background: var(--grad-btn);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(19, 102, 236, 0.3);
}

.consult-pop {
  position: absolute;
  right: 56px;
  top: 0;
  width: 230px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(19, 102, 236, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 13px;
  animation: dropIn 200ms var(--ease);
}
.consult-pop[hidden] { display: none; }
.consult-pop strong { display: block; margin-bottom: 8px; color: var(--title); }
.consult-pop p { margin: 4px 0; }

/* ============================== 入场动效 ============================== */

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

.hero-card { animation: fadeUp 500ms var(--ease) both; }
.section .text-line { animation: fadeUp 500ms var(--ease) both; }
.grid-4 > *, .vip-grid > *, .dynamic-grid > .panel { animation: fadeUp 550ms var(--ease) both; }
.grid-4 > *:nth-child(2), .vip-grid > *:nth-child(2), .dynamic-grid > .panel:nth-child(2) { animation-delay: 80ms; }
.grid-4 > *:nth-child(3), .dynamic-grid > .panel:nth-child(3) { animation-delay: 160ms; }
.grid-4 > *:nth-child(4) { animation-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================== 响应式 ============================== */

@media (max-width: 1100px) {
  .stages-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    box-shadow: var(--shadow-md);
    padding: 8px 0 16px;
    max-height: calc(100vh - var(--header-h));
    overflow: auto;
  }
  .header.is-nav-open .main-nav { display: flex; }
  .menu { height: auto; }
  .nav-link { height: 44px; color: var(--title); }
  .nav-link::after { display: none; }
  .menu-panel,
  .menu:hover > .menu-panel {
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    min-width: 0;
    padding: 0 0 8px 16px;
  }
  .news-menu { min-width: 0; }
  .menu-panel a { white-space: normal; color: var(--text); padding: 7px 16px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .exam-grid { grid-template-columns: repeat(2, 1fr); }
  .vip-grid { grid-template-columns: repeat(2, 1fr); }
  .vip-card { height: 150px; }
  .header-tools { gap: 10px; }
  .search { width: 150px; }
  .notify-dropdown { right: 0; width: min(360px, calc(100vw - 24px)); }
  .hero-card { grid-template-columns: 1fr 0.8fr; min-height: 360px; }
  .hero-overlay { padding: 40px 28px; }
}

@media (max-width: 768px) {
  .hero { padding-top: 12px; }
  .hero-card {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: var(--radius);
  }
  .hero-overlay { padding: 32px 24px 26px; max-width: 100%; }
  .hero-overlay h1 { font-size: 28px; }
  .hero-actions { margin-top: 24px; }
  .hero-media {
    height: 208px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 34%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 34%);
  }
  .hero-media img { object-position: center 30%; }
  .hero-card {
    background:
      radial-gradient(120% 90% at 100% 0%, rgba(133, 110, 250, 0.22) 0%, rgba(133, 110, 250, 0) 60%),
      linear-gradient(160deg, #ffffff 0%, #f4f7ff 55%, #e5effd 100%);
  }
  .btn-hero, .btn-ghost { height: 42px; font-size: 14px; padding: 0 22px; }
  .text-line { margin: 36px 0 20px; }
  .text-line h2::after { margin-top: 10px; }
  .dynamic { width: calc(100% - 16px); margin: 20px auto 16px; }
  .dynamic-grid,
  .group-list,
  .news-feature { grid-template-columns: 1fr; }
  .vip-grid { grid-template-columns: 1fr; }
  .vip-card { height: 140px; }
  .stages { padding: 6px 0 2px; }
  .stages-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stage-card { padding: 16px 14px 18px 18px; }
  .stage-name { font-size: 16px; }
  .stage-desc { font-size: 11.5px; line-height: 1.5; }
  .exam-grid { grid-template-columns: 1fr; gap: 12px; }
  .exam-card { padding: 18px 18px 14px; }
  .exam-card h3 { font-size: 16px; padding-right: 86px; }
  .search { display: none; }
  .admin-menu { display: none; }
  .class-card .card-title { height: auto; }
  .consult {
    right: 10px;
    top: auto;
    bottom: 14px;
    transform: none;
    flex-direction: column;
    gap: 6px;
  }
  .consult-item > button { width: 36px; height: 36px; }
  .consult-pop { right: 44px; bottom: 0; top: auto; }
  .cta { padding: 4px 0 28px; }
  .cta-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 24px;
    border-radius: var(--radius);
  }
}
