/* ============================================================
   会员体系增强 v2 样式（登录分栏 / 导航搜索 / 搜索页 / 时间线 /
   VIP主推 / 评论 / 进度条 / 成长体系 / Toast / 首页动效 / 深色模式）
   ============================================================ */

/* ---------- 登录/注册分栏页 ---------- */
.auth-body { background: linear-gradient(135deg, #E6F7FF 0%, #F4FAFF 50%, #FFF9E6 100%); }
.auth-wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; max-width: 1020px;
  margin: 0 auto; min-height: 100vh; padding: 24px 16px; align-items: center;
}
.auth-brand {
  background: linear-gradient(150deg, #2E7CC4 0%, #4A9FE8 55%, #7FC4F5 100%);
  border-radius: 24px 0 0 24px; color: #fff; padding: 54px 46px;
  position: relative; overflow: hidden; height: 100%; min-height: 540px;
  display: flex; flex-direction: column;
}
.auth-brand::before, .auth-brand::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.10);
}
.auth-brand::before { width: 220px; height: 220px; top: -70px; right: -60px; }
.auth-brand::after { width: 300px; height: 300px; bottom: -120px; left: -100px; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; position: relative; z-index: 1; }
.auth-logo .logo-icon { width: 34px; height: 34px; background: rgba(255,255,255,.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.auth-brand h1 { font-size: 30px; line-height: 1.3; margin: 30px 0 14px; position: relative; z-index: 1; }
.auth-slogan { font-size: 14px; opacity: .92; line-height: 1.7; position: relative; z-index: 1; }
.auth-features { list-style: none; margin: 22px 0 0; padding: 0; position: relative; z-index: 1; }
.auth-features li { padding: 6px 0; font-size: 13.5px; opacity: .95; }
.auth-robot { margin-top: auto; text-align: center; position: relative; z-index: 1; animation: floaty 4s ease-in-out infinite; }
.auth-card { background: #fff; border-radius: 0 24px 24px 0; box-shadow: 0 20px 50px rgba(46,124,196,.18); padding: 46px 44px; display: flex; align-items: center; }
.auth-card-inner { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-card h2 { font-size: 24px; color: var(--blue-deep); margin: 0 0 4px; }
.auth-sub { color: #999; font-size: 13.5px; margin: 0 0 18px; }
.auth-err { background: #ffecec; border: 1px solid #f0c0c0; color: #a13; padding: 9px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > span { position: absolute; left: 12px; font-size: 15px; opacity: .75; pointer-events: none; }
.input-icon .f-input { padding-left: 38px; padding-right: 42px; }
.pwd-toggle { position: absolute; right: 8px; border: none; background: none; cursor: pointer; font-size: 16px; opacity: .6; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-img { height: 42px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.auth-hint { color: #bbb; font-size: 12px; font-weight: normal; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13.5px; color: #888; }
.auth-switch a { color: var(--blue-deep); font-weight: 600; }
.auth-back { display: block; text-align: center; margin-top: 10px; font-size: 12.5px; color: #999; }

/* ---------- 导航：积分 / 深色按钮 ---------- */
.nav-badge.points { background: linear-gradient(135deg, #7F8CFF, #5F6CF0); color: #fff; }
.nav-theme { border: 1px solid var(--border); background: #fff; color: var(--text-main); border-radius: 50%; width: 31px; height: 31px; cursor: pointer; font-size: 15px; line-height: 1; transition: all .2s; }
.nav-theme:hover { transform: rotate(20deg) scale(1.08); }

/* ---------- 课程搜索页 ---------- */
.search-list { display: flex; flex-direction: column; gap: 10px; }
.search-item { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); transition: all .2s; }
.search-item:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(74,159,232,.16); text-decoration: none; }
.search-item.locked { opacity: .78; }
.search-item .si-num { min-width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-main), #7FC4F5); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.search-item.locked .si-num { background: #ccc; }
.search-item .si-main { flex: 1; min-width: 0; }
.search-item .si-title { font-weight: 600; color: var(--text-main); font-size: 14.5px; }
.search-item .si-tag { display: inline-block; background: var(--blue-bg); color: var(--blue-deep); border-radius: 12px; padding: 0 9px; font-size: 11.5px; margin-right: 8px; vertical-align: 1px; }
.search-item .si-snippet { color: #999; font-size: 12.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item .si-status { color: var(--blue-deep); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.search-item.locked .si-status { color: #bbb; }

/* ---------- 学习路径时间线（首页） ---------- */
.path-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px; margin: 0 0 22px; }
.path-track { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.path-node { flex: 1; text-align: center; position: relative; }
.path-node .pn-ico { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 8px; background: #EFF5FB; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 24px; transition: all .3s; }
.path-node .pn-name { font-size: 13px; font-weight: 700; color: var(--text-sub); }
.path-node .pn-range { font-size: 11px; color: #aaa; }
.path-node .pn-line { position: absolute; top: 26px; left: calc(50% + 30px); width: calc(100% - 60px); height: 3px; background: var(--border); border-radius: 2px; }
.path-node:last-child .pn-line { display: none; }
.path-node.open .pn-ico { background: linear-gradient(135deg, var(--blue-main), #7FC4F5); border-color: transparent; box-shadow: 0 4px 12px rgba(74,159,232,.35); animation: pulseGlow 2s ease-in-out infinite; }
.path-node.open .pn-name { color: var(--blue-deep); }
.path-node.open .pn-line { background: linear-gradient(90deg, var(--blue-main), var(--green-main)); }
.path-node.done .pn-ico { background: linear-gradient(135deg, var(--green-main), #8BD18B); border-color: transparent; }
.path-node.done .pn-line { background: var(--green-main); }
.path-node.locked .pn-ico { opacity: .7; }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 4px 12px rgba(74,159,232,.35); } 50% { box-shadow: 0 6px 22px rgba(74,159,232,.6); } }

/* ---------- 首页公告栏 ---------- */
.notice-bar { background: linear-gradient(135deg, #FFF9E6, #FFF4D6); border: 1px solid #F2E2B8; border-radius: 12px; padding: 12px 18px; margin: 0 0 20px; display: flex; align-items: flex-start; gap: 12px; }
.notice-bar .nb-ico { font-size: 20px; }
.notice-bar .nb-title { font-weight: 700; color: #8a6d1a; font-size: 14px; }
.notice-bar .nb-content { color: #7a6a3a; font-size: 13px; white-space: pre-line; }

/* ---------- VIP 页主推款 ---------- */
.vip-hero { background: linear-gradient(135deg, #2E7CC4, #4A9FE8 60%, #7FC4F5); border-radius: 20px; padding: 34px 30px; color: #fff; text-align: center; margin: 0 0 22px; position: relative; overflow: hidden; }
.vip-hero::after { content: "💎"; position: absolute; font-size: 120px; right: -18px; top: -20px; opacity: .15; transform: rotate(-15deg); }
.vip-hero h2 { font-size: 24px; margin: 0 0 8px; }
.vip-hero p { opacity: .92; font-size: 14px; margin: 0; }
.vip-card { position: relative; }
.vip-card .hot-flag { position: absolute; top: -12px; right: 14px; background: linear-gradient(135deg, #f6c453, #f0a32c); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 12px; box-shadow: 0 3px 8px rgba(240,163,44,.4); }
.vip-card.hot { border-color: #f0c453; box-shadow: 0 8px 26px rgba(240,196,83,.28); }
.vip-card.hot .vip-name { color: #b8860b; }
.vip-price b { color: #d98324; }
.vip-card.hot .vip-price b { color: #e08a1e; }
.vip-compare { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 13.5px; }
.vip-compare th, .vip-compare td { padding: 12px 16px; border-bottom: 1px solid #E6F0F8; text-align: center; }
.vip-compare th { background: var(--blue-bg); color: var(--blue-deep); font-weight: 700; }
.vip-compare td:first-child { text-align: left; color: #666; font-weight: 600; background: #FBFDFF; }
.vip-compare tr:last-child td { border-bottom: none; }

/* ---------- 课程页评论 ---------- */
.comments-section { margin-top: 26px; }
.comments-section h3 { display: flex; align-items: center; gap: 8px; color: var(--blue-deep); font-size: 18px; margin: 0 0 12px; }
.comment-form { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.comment-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; font-family: inherit; resize: vertical; min-height: 64px; outline: none; }
.comment-form textarea:focus { border-color: var(--blue-main); }
.comment-form .cmt-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.comment-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.comment-item .ci-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-item .ci-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-main), #7FC4F5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.comment-item .ci-name { font-weight: 600; font-size: 13.5px; }
.comment-item .ci-time { color: #aaa; font-size: 12px; }
.comment-item .ci-content { color: var(--text-main); font-size: 14px; line-height: 1.7; }
.comment-item.is-admin .ci-avatar { background: linear-gradient(135deg, #F5C453, #F0A32C); }
.cmt-btn { background: linear-gradient(135deg, var(--blue-main), #7FC4F5); color: #fff; border: none; border-radius: 18px; padding: 7px 22px; font-size: 13px; cursor: pointer; font-family: inherit; }
.cmt-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(74,159,232,.3); }
.cmt-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ---------- 课程页顶部进度条 ---------- */
.lesson-progress { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; margin: 0 0 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lesson-progress .lp-info { flex: 1; min-width: 200px; }
.lesson-progress .lp-title { font-weight: 700; color: var(--blue-deep); font-size: 14.5px; }
.lesson-progress .lp-sub { color: #999; font-size: 12.5px; margin-top: 2px; }
.lesson-progress .lp-bar { flex: 2; min-width: 200px; height: 10px; background: var(--blue-bg); border-radius: 6px; overflow: hidden; }
.lesson-progress .lp-fill { height: 100%; background: linear-gradient(90deg, var(--blue-main), var(--green-main)); border-radius: 6px; transition: width .5s ease; }
.lesson-progress .lp-pct { font-size: 13px; font-weight: 700; color: var(--blue-deep); }

/* ---------- 个人中心成长体系 ---------- */
.level-hero { background: linear-gradient(135deg, #2E7CC4, #4A9FE8 60%, #7FC4F5); border-radius: 18px; padding: 26px 28px; color: #fff; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-bottom: 22px; }
.level-hero .lh-emoji { font-size: 58px; line-height: 1; }
.level-hero .lh-main { flex: 1; min-width: 220px; }
.level-hero .lh-level { font-size: 13px; opacity: .9; letter-spacing: 2px; }
.level-hero .lh-name { font-size: 24px; font-weight: 800; margin: 2px 0 10px; }
.level-hero .lh-bar { height: 12px; background: rgba(255,255,255,.25); border-radius: 8px; overflow: hidden; }
.level-hero .lh-fill { height: 100%; background: linear-gradient(90deg, #F5C453, #F0A32C); border-radius: 8px; transition: width .6s ease; }
.level-hero .lh-tip { font-size: 12px; margin-top: 8px; opacity: .92; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-mini { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat-mini .sm-num { font-size: 26px; font-weight: 800; color: var(--blue-deep); }
.stat-mini .sm-label { color: #999; font-size: 12.5px; margin-top: 2px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 12px; text-align: center; }
.badge-item .bd-emoji { font-size: 34px; }
.badge-item .bd-name { font-weight: 700; font-size: 13.5px; margin-top: 6px; }
.badge-item .bd-desc { color: #999; font-size: 12px; margin-top: 2px; }
.badge-item.locked { opacity: .4; filter: grayscale(1); }
.checkin-btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #f6c453, #f0a32c); color: #fff; border: none; border-radius: 22px; padding: 10px 26px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: 0 4px 12px rgba(240,163,44,.35); transition: all .2s; }
.checkin-btn:hover { transform: translateY(-2px); }
.checkin-btn:disabled { background: #d5d5d5; box-shadow: none; cursor: default; transform: none; }
.my-course-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; transition: all .2s; }
.my-course-card:hover { border-color: var(--blue-main); transform: translateX(3px); text-decoration: none; }
.my-course-card .mc-num { min-width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-main), #7FC4F5); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.my-course-card.done .mc-num { background: linear-gradient(135deg, var(--green-main), #8BD18B); }
.my-course-card.locked .mc-num { background: #ccc; }
.my-course-card .mc-main { flex: 1; }
.my-course-card .mc-title { font-weight: 600; font-size: 14px; }
.my-course-card .mc-sub { color: #999; font-size: 12px; }
.my-course-card .mc-status { font-size: 12.5px; color: var(--blue-deep); font-weight: 600; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 74px; left: 50%; transform: translateX(-50%) translateY(-16px); background: rgba(45,58,74,.94); color: #fff; padding: 10px 22px; border-radius: 24px; font-size: 13.5px; z-index: 9999; opacity: 0; pointer-events: none; transition: all .3s; box-shadow: 0 8px 22px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: rgba(45,135,69,.94); }

/* ---------- 首页 Hero 增强 ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; }
.hero::before { width: 240px; height: 240px; background: radial-gradient(circle, rgba(74,159,232,.16), transparent 70%); top: -60px; left: -60px; }
.hero::after { width: 260px; height: 260px; background: radial-gradient(circle, rgba(245,196,83,.16), transparent 70%); bottom: -80px; right: -60px; }
.hero > * { position: relative; z-index: 1; }
.hero .robot { animation: floaty 3.6s ease-in-out infinite; display: inline-block; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero .cta:hover { box-shadow: 0 6px 22px rgba(74,159,232,.55); }
.container { animation: pageFade .45s ease; }
@keyframes pageFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.level-card, .course-item, .vip-card { animation: cardIn .4s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 首页 Hero 搜索框 ---------- */
.hero-search {
  display: flex; align-items: center; justify-content: center;
  max-width: 520px; margin: 24px auto 0;
  background: #fff; border: 2px solid var(--blue-main); border-radius: 30px;
  overflow: hidden; box-shadow: 0 6px 18px rgba(74,159,232,.18);
}
.hero-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  padding: 12px 20px; font-size: 14px; color: var(--text-main); font-family: inherit;
}
.hero-search button {
  border: none; background: linear-gradient(135deg, var(--blue-main), #7FC4F5);
  color: #fff; font-size: 14px; font-weight: 700; padding: 12px 22px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.hero-search button:hover { filter: brightness(1.06); }

/* ---------- 深色模式 ---------- */
body.dark {
  --blue-bg: #1c2b3d;
  --blue-main: #4A9FE8;
  --blue-deep: #7FC4F5;
  --yellow-bg: #2b2513;
  --yellow-main: #F5C453;
  --green-bg: #12291a;
  --green-main: #6fcf7c;
  --orange-main: #F59A4A;
  --red-main: #E86A5E;
  --text-main: #dbe6f2;
  --text-sub: #93a4b8;
  --card-bg: #15202e;
  --border: #2a3a4e;
  --code-bg: #0e1722;
  --shadow: 0 2px 10px rgba(0,0,0,.35);
  background: linear-gradient(180deg, #0f1a26 0%, #0c1520 100%);
}
body.dark .top-nav { background: rgba(21,32,46,.92); border-bottom-color: #2a3a4e; }
body.dark .card, body.dark .crumbs, body.dark .search-item, body.dark .course-item, body.dark .level-card, body.dark .vip-card,
body.dark .comment-form, body.dark .comment-item, body.dark .my-course-card, body.dark .stat-mini, body.dark .badge-item,
body.dark .path-card, body.dark .lesson-progress, body.dark .notice-bar, body.dark .quiz-item, body.dark .tree-art,
body.dark .vocab-table, body.dark .info-table th { background: var(--card-bg); color: var(--text-main); }
body.dark .nav-links a { background: #1c2b3d; border-color: #2a3a4e; }
body.dark .nav-theme { background: #1c2b3d; border-color: #2a3a4e; }
body.dark .nav-username-drop { background: #1c2b3d; border-color: #2a3a4e; color: var(--text-main); }
body.dark .nav-username-drop:hover { background: #24364a; }
body.dark .nav-dropdown { background: #15202e; border-color: #2a3a4e; }
body.dark .nav-dropdown a:hover { background: #1c2b3d; color: #7FC4F5; }
body.dark .nav-dropdown .nav-drop-divider { background: #2a3a4e; }
body.dark .nav-dropdown a.drop-danger:hover { background: rgba(192,57,43,.18); color: #ff8a80; }
body.dark .uc-tabs { background: #15202e; border-color: #2a3a4e; }
body.dark .uc-tab:hover { background: #1c2b3d; }
body.dark .uc-quick { background: #1a2736; border-color: #2a3a4e; }
body.dark .uc-quick b { color: #7FC4F5; }
body.dark .knowledge-item, body.dark .tree-art, body.dark .search-item .si-tag { background: #1a2736; }
body.dark .course-item.locked { background: #18202b; border-color: #2a3a4e; opacity: .6; }
body.dark .course-item.locked .num { background: #2a3a4e; }
body.dark .course-item.locked .name { color: #5f7185; }
body.dark .quiz-item { background: #182536; }
body.dark .code-block pre { background: #0b131d; }
body.dark .vocab-table th { background: #2a3a4e; }
body.dark .vocab-table td:first-child { background: #1c2b3d; }
body.dark .vocab-table td:last-child { background: #2b2513; }
body.dark .vocab-item, body.dark .vocab-h3 ~ .knowledge-item { background: #1e1930; border-color: #3a2f5e; }
body.dark .info-table th { background: #1c2b3d; }
body.dark .footer { color: #6d7f93; }
body.dark .goal-meta .tag { background: #2b2513; border-color: #4a3f1a; color: #e6c76b; }
body.dark .path-node .pn-ico { background: #1c2b3d; border-color: #2a3a4e; }
body.dark .path-node .pn-line { background: #2a3a4e; }
body.dark .f-input, body.dark .comment-form textarea { background: #101a26; border-color: #2a3a4e; color: var(--text-main); }
body.dark .auth-card { background: #15202e; }
body.dark .auth-card h2 { color: #7FC4F5; }
body.dark .auth-body { background: linear-gradient(135deg, #0f1a26, #0c1520 60%, #1c180c); }
body.dark .vip-compare { background: #15202e; border-color: #2a3a4e; }
body.dark .vip-compare td:first-child { background: #182536; color: #93a4b8; }
body.dark .vip-compare th { background: #1c2b3d; color: #7FC4F5; }
body.dark .vip-compare th, body.dark .vip-compare td { border-bottom-color: #2a3a4e; }
body.dark .toast { background: rgba(15,26,38,.95); }
body.dark .hero-search { background: #15202e; border-color: var(--blue-main); }
body.dark .hero-search input { color: var(--text-main); }

/* ---------- 小屏适配补充 ---------- */
@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { border-radius: 20px 20px 0 0; min-height: 0; padding: 34px 26px; }
  .auth-brand h1 { font-size: 24px; margin-top: 18px; }
  .auth-robot { display: none; }
  .auth-card { border-radius: 0 0 20px 20px; padding: 30px 24px; }
  .path-track { flex-wrap: wrap; gap: 12px; }
  .path-node { flex: 1 1 30%; }
  .path-node .pn-line { display: none; }
}
