:root {
  --primary: #5b4bd8;
  --primary-dark: #4636c0;
  --primary-light: #7c6ff0;
  --accent: #ff7a59;
  --text: #1f2333;
  --text-2: #5a6178;
  --text-3: #9299ad;
  --bg: #f6f7fb;
  --card: #ffffff;
  --border: #e9ebf2;
  --shadow: 0 8px 30px rgba(31, 35, 51, 0.06);
  --shadow-hover: 0 16px 40px rgba(91, 75, 216, 0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1200px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
[hidden] { display: none !important; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; border-radius: 10px; font-size: 15px; font-weight: 600;
  transition: all 0.2s ease; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(91,75,216,0.3); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: #f3f1ff; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-small { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--primary)); font-size: 19px;
}
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 68px;
  display: flex; align-items: center; gap: 36px;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 800; color: var(--text); }
.brand-name { letter-spacing: -0.5px; }
.main-nav { display: flex; align-items: center; gap: 6px; height: 100%; }
.main-nav a {
  padding: 8px 16px; border-radius: 9px; font-size: 15px; color: var(--text-2); font-weight: 500;
  transition: all 0.18s;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: #f3f1ff; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.header-search { position: relative; display: flex; align-items: center; }
.header-search input {
  width: 210px; padding: 9px 38px 9px 15px; border: 1px solid var(--border);
  border-radius: 20px; font-size: 14px; outline: none; transition: all 0.2s; background: #fafbfe;
}
.header-search input:focus { width: 250px; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(91,75,216,0.08); }
.header-search button { position: absolute; right: 6px; font-size: 15px; opacity: 0.6; }
.auth-area { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 20px; transition: background 0.2s; }
.user-chip:hover { background: #f3f1ff; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-light), var(--accent)); color: #fff; font-weight: 700; font-size: 14px;
}
.user-name { font-size: 14px; font-weight: 600; }
.app-main { min-height: 60vh; }
.page-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50vh; color: var(--text-3); gap: 14px; }
.page-loading p { font-size: 14px; }
.spinner { width: 38px; height: 38px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero { position: relative; overflow: hidden; background: #1b1740; color: #fff; }
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(124,111,240,0.5), transparent 45%),
              radial-gradient(circle at 85% 70%, rgba(255,122,89,0.28), transparent 42%),
              linear-gradient(135deg, #241d5c 0%, #3b2b8f 55%, #5636a8 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0; opacity: 0.12;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 26px 26px;
}
.hero-content {
  position: relative; max-width: var(--maxw); margin: 0 auto; padding: 68px 24px 76px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px;
}
.hero-tagline { display: inline-block; font-size: 13px; letter-spacing: 2px; color: #c9c2ff; margin-bottom: 16px; font-weight: 600; }
.hero-text h1 { font-size: 52px; line-height: 1.2; font-weight: 800; letter-spacing: -1px; }
.hero-text h1 em { font-style: normal; background: linear-gradient(120deg, #ffd36e, #ff8a6b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-text > p { margin-top: 18px; font-size: 17px; color: #d6d1f5; line-height: 1.8; }
.hero-search { display: flex; margin-top: 28px; max-width: 520px; background: #fff; border-radius: 14px; padding: 6px; gap: 6px; box-shadow: 0 20px 50px rgba(0,0,0,0.25); }
.hero-search input { flex: 1; border: none; outline: none; padding: 0 14px; font-size: 15px; color: var(--text); background: transparent; }
.hero-search button { padding: 12px 24px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 600; font-size: 15px; transition: background 0.2s; }
.hero-search button:hover { background: var(--primary-dark); }
.hero-stats { display: flex; gap: 40px; margin-top: 38px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 27px; font-weight: 800; }
.hero-stats span { font-size: 13px; color: #bdb6ea; margin-top: 2px; }
.hero-visual { position: relative; height: 320px; display: grid; place-items: center; }
.hero-orb {
  width: 210px; height: 210px; border-radius: 50%; display: grid; place-items: center; font-size: 92px;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 20px 60px rgba(0,0,0,0.3), inset 0 0 40px rgba(255,255,255,0.1);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.float-card {
  position: absolute; background: rgba(255,255,255,0.95); color: var(--text); padding: 11px 18px;
  border-radius: 12px; font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,0.2); white-space: nowrap;
}
.fc1 { top: 28px; left: 0; animation: float 5s ease-in-out infinite; }
.fc2 { bottom: 44px; left: -10px; animation: float 5.6s ease-in-out infinite 0.5s; }
.fc3 { top: 70px; right: -10px; animation: float 6.4s ease-in-out infinite 1s; }
.section { padding-top: 60px; }
.section-head { margin-bottom: 26px; }
.section-head h2, .page-heading h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.5px; }
.section-head p, .page-heading p { color: var(--text-3); font-size: 14px; margin-top: 5px; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; }
.section-more { color: var(--primary); font-weight: 600; font-size: 14px; }
.section-more:hover { text-decoration: underline; }
.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.category-card {
  position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 16px 20px; transition: all 0.22s; overflow: hidden;
}
.category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: transparent; }
.cat-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: #f3f1ff; font-size: 25px; margin-bottom: 14px; }
.category-card h3 { font-size: 16px; font-weight: 700; }
.category-card p { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.cat-arrow { position: absolute; top: 18px; right: 16px; color: var(--text-3); opacity: 0; transition: all 0.2s; }
.category-card:hover .cat-arrow { opacity: 1; transform: translateX(3px); color: var(--primary); }
.course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.course-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: all 0.25s; display: block;
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: transparent; }
.course-cover { position: relative; height: 148px; display: grid; place-items: center; overflow: hidden; }
.course-cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.25), transparent 50%); }
.cover-emoji { font-size: 60px; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.2)); transition: transform 0.3s; }
.course-card:hover .cover-emoji { transform: scale(1.12) rotate(-6deg); }
.badge { position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; color: #fff; z-index: 2; }
.badge.hot { background: linear-gradient(135deg, #ff7a59, #ff4e6b); }
.badge.new { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.cover-level { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(0,0,0,0.25); backdrop-filter: blur(6px); z-index: 2; }
.course-card-body { padding: 16px 16px 15px; }
.course-title { font-size: 16px; font-weight: 700; line-height: 1.4; min-height: 44px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-subtitle { font-size: 12px; color: var(--text-3); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-top: 12px; }
.meta-rating { color: #f5a623; font-weight: 600; }
.course-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border); }
.meta-students { font-size: 12px; color: var(--text-3); }
.price { font-size: 18px; font-weight: 800; color: var(--accent); }
.price.free { color: #16a34a; font-size: 15px; }
.cta-banner { margin: 64px 0 0; background: linear-gradient(135deg, #5b4bd8, #8b5cf6); color: #fff; }
.cta-inner { max-width: var(--maxw); margin: 0 auto; padding: 42px 24px; display: flex; align-items: center; justify-content: space-between; }
.cta-inner h2 { font-size: 26px; font-weight: 800; }
.cta-inner p { color: #ddd6fe; margin-top: 6px; }
.btn-cta { background: #fff; color: var(--primary); padding: 13px 28px; }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.2); }
.site-footer { background: #171a2b; color: #a8adbf; margin-top: 0; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px 28px; display: grid; grid-template-columns: 1.5fr 2fr; gap: 40px; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand strong { color: #fff; font-size: 19px; }
.footer-brand p { font-size: 13px; margin-top: 6px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer-links h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-links a { display: block; font-size: 13px; margin-bottom: 9px; color: #a8adbf; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-links h4 a { color: #fff; font-size: 14px; margin-bottom: 0; font-weight: 600; }
.footer-copy { grid-column: 1 / -1; text-align: center; border-top: 1px solid #2a2e42; padding-top: 20px; font-size: 12px; color: #6b7186; }
.page-top { padding-top: 40px; padding-bottom: 60px; min-height: 60vh; }
.page-heading { margin-bottom: 26px; }
.page-heading h1 em { color: var(--primary); font-style: normal; }
.filter-bar { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 26px; }
.filter-row { display: flex; align-items: flex-start; gap: 16px; padding: 8px 0; }
.filter-row + .filter-row { border-top: 1px dashed var(--border); }
.filter-label { flex: 0 0 36px; color: var(--text-3); font-size: 14px; padding-top: 7px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip, .sort-chip {
  padding: 6px 15px; border-radius: 18px; font-size: 13px; color: var(--text-2); background: #f6f7fb;
  border: 1px solid transparent; transition: all 0.18s; white-space: nowrap;
}
.category-chip:hover, .sort-chip:hover { color: var(--primary); background: #f0eeff; }
.category-chip.active, .sort-chip.active { color: #fff; background: var(--primary); }
.chip-icon { margin-right: 3px; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-2); }
.empty-state.small { padding: 44px 20px; }
.empty-icon { font-size: 54px; margin-bottom: 14px; }
.empty-state h3 { font-size: 19px; margin-bottom: 8px; color: var(--text); }
.empty-state p { color: var(--text-3); margin-bottom: 20px; }
.detail-hero { color: #fff; position: relative; overflow: hidden; }
.detail-hero::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.12); }
.detail-hero-inner { position: relative; z-index: 1; padding: 44px 24px 48px; }
.detail-hero-main { display: flex; gap: 30px; align-items: center; }
.detail-emoji { width: 130px; height: 130px; flex: 0 0 130px; border-radius: 22px; display: grid; place-items: center; font-size: 66px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 16px 40px rgba(0,0,0,0.2); }
.detail-tags { display: flex; gap: 8px; margin-bottom: 10px; }
.tag-pill { padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.2); }
.tag-pill.hot { background: rgba(255,122,89,0.9); }
.detail-hero-text h1 { font-size: 32px; font-weight: 800; }
.detail-subtitle { font-size: 17px; color: rgba(255,255,255,0.88); margin-top: 8px; }
.detail-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; font-size: 14px; color: rgba(255,255,255,0.9); }
.detail-instructor { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.instructor-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.25); font-weight: 700; }
.detail-instructor strong { display: block; font-size: 14px; }
.detail-instructor small { font-size: 12px; color: rgba(255,255,255,0.75); }
.detail-body { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding-top: 36px; padding-bottom: 60px; align-items: start; }
.detail-main { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.detail-tabs { display: flex; border-bottom: 1px solid var(--border); }
.detail-tab { padding: 16px 28px; font-size: 15px; font-weight: 600; color: var(--text-2); border-bottom: 3px solid transparent; transition: all 0.2s; }
.detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.detail-panel { padding: 26px 28px; }
.detail-panel h2 { font-size: 18px; margin: 20px 0 12px; font-weight: 700; }
.detail-panel h2:first-child { margin-top: 0; }
.intro-text { color: var(--text-2); line-height: 1.9; font-size: 14px; }
.learn-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.learn-list li { font-size: 14px; color: var(--text-2); padding-left: 24px; position: relative; }
.learn-list li::before { content: '✓'; position: absolute; left: 0; color: #16a34a; font-weight: 700; }
.curriculum-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.curriculum-head h2 { margin: 0; }
.curriculum-head span { font-size: 13px; color: var(--text-3); }
.lesson-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.lesson-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.lesson-item:last-child { border-bottom: none; }
.lesson-item.locked { opacity: 0.65; }
.lesson-num { width: 28px; color: var(--text-3); font-weight: 700; font-size: 13px; }
.lesson-name { flex: 1; font-weight: 500; }
.lesson-free { font-size: 11px; color: #16a34a; background: #e9f9ef; padding: 2px 8px; border-radius: 10px; }
.lesson-duration { font-size: 12px; color: var(--text-3); }
.lesson-play { font-size: 13px; color: var(--primary); font-weight: 600; }
.lesson-play:hover { text-decoration: underline; }
.detail-aside { position: sticky; top: 90px; }
.enroll-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.enroll-price { margin-bottom: 18px; }
.enroll-card .btn + .btn { margin-top: 10px; }
.enroll-card .btn.favorited { background: #fff8e6; border-color: #f5c452; color: #c8870a; }
.progress-box { margin-top: 16px; }
.progress-info { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 7px; }
.progress-info strong { color: var(--primary); }
.progress-track { height: 7px; background: #edeef4; border-radius: 6px; overflow: hidden; }
.progress-track.small { height: 5px; flex: 1; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 6px; transition: width 0.4s ease; }
.enroll-features { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.player-page { background: #0f1020; color: #fff; min-height: 80vh; padding-bottom: 40px; }
.player-topbar { display: flex; align-items: center; gap: 24px; padding: 16px 28px; border-bottom: 1px solid #23253d; }
.player-back { color: #a9aec9; font-size: 14px; }
.player-back:hover { color: #fff; }
.player-course-title { font-weight: 600; font-size: 15px; }
.player-progress { margin-left: auto; display: flex; align-items: center; gap: 12px; width: 200px; font-size: 12px; color: #a9aec9; }
.player-layout { display: grid; grid-template-columns: 1fr 340px; gap: 0; max-width: 1500px; margin: 0 auto; }
.player-main { padding: 26px; min-width: 0; }
.video-wrap { background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; }
.video-wrap video { width: 100%; height: 100%; display: block; }
.player-info { padding: 22px 4px; }
.player-lesson-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.player-lesson-head h1 { font-size: 22px; font-weight: 700; }
.player-lesson-head p { color: #8f94b0; font-size: 13px; margin-top: 6px; }
.btn-done { background: #1b7f5a; color: #fff; }
.player-nav { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 20px; border-top: 1px solid #23253d; }
.player-nav a { color: #c4b9ff; font-weight: 600; font-size: 14px; }
.player-nav a:hover { color: #fff; }
.nav-end { color: #6d7290; font-size: 13px; }
.trial-tip { margin-top: 18px; padding: 12px 16px; background: rgba(91,75,216,0.2); border: 1px solid rgba(124,111,240,0.4); border-radius: 10px; font-size: 13px; color: #d6d1f5; }
.trial-tip a { color: #ffd36e; text-decoration: underline; }
.locked-player { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; aspect-ratio: 16/9; background: #191b31; border-radius: 12px; }
.lock-icon { font-size: 56px; margin-bottom: 14px; }
.locked-player h2 { font-size: 21px; }
.locked-player p { color: #8f94b0; margin: 10px 0 22px; }
.player-sidebar { border-left: 1px solid #23253d; display: flex; flex-direction: column; max-height: calc(100vh - 68px); position: sticky; top: 68px; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid #23253d; }
.sidebar-head h3 { font-size: 15px; }
.sidebar-head span { font-size: 12px; color: #a9aec9; }
.sidebar-lessons { overflow-y: auto; flex: 1; }
.sidebar-lesson { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #1e2036; font-size: 13px; transition: background 0.15s; }
.sidebar-lesson:hover { background: #1b1d33; }
.sidebar-lesson.active { background: rgba(91,75,216,0.25); border-left: 3px solid var(--primary-light); }
.sidebar-lesson.done .sl-icon { color: #4ade80; }
.sl-icon { width: 24px; color: #8f94b0; font-weight: 700; text-align: center; }
.sl-title { flex: 1; line-height: 1.4; }
.sl-duration { font-size: 11px; color: #6d7290; }
.learning-header { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.learning-avatar { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary-light), var(--accent)); }
.learning-header h1 { font-size: 26px; font-weight: 800; }
.learning-header p { color: var(--text-3); font-size: 14px; margin-top: 3px; }
.learning-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.sum-card { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
.sum-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 23px; background: #f3f1ff; }
.sum-card strong { display: block; font-size: 24px; font-weight: 800; }
.sum-card span:not(.sum-icon) { font-size: 13px; color: var(--text-3); }
.learning-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.learning-tab { padding: 12px 20px; font-size: 15px; font-weight: 600; color: var(--text-2); border-bottom: 3px solid transparent; }
.learning-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.learning-card { display: flex; gap: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; transition: box-shadow 0.2s; }
.learning-card:hover { box-shadow: var(--shadow); }
.learning-cover { width: 160px; height: 100px; flex: 0 0 160px; border-radius: 10px; display: grid; place-items: center; font-size: 44px; }
.learning-info { flex: 1; min-width: 0; }
.learning-title { font-size: 17px; font-weight: 700; }
.learning-title:hover { color: var(--primary); }
.learning-info > p { font-size: 13px; color: var(--text-3); margin: 4px 0 14px; }
.learning-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.learning-foot span { font-size: 13px; color: var(--text-2); }
.fav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fav-item { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.fav-cover { width: 90px; height: 64px; flex: 0 0 90px; border-radius: 8px; display: grid; place-items: center; font-size: 30px; }
.fav-title { font-size: 14px; font-weight: 700; line-height: 1.4; }
.fav-title:hover { color: var(--primary); }
.fav-item p { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(15,16,32,0.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.auth-modal { position: relative; width: 100%; max-width: 420px; background: var(--card); border-radius: 20px; padding: 36px 34px 30px; box-shadow: 0 30px 80px rgba(0,0,0,0.3); max-height: 92vh; overflow-y: auto; }
.modal-close { position: absolute; top: 16px; right: 18px; color: var(--text-3); font-size: 18px; }
.modal-close:hover { color: var(--text); }
.auth-modal-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: var(--primary); margin-bottom: 22px; }
.auth-modal h2 { font-size: 24px; font-weight: 800; }
.auth-subtitle { color: var(--text-3); font-size: 14px; margin-top: 5px; margin-bottom: 24px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.auth-tab { padding: 10px 4px; margin-right: 24px; font-size: 15px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.form-group input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; transition: border-color 0.2s; background: #fafbfe; }
.form-group input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(91,75,216,0.08); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.btn-code { padding: 0 14px; border: 1px solid var(--primary); color: var(--primary); border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; background: #fff; }
.btn-code:disabled { border-color: var(--border); color: var(--text-3); }
.field-error { color: #e5484d; font-size: 12px; margin-top: 5px; min-height: 16px; }
.auth-message { font-size: 13px; margin: 4px 0 12px; min-height: 18px; }
.auth-message.success { color: #16a34a; }
.auth-message.error { color: #e5484d; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: var(--text-3); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn-wechat { width: 100%; border: 1px solid var(--border); background: #fafbfe; color: var(--text); }
.btn-wechat:hover { background: #e9f9ef; border-color: #16a34a; }
.btn-wechat span { font-size: 17px; }
.auth-tip { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 18px; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 300; background: #1f2333; color: #fff; padding: 13px 26px; border-radius: 12px; font-size: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); opacity: 0; transition: all 0.3s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #166f4f; }
@media (max-width: 1024px) {
  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .player-layout { grid-template-columns: 1fr; }
  .player-sidebar { position: static; max-height: 460px; border-left: none; border-top: 1px solid #23253d; }
  .hero-text h1 { font-size: 42px; }
}
@media (max-width: 768px) {
  .header-inner { gap: 14px; padding: 0 16px; }
  .main-nav { display: none; }
  .header-search input { width: 140px; }
  .header-search input:focus { width: 160px; }
  .hero-content { grid-template-columns: 1fr; padding: 46px 20px 54px; }
  .hero-visual { display: none; }
  .hero-text h1 { font-size: 36px; }
  .hero-stats { gap: 24px; }
  .category-grid, .course-grid { grid-template-columns: repeat(2, 1fr); }
  .fav-grid { grid-template-columns: 1fr; }
  .learning-summary { grid-template-columns: 1fr; }
  .learning-card { flex-direction: column; }
  .learning-cover { width: 100%; flex: auto; height: 130px; }
  .detail-hero-main { flex-direction: column; text-align: center; }
  .detail-stats, .detail-tags { justify-content: center; }
  .cta-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .detail-panel { padding: 20px; }
  .learn-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand-name { display: none; }
  .header-search { display: none; }
  .user-name { display: none; }
  .category-grid, .course-grid { grid-template-columns: 1fr; }
}
.admin-page { padding-top: 36px; padding-bottom: 70px; min-height: 70vh; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-head h1 { font-size: 26px; font-weight: 800; }
.admin-head p { color: var(--text-3); font-size: 14px; margin-top: 3px; }
.admin-back { display: inline-block; color: var(--primary); font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.admin-back:hover { text-decoration: underline; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.astat { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.astat > span { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: #f3f1ff; }
.astat strong { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; }
.astat small { font-size: 12px; color: var(--text-3); }
.admin-table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 14px 18px; background: #fafbfe; color: var(--text-2); font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fcfcff; }
.table-course { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.tc-emoji { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 9px; display: grid; place-items: center; font-size: 23px; }
.table-course strong { display: block; font-size: 14px; }
.table-course small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.status-badge.on { background: #e9f9ef; color: #16a34a; }
.status-badge.off { background: #f1f2f6; color: var(--text-3); }
.table-actions { display: flex; gap: 6px; }
.tbtn { padding: 5px 11px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--primary); background: #f3f1ff; transition: all 0.15s; white-space: nowrap; }
.tbtn:hover { background: #e6e2ff; }
.tbtn.danger { color: #e5484d; background: #fdecec; }
.tbtn.danger:hover { background: #fbdcdc; }
.admin-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; }
.admin-section-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--border); background: #fafbfe; }
.admin-section-head h2 { font-size: 17px; font-weight: 700; margin-right: auto; }
.lesson-admin-list, .material-list { padding: 6px 22px; }
.lesson-admin-item, .material-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.lesson-admin-item:last-child, .material-item:last-child { border-bottom: none; }
.lai-num { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: grid; place-items: center; background: #f3f1ff; color: var(--primary); font-weight: 700; font-size: 12px; }
.lai-info, .mi-info { flex: 1; min-width: 0; }
.lai-info strong, .mi-info strong { display: block; font-size: 14px; }
.lai-info small, .mi-info small { display: block; color: var(--text-3); font-size: 12px; margin-top: 3px; }
.lai-actions { display: flex; gap: 6px; }
.src-tag { padding: 1px 7px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.src-tag.cloud { background: #e9f9ef; color: #16a34a; }
.src-tag.link { background: #eef4ff; color: #2563eb; }
.src-tag.none { background: #f1f2f6; color: var(--text-3); }
.mi-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; font-size: 20px; background: #fafbfe; border-radius: 8px; }
.admin-empty { padding: 32px; text-align: center; color: var(--text-3); font-size: 14px; }
.admin-activate { display: grid; place-items: center; padding: 40px 0; }
.activate-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 40px 36px; text-align: center; box-shadow: var(--shadow); }
.activate-icon { font-size: 48px; margin-bottom: 16px; }
.activate-card h2 { font-size: 22px; font-weight: 800; }
.activate-card > p { color: var(--text-3); font-size: 14px; margin: 8px 0 24px; }
.activate-card .form-group { text-align: left; }
.activate-tip { font-size: 12px; color: var(--text-3); margin-top: 16px; }
.generic-modal { position: relative; width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; background: var(--card); border-radius: 18px; padding: 30px 32px 24px; box-shadow: 0 30px 80px rgba(0,0,0,0.3); }
.generic-modal h2 { font-size: 21px; font-weight: 800; margin-bottom: 22px; padding-right: 30px; }
.generic-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.admin-form-message { font-size: 13px; color: #e5484d; min-height: 16px; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-form .form-group { margin-bottom: 15px; }
.admin-form .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.admin-form input[type=text], .admin-form input[type=number], .admin-form input:not([type]), .admin-form textarea, .admin-form select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; outline: none; background: #fafbfe; transition: border-color 0.2s;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus { border-color: var(--primary); background: #fff; }
.checkbox-inline { display: inline-flex !important; align-items: center; gap: 6px; margin-right: 16px; font-size: 13px !important; font-weight: 500 !important; color: var(--text-2) !important; cursor: pointer; }
.checkbox-inline input { width: auto !important; }
@media (max-width: 768px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .lesson-admin-item { flex-wrap: wrap; }
  .lai-actions { width: 100%; justify-content: flex-end; }
  .generic-modal { padding: 24px 20px 20px; }
}
.video-unavailable { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #a9aec9; text-align: center; gap: 12px; }
.video-unavailable > div { font-size: 54px; }
.video-unavailable p { font-size: 14px; }
.video-source-tag { position: absolute; top: 34px; left: 40px; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 10px; }
.player-main { position: relative; }
.download-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.download-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.download-item:last-child { border-bottom: none; }
.di-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; font-size: 22px; background: #fafbfe; border-radius: 9px; }
.di-info { flex: 1; min-width: 0; }
.di-info strong { display: block; font-size: 14px; }
.di-info small { display: block; color: var(--text-3); font-size: 12px; margin-top: 3px; }
.di-error { font-size: 12px; color: #e5484d; }
.material-login-tip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #f3f1ff; border-radius: 10px; margin-bottom: 14px; font-size: 14px; color: var(--text-2); }
.upload-progress { width: 100%; padding: 12px 14px; background: #f7f8ff; border: 1px solid #e4e6f8; border-radius: 10px; margin-top: 10px; }
.upload-progress[hidden] { display: none; }
.up-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.up-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.up-percent { font-size: 13px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.up-track { height: 7px; background: #e6e8f5; border-radius: 6px; overflow: hidden; }
.up-fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #667eea, #764ba2); transition: width 0.15s ease; }
.upload-progress.done .up-fill { background: linear-gradient(90deg, #43e97b, #38f9d7); }
.up-info { font-size: 11px; color: var(--text-3); margin-top: 6px; font-variant-numeric: tabular-nums; }
.material-progress { margin: 0 22px 14px; }
.site-page-hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 64px 0 56px; text-align: center; }
.site-page-hero .site-page-emoji { display: block; font-size: 46px; margin-bottom: 14px; }
.site-page-hero h1 { font-size: 34px; margin-bottom: 12px; }
.site-page-hero p { font-size: 15px; opacity: 0.9; }
.site-page-body { max-width: 860px; font-size: 15px; line-height: 1.9; color: var(--text-2); }
.site-page-body h2 { font-size: 21px; color: var(--text); margin: 30px 0 12px; padding-left: 12px; border-left: 4px solid var(--primary); }
.site-page-body p { margin: 0 0 14px; }
.site-page-body ul { margin: 0 0 18px; padding-left: 24px; }
.site-page-body li { list-style: disc; margin-bottom: 8px; }
.site-page-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; }
.site-page-foot a { color: var(--primary); text-decoration: none; }
.content-section { margin: 0 0 26px; }
.content-hint { font-size: 12px; color: var(--text-3); }
.content-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.content-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s, box-shadow .2s; }
.content-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(102,126,234,.12); }
.content-card > span { font-size: 28px; }
.content-card strong { font-size: 15px; margin-top: 4px; }
.content-card small { font-size: 12px; color: var(--text-3); }
.content-card em { position: absolute; right: 16px; top: 20px; font-style: normal; font-size: 12px; color: var(--primary); }
.page-edit-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.page-edit-form textarea { width: 100%; font-family: inherit; font-size: 14px; line-height: 1.7; resize: vertical; }
.form-help { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.form-help code { background: #f3f1ff; color: var(--primary); padding: 1px 5px; border-radius: 4px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.save-hint { font-size: 13px; color: #16a34a; }
@media (max-width: 700px) { .content-card-grid { grid-template-columns: 1fr; } }
.content-card.static { cursor: default; }
.content-card.static:hover { border-color: var(--border); transform: none; box-shadow: none; }
.user-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 0 0 24px; }
.user-stat { display: flex; align-items: center; gap: 12px; padding: 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.user-stat > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #f1efff; font-size: 20px; flex: none; }
.user-stat strong { display: block; font-size: 24px; line-height: 1.2; color: var(--text); }
.user-stat small { font-size: 12px; color: var(--text-3); }
.mini-track { width: 90px; height: 6px; border-radius: 99px; background: #eceaf7; overflow: hidden; }
.mini-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #667eea, #764ba2); }
.recent-users { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.recent-user { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.recent-user strong { display: block; font-size: 13px; color: var(--text); }
.recent-user small { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ru-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; font-size: 14px; font-weight: 700; flex: none; }
.ru-avatar.big { width: 52px; height: 52px; font-size: 21px; }
.empty-row { text-align: center; color: var(--text-3); padding: 26px !important; }
.user-search { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.user-search input { max-width: 320px; }
.table-user { display: flex; align-items: center; gap: 10px; }
.table-user strong { display: block; font-size: 13px; }
.table-user small { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.user-table td { white-space: nowrap; }
.badge-admin, .badge-user { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; }
.badge-admin { background: #ede9fe; color: #6d28d9; font-weight: 700; }
.badge-user { background: #f1f5f9; color: #64748b; }
.user-detail { font-size: 14px; color: var(--text-2); }
.ud-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.ud-head strong { display: block; font-size: 18px; color: var(--text); }
.ud-head small { display: block; margin-top: 4px; color: var(--text-3); }
.ud-meta { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 0; font-size: 12px; color: var(--text-3); }
.ud-section { margin-top: 14px; }
.ud-section h3 { font-size: 14px; color: var(--text); margin: 0 0 8px; }
.detail-list { list-style: none; margin: 0; padding: 0; max-height: 180px; overflow-y: auto; }
.detail-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.detail-list em { font-style: normal; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.empty-inline { color: var(--text-3); justify-content: center !important; }
@media (max-width: 700px) { .user-stat-grid { grid-template-columns: repeat(2, 1fr); } .user-table { min-width: 900px; } }
