/* MixOSLesson 课程首页 — 对齐 MixOS / MixCO 系列封面风格 */
:root {
  --ink: #14241f;
  --muted: #5a6e66;
  --paper: #e8f1ec;
  --line: rgba(20, 36, 31, 0.12);
  --teal: #0d6b62;
  --teal-deep: #0a3f3a;
  --amber: #b86a1e;
  --shadow: 0 18px 50px rgba(10, 50, 42, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(ellipse 90% 70% at 8% -10%, #c8ebe0 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 100% 5%, #f0dcc0 0%, transparent 48%),
    linear-gradient(165deg, #eef6f2 0%, var(--paper) 45%, #dfece6 100%);
  line-height: 1.65;
}
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(1rem, 2.5vw, 2.5rem) 4.5rem;
  box-sizing: border-box;
}
.hub-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 1rem 0 0.35rem;
}
.hub-back {
  color: var(--teal);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.hub-back:hover { text-decoration: underline; }
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.35rem 0;
}
.brand {
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: clamp(1.2rem, 2.5vw, 1.85rem);
  color: var(--teal-deep);
  margin: 0;
  letter-spacing: 0.05em;
}
.hub-subtitle { margin: 0.45rem 0 0; color: var(--muted); max-width: 42em; }
.hero-art {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-intro {
  margin: 0.75rem 0 1.5rem;
  padding: 1rem 1.15rem;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
.hub-intro a { color: var(--teal); font-weight: 600; text-decoration: none; }
.hub-intro a:hover { text-decoration: underline; }
.hub-intro code {
  background: #eef4f1;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.88em;
}
.tag {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 6px;
  font-size: 0.82em;
  font-weight: 600;
}
.tag-lab {
  background: #f3e8d4;
  color: var(--amber);
}
.tag-sim {
  background: #dce8f5;
  color: #0550ae;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 1100px) {
  .course-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .course-grid { grid-template-columns: 1fr; }
}
.course {
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.course:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(10, 50, 42, 0.16);
}
.course-cover {
  aspect-ratio: 160 / 9;
  display: flex;
  align-items: flex-end;
  padding: 0.35rem 0.75rem;
  color: #fff;
}
.course-cover strong { font-size: 0.9rem; text-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.cover-p00 { background: linear-gradient(135deg, #0f766e, #2dd4bf 55%, #0d9488); }
.cover-p01 { background: linear-gradient(135deg, #0550ae, #218bff 50%, #0969da); }
.cover-p02 { background: linear-gradient(135deg, #5a3d7a, #8250df 50%, #a371f7); }
.cover-p03 { background: linear-gradient(135deg, #9a6700, #d4a72c 50%, #bf8700); }
.cover-p04 { background: linear-gradient(135deg, #116329, #3fb950 50%, #1a7f37); }
.cover-p05 { background: linear-gradient(135deg, #9e2a2b, #e35d6a 50%, #c73e4a); }
.cover-p06 { background: linear-gradient(135deg, #0e4d6b, #3d9bcb 50%, #1b6a94); }
.cover-p07 { background: linear-gradient(135deg, #3b3d8a, #6e72d4 50%, #4c51bf); }
.cover-p08 { background: linear-gradient(135deg, #7c3d12, #ea8c3a 50%, #c2410c); }
.cover-p09 { background: linear-gradient(135deg, #134e4a, #2dd4bf 50%, #0f766e); }
.cover-p10 { background: linear-gradient(135deg, #6b2178, #d946ef 50%, #a21caf); }
.course-body { padding: 0.85rem 1.1rem 1rem; }
.course-body h2 {
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  color: var(--teal-deep);
}
.course-body p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.course-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 600;
}
.course-meta .go { color: var(--amber); }
.unit-hero {
  margin: 1rem 0 1.25rem;
  border-radius: 22px;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: #fff;
  box-shadow: var(--shadow);
}
.unit-panel {
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.unit-panel h2 {
  font-family: "ZCOOL XiaoWei", serif;
  margin: 0 0 0.5rem;
  color: var(--teal-deep);
}
.unit-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.5rem;
}
.unit-steps li {
  padding: 0;
  border-radius: 10px;
  background: #f7fbf8;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.unit-steps li:hover {
  border-color: rgba(13, 107, 98, 0.35);
  box-shadow: 0 4px 14px rgba(10, 50, 42, 0.08);
  transform: translateY(-1px);
}
.unit-step-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}
.unit-step-link:hover {
  text-decoration: none;
  color: var(--teal-deep);
}
.unit-step-link strong {
  color: var(--teal);
}
.unit-step-link code {
  background: #eef4f1;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.88em;
}
.step-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: #eef4f1;
  vertical-align: middle;
}
.step-badge-lab {
  color: #fff;
  background: var(--amber);
}
.hub-cta {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.hub-cta:hover { background: var(--teal-deep); }
.foot {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
.foot a { color: var(--teal); }

@keyframes mixco-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.course.is-entering {
  animation: mixco-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
