/* 主题变量见 themes.css；此处仅保留兼容别名 */
:root {
  --gold-soft: var(--accent-soft);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- header（全站统一深色导航） ---------- */
.site-header {
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 40;
  transition: box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: var(--header-shadow, 0 10px 30px rgba(0, 0, 0, 0.12));
}

.site-header.is-scrolled {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--header-text);
  text-decoration: none;
}

.logo:hover {
  color: var(--primary);
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent)),
    linear-gradient(160deg, var(--ink-2), var(--ink));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  position: relative;
  flex-shrink: 0;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  border-bottom-color: transparent;
  transform: rotate(-28deg);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: inherit;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  color: var(--header-muted);
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a.active,
.nav a:hover {
  color: #fff;
}

.page-home-studio .site-header--home:not(.is-scrolled) .nav a.active,
.page-home-studio .site-header--home:not(.is-scrolled) .nav a:hover,
.page-home-studio .site-header--home:not(.is-scrolled) .site-header .link:hover,
.page-home-studio .site-header--home:not(.is-scrolled) .logo:hover {
  color: var(--accent-soft);
}

.nav a.active::after,
.nav a:hover::after {
  transform: scaleX(1);
}

.username {
  color: var(--header-muted);
  font-weight: 500;
}

.site-header .link {
  color: var(--header-muted);
}

.site-header .link:hover {
  color: var(--primary);
}

.header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  line-height: 1;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--control-radius);
  background: var(--primary);
  border: 1px solid transparent;
  color: #fff !important;
  box-sizing: border-box;
}

.header-login:hover {
  background: var(--primary-hover);
  color: #fff !important;
}

/* 首页：同样固定深色导航，避免滚动后透出下方内容 */
.page-home .site-header--home {
  position: sticky;
  left: auto;
  right: auto;
  top: 0;
  background: var(--header-bg);
  border-bottom-color: var(--header-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

/* ---------- category tabs ---------- */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cat-tab {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
}

.cat-tab:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, white);
}

.cat-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cat-tab.active:hover {
  color: #fff;
}

.cat-desc {
  color: var(--text-3);
  margin: 0 0 16px;
  font-size: 13px;
}

.empty-box {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--card-radius);
  padding: 36px;
  text-align: center;
  color: var(--text-3);
}

.inline-edit .inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inline-edit input[type="text"],
.inline-edit input[type="number"] {
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 6px 8px;
  font: inherit;
  min-width: 120px;
}

.inline-count {
  color: var(--text-3);
  white-space: nowrap;
}

/* ---------- home hero ---------- */
.page-home {
  background: var(--bg);
}

.home-hero {
  position: relative;
  min-height: 0;
  padding: 48px 0 56px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--hero-text, #16324d);
  background: var(--hero-bg);
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: hero-float 10s ease-in-out infinite;
}

.home-hero-glow-a {
  width: 360px;
  height: 360px;
  left: -80px;
  top: 20%;
  background: var(--hero-glow-a);
}

.home-hero-glow-b {
  width: 280px;
  height: 280px;
  right: 12%;
  bottom: 8%;
  background: var(--hero-glow-b);
  animation-delay: -4s;
}

.home-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
  opacity: 0.7;
}

.home-hero-visual {
  position: absolute;
  right: max(3vw, calc(50% - 480px));
  top: 50%;
  width: min(240px, 26vw);
  max-width: 42%;
  aspect-ratio: 1;
  transform: translateY(-50%);
}

.hero-orbit {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-orbit-1 {
  width: 100%;
  height: 100%;
  animation: hero-spin 36s linear infinite;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.hero-orbit-1::before,
.hero-orbit-2::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent-soft) 55%, transparent);
}

.hero-orbit-2 {
  width: 72%;
  height: 72%;
  animation: hero-spin 24s linear infinite reverse;
  border-style: dashed;
}

.hero-orbit-3 {
  width: 46%;
  height: 46%;
  border-color: rgba(255, 255, 255, 0.1);
}

.hero-core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--hero-core-bg);
  border: 1px solid color-mix(in srgb, var(--accent-soft) 55%, transparent);
  box-shadow: 0 12px 28px rgba(47, 127, 229, 0.22);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 8px;
  padding-bottom: 8px;
}

.home-hero-copy {
  max-width: 560px;
  animation: hero-rise 0.9s ease both;
}

.home-hero-brand {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
  margin-bottom: 18px;
  background: var(--hero-brand, linear-gradient(120deg, #16324d 10%, #2f7fe5 100%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero-copy h1 {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 14px;
  color: var(--hero-text, #16324d);
}

.home-hero-copy p {
  max-width: 420px;
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--hero-muted, #4f6d88);
}

.home-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-btn-primary {
  min-width: 140px;
  height: 44px !important;
  line-height: 1 !important;
  border-radius: var(--control-radius) !important;
  padding: 0 22px !important;
  background: var(--hero-btn, linear-gradient(120deg, #4b93ef, #2f7fe5)) !important;
  color: var(--hero-btn-text, #fff) !important;
  font-weight: 700;
  box-shadow: 0 10px 28px var(--hero-btn-shadow, rgba(47, 127, 229, 0.28));
}

.hero-btn-primary:hover {
  filter: brightness(1.05);
  color: var(--hero-btn-text, #fff) !important;
}

.hero-btn-ghost {
  min-width: 120px;
  height: 44px !important;
  line-height: 1 !important;
  border-radius: var(--control-radius) !important;
  padding: 0 20px !important;
  background: transparent !important;
  border: 1px solid var(--hero-ghost-border, rgba(47, 127, 229, 0.35)) !important;
  color: var(--hero-ghost-text, #1f5fad) !important;
  font-weight: 600;
}

.hero-btn-ghost:hover {
  background: rgba(47, 127, 229, 0.08) !important;
  color: var(--hero-ghost-text, #1f5fad) !important;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

.home-section {
  padding: 48px 0;
}

.home-features {
  padding-top: 8px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 22px;
  font-weight: 600;
}

.section-head a {
  color: var(--text-2);
  font-size: 13px;
}

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

.feature-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px 18px;
}

.feature-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-item p {
  color: var(--text-2);
  font-size: 13px;
}

.site-footer {
  margin-top: 24px;
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 28px 0 18px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-desc {
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.footer-links a {
  color: var(--footer-text);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  padding-top: 14px;
  font-size: 12px;
  color: var(--footer-muted);
}

/* ---------- login（科技感，仅登录页） ---------- */
.login-page {
  background: var(--login-page-bg);
  color: var(--login-text);
}

.login-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--login-bg);
}

.login-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--login-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--login-grid) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 35%, transparent 85%);
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.login-glow-a {
  width: 280px;
  height: 280px;
  left: 12%;
  top: 18%;
  background: rgba(22, 119, 255, 0.18);
}

.login-glow-b {
  width: 240px;
  height: 240px;
  right: 14%;
  bottom: 16%;
  background: rgba(18, 184, 196, 0.14);
}

.login-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(64, 169, 255, 0.08),
    transparent
  );
  animation: login-scan 7s linear infinite;
}

@keyframes login-scan {
  0% { transform: translateY(-30vh); }
  100% { transform: translateY(110vh); }
}

.login-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--login-panel);
  border: 1px solid var(--login-border);
  border-radius: calc(var(--card-radius) + 2px);
  padding: 36px 32px 30px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.login-box::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-soft), var(--primary), transparent);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand .logo-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 24px color-mix(in srgb, var(--primary) 35%, transparent);
  position: relative;
}

.login-brand .logo-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  border-right-color: transparent;
  transform: rotate(45deg);
}

.login-brand .logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--login-text);
  letter-spacing: 2px;
}

.login-sub {
  margin-top: 8px;
  color: var(--login-muted);
  font-size: 13px;
  letter-spacing: 1px;
}

.form-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--login-text);
}

.form-title span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--accent-soft);
}

.form-item {
  margin-bottom: 14px;
}

.form-item label {
  display: block;
  margin-bottom: 6px;
  color: var(--login-muted);
}

.form-item input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--login-border);
  border-radius: var(--control-radius);
  padding: 0 12px;
  font: inherit;
  outline: none;
  color: var(--login-text);
  background: var(--login-input-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-item input::placeholder {
  color: var(--login-muted);
}

.form-item input:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.btn-login {
  width: 100%;
  height: 42px;
  margin-top: 10px;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--login-btn);
  color: #fff;
  font: inherit;
  font-size: 15px;
  letter-spacing: 4px;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--login-btn-shadow);
}

.btn-login:hover {
  filter: brightness(1.08);
}

.msg-error {
  margin-bottom: 12px;
  padding: 8px 10px;
  color: #ff7875;
  background: rgba(255, 77, 79, 0.1);
  border: 1px solid rgba(255, 77, 79, 0.35);
  border-radius: 6px;
}

/* ---------- page common ---------- */
.page {
  padding: 20px 0 40px;
}

.page-head {
  margin-bottom: 16px;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 600;
}

.page-head p {
  margin-top: 4px;
  color: var(--text-3);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-3);
  margin-bottom: 16px;
  font-size: 13px;
}

.crumb a {
  color: var(--text-2);
}

.crumb a:hover {
  color: var(--primary);
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.panel-title {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- courses ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.course-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  overflow: hidden;
  color: inherit;
}

.course-card:hover {
  color: inherit;
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.course-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  padding: 0;
  color: #fff;
  overflow: hidden;
  background-color: #0b3d5c;
}

.course-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.course-level {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 2;
  display: inline-block;
  max-width: calc(100% - 20px);
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-cover-title {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  bottom: auto;
  z-index: 1;
  transform: translateY(-42%);
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.course-info {
  padding: 14px;
}

.course-info h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.course-info p {
  color: var(--text-2);
  font-size: 13px;
  height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.course-foot {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 13px;
}

.course-foot .go {
  color: var(--primary);
}

.course-price {
  color: #e11d48;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* ---------- course detail ---------- */
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 16px;
}

.detail-cover {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 4px;
  padding: 0;
  color: #fff;
  overflow: hidden;
  background-color: #0b3d5c;
}

.detail-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.detail-cover span {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 12px;
}

.detail-meta h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.detail-meta p {
  color: var(--text-2);
  margin-bottom: 12px;
}

.detail-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-tags span {
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 8px;
  color: var(--text-2);
  font-size: 12px;
}

.btn-start {
  display: inline-block;
  height: 36px;
  line-height: 36px;
  padding: 0 18px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 4px;
}

.btn-start:hover {
  background: var(--primary-hover);
}

.catalog-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}

.catalog-item:last-child {
  border-bottom: 0;
}

.catalog-item:hover {
  background: #fafafa;
  color: inherit;
}

.catalog-left {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.catalog-left .idx {
  flex: 0 0 auto;
  color: var(--text-3);
  width: 56px;
}

.catalog-left .name {
  font-weight: 600;
  margin-bottom: 4px;
}

.catalog-left .desc {
  color: var(--text-3);
  font-size: 13px;
}

.catalog-left .live-at {
  margin-top: 6px;
  color: #c2410c;
  font-size: 13px;
  font-weight: 600;
}

.lesson-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  vertical-align: middle;
}

.lesson-badge.sm {
  font-size: 11px;
  padding: 1px 6px;
}

.lesson-badge.recorded {
  background: rgba(22, 119, 255, 0.12);
  color: #1677ff;
}

.lesson-badge.live {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.catalog-item.is-live {
  display: block;
  padding: 0;
  overflow: hidden;
}

.catalog-live-card {
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(15, 23, 42, 0.02)),
    var(--white);
  border-left: 3px solid #dc2626;
}

.catalog-live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-3);
  font-size: 13px;
}

.catalog-live-topic {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.catalog-live-time {
  color: #c2410c;
  font-size: 14px;
  font-weight: 700;
}

.catalog-live-time.muted,
.live-stage-time.muted,
.side-item-live.muted {
  color: var(--text-3);
  font-weight: 500;
}

.catalog-live-desc {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.catalog-item .name .lesson-badge {
  margin-right: 8px;
}

.live-stage {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  padding: 36px 32px;
  border-radius: 4px;
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.18), transparent 42%),
    linear-gradient(160deg, #111827, #1f2937 55%, #0f172a);
  color: #fff;
}

.live-stage h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
}

.live-stage-time {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fda4af;
}

.live-stage-desc {
  margin: 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.live-stage-hint {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.watch-info h1 .lesson-badge {
  margin-right: 8px;
  position: relative;
  top: -2px;
}

.catalog-right {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-3);
  white-space: nowrap;
}

.catalog-right .live-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 2px;
  background: rgba(194, 65, 12, 0.12);
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
}

.catalog-right .play {
  color: var(--primary);
}

/* ---------- watch ---------- */
.watch-page {
  background: #f0f2f5;
}

.watch-page-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 12px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  align-items: start;
}

.watch-main,
.watch-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.video-box {
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.video-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #bbb;
  gap: 6px;
}

.watch-info {
  padding: 16px;
}

.watch-info h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.watch-info p {
  color: var(--text-2);
}

.watch-live-at {
  margin-top: 8px;
  color: #c2410c !important;
  font-weight: 600;
}

.side-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.side-count {
  color: var(--text-3);
  font-weight: 400;
  font-size: 12px;
}

.side-list {
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.side-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}

.side-item:hover {
  background: #f7f8fa;
  color: inherit;
}

.side-item.active {
  background: #e6f4ff;
  color: inherit;
}

.side-item.active .side-item-name {
  color: var(--primary);
}

.side-item-top {
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 12px;
  margin-bottom: 4px;
}

.side-item-name {
  font-size: 13px;
  line-height: 1.5;
}

.side-item-live {
  margin-top: 4px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- admin ---------- */
.admin-page .flash {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
}

.admin-page .flash.ok {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}

.admin-page .flash.bad {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}

.admin-form {
  padding: 16px;
}

.admin-form .form-row {
  margin-bottom: 14px;
}

.admin-form .form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-2);
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
  outline: none;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: var(--primary);
}

.admin-form textarea {
  resize: vertical;
}

.form-help {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  line-height: 1;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: var(--primary);
  color: #fff !important;
  font: inherit;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}

.btn:hover,
a.btn:hover {
  background: var(--primary-hover);
}

.btn.ghost,
a.btn.ghost {
  background: #fff;
  color: var(--text-2) !important;
  border: 1px solid var(--line);
}

.btn-text {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--primary);
  cursor: pointer;
}

.btn-text.danger {
  color: var(--danger);
}

.sub-title {
  padding: 0 16px 8px;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #fafafa;
  color: var(--text-2);
  font-weight: 600;
  border-top: 0;
}

.admin-table .empty {
  text-align: center;
  color: var(--text-3);
  padding: 28px 14px;
}

.cell-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.cell-sub {
  color: var(--text-3);
  font-size: 12px;
  max-width: 280px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
}

.tag.ok {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}

.tag.bad {
  background: #fff2f0;
  color: #cf1322;
  border: 1px solid #ffccc7;
}

.ops {
  white-space: nowrap;
}

.ops a,
.ops form {
  display: inline-block;
  margin-right: 10px;
}

@media (max-width: 960px) {
  .course-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-head {
    grid-template-columns: 1fr;
  }

  .watch-page-inner {
    grid-template-columns: 1fr;
  }

  .side-list {
    max-height: 360px;
  }

  .admin-grid,
  .admin-form .form-row.two {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .home-hero-visual {
    opacity: 0.35;
    right: -8vw;
  }
}

@media (max-width: 640px) {
  .course-grid {
    grid-template-columns: 1fr;
  }

  .catalog-item {
    flex-direction: column;
  }

  .catalog-right {
    padding-left: 68px;
  }

  .nav {
    display: none;
  }

  .home-hero {
    min-height: 0;
    padding: 36px 0 44px;
  }

  .home-hero-visual {
    display: none;
  }

  .home-hero-inner {
    padding-bottom: 8px;
  }

  .header-left,
  .header-right {
    gap: 14px;
  }

  .logo-text {
    font-size: 17px;
  }

  .theme-picker-current {
    display: none;
  }
}

/* ---------- theme picker ---------- */
.theme-picker {
  position: relative;
}

.theme-picker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--header-border);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--header-text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.theme-picker-toggle:hover {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}

.theme-picker-label {
  opacity: 0.7;
}

.theme-picker-current {
  font-weight: 600;
}

.theme-picker-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 148px;
  padding: 6px;
  border-radius: var(--card-radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  z-index: 50;
}

.theme-picker-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.theme-picker-menu button:hover,
.theme-picker-menu button.is-active {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary);
}

.login-theme-bar {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: min(420px, calc(100% - 32px));
}

.login-theme-bar button {
  border: 1px solid var(--login-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--login-text);
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--control-radius);
  cursor: pointer;
}

.login-theme-bar button.is-active,
.login-theme-bar button:hover {
  background: color-mix(in srgb, var(--primary) 55%, transparent);
  border-color: color-mix(in srgb, var(--accent-soft) 50%, transparent);
}

/* ---------- 易客繁花工作室首页（区别于智榜样旧版排版） ---------- */
.page-home-studio {
  background: var(--bg);
}

.page-home-studio .site-header--home {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

.page-home-studio .site-header--home.is-scrolled {
  position: sticky;
  background: var(--header-bg);
  border-bottom-color: var(--header-border);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(12px);
}

.studio-hero {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 28px) 0 36px;
  overflow: hidden;
  color: var(--hero-text);
  background: var(--hero-bg);
}

.studio-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.studio-hero-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.55) 0%, transparent 58%),
    linear-gradient(0deg, rgba(7, 17, 31, 0.72) 0%, transparent 45%);
}

.studio-hero-lines {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 28%;
  bottom: 22%;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.045) 0 1px,
    transparent 1px 72px
  );
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.7;
  animation: studio-drift 18s linear infinite;
}

.studio-hero-frame {
  position: absolute;
  right: max(24px, 8vw);
  top: 18%;
  width: min(200px, 24vw);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(19, 194, 194, 0.12);
  background:
    linear-gradient(160deg, rgba(22, 119, 255, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.02);
}

.studio-hero-frame::before,
.studio-hero-frame::after {
  content: "";
  position: absolute;
  background: rgba(214, 181, 110, 0.7);
}

.studio-hero-frame::before {
  left: 14px;
  right: 14px;
  top: 14px;
  height: 1px;
}

.studio-hero-frame::after {
  left: 14px;
  width: 1px;
  top: 14px;
  bottom: 14px;
}

.studio-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  animation: hero-rise 0.85s ease both;
}

.studio-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.studio-brand {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.06em;
  background: var(--hero-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.studio-tagline {
  margin: 0 0 10px;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}

.studio-lead {
  margin: 0 0 20px;
  max-width: 460px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--hero-muted);
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.studio-btn-primary,
.studio-btn-ghost {
  min-width: 132px;
  height: 44px !important;
  border-radius: var(--control-radius) !important;
  font-weight: 700 !important;
}

.studio-btn-primary {
  background: var(--hero-btn) !important;
  color: var(--hero-btn-text) !important;
  box-shadow: 0 10px 28px var(--hero-btn-shadow);
}

.studio-btn-ghost {
  background: transparent !important;
  border: 1px solid var(--hero-ghost-border) !important;
  color: var(--hero-ghost-text) !important;
}

.studio-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.studio-stage,
.studio-flow {
  padding: 36px 0 20px;
}

.studio-stage-head,
.studio-flow-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.studio-stage-label {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.studio-stage-head h2,
.studio-flow-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.studio-stage-link {
  color: var(--text-2);
  font-size: 13px;
}

.studio-stage-link:hover {
  color: var(--primary);
}

.studio-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  box-shadow: 0 16px 40px rgba(16, 32, 51, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.studio-feature:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(16, 32, 51, 0.1);
}

.studio-feature-media {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

.studio-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-feature-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 28px;
  text-align: center;
}

.studio-feature-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(7, 17, 31, 0.7);
  color: #fff;
  font-size: 12px;
}

.studio-feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 26px;
  position: relative;
}

.studio-feature-meta {
  margin: 0 0 10px;
  color: var(--text-3);
  font-size: 15px;
}

.studio-feature-price {
  color: #e11d48;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
}

.studio-feature-price-lg {
  font-size: 32px;
}

.studio-feature-body h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.3;
}

.studio-feature-body > p {
  margin: 0 0 22px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
}

.studio-feature-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.studio-feature-cta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}

.studio-feature-cta::after {
  content: " →";
}

.studio-feature-badge {
  display: none;
}

.studio-flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.studio-flow-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 22px 18px;
  border-top: 2px solid var(--primary);
  background: var(--surface);
}

.studio-flow-num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--primary);
  line-height: 1;
}

.studio-flow-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.studio-flow-item p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
}

.studio-footer {
  margin-top: 40px;
  padding: 28px 0 18px;
  background: var(--footer-bg);
  color: var(--footer-text);
}

.studio-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-footer-brand {
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.studio-footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.studio-footer-links a {
  color: var(--footer-text);
}

.studio-footer-links a:hover {
  color: #fff;
}

.studio-footer-copy {
  padding-top: 14px;
  font-size: 12px;
  color: var(--footer-muted);
}

@keyframes studio-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-72px); }
}

@media (max-width: 900px) {
  .studio-feature {
    grid-template-columns: 1fr;
  }

  .studio-feature-media {
    min-height: 220px;
  }

  .studio-flow-list {
    grid-template-columns: 1fr;
  }

  .studio-hero-frame {
    display: none;
  }

  .studio-hero {
    min-height: auto;
    padding: calc(var(--header-h) + 24px) 0 28px;
  }
}
