:root {
  color-scheme: light;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe4f0;
  --surface: #ffffff;
  --soft: #f5f8fc;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 16px; border-radius: 10px; color: white; background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { min-height: 76px; padding: 14px clamp(18px, 4vw, 64px); display: flex; align-items: center; gap: 28px; background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(219,228,240,.86); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 20px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--blue), var(--indigo)); box-shadow: 0 10px 25px rgba(37,99,235,.25); }
.brand-mark svg { width: 25px; }
.brand strong { font-weight: 850; letter-spacing: -.04em; }
.brand em { margin-left: 4px; color: var(--blue); font-style: normal; font-weight: 850; }
.wechat-contact { margin-left: auto; min-height: 44px; padding: 5px 15px 5px 6px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid #c8f2df; border-radius: 999px; color: #334155; background: linear-gradient(135deg, #f0fdf7, #fff); box-shadow: 0 7px 22px rgba(16,185,129,.09); white-space: nowrap; }
.wechat-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(135deg, #22c984, #09a96c); box-shadow: 0 6px 14px rgba(16,185,129,.24); }
.wechat-icon svg { width: 21px; stroke-width: 1.8; }
.wechat-copy { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.wechat-copy small { color: #6b7c72; font-size: 11px; font-weight: 700; }
.wechat-copy strong { color: #087a51; font-size: 14px; letter-spacing: .025em; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 5px rgba(16,185,129,.12); }
.header-action, .primary-action { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: white; background: linear-gradient(135deg, var(--blue), var(--indigo)); box-shadow: 0 10px 24px rgba(37,99,235,.22); transition: transform .2s ease, box-shadow .2s ease; }
.header-action { padding: 10px 21px; font-size: 14px; font-weight: 700; }
.header-action:hover, .primary-action:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,99,235,.28); }

main { min-height: calc(100vh - 200px); }
.hero { min-height: 510px; padding: 70px clamp(22px, 7vw, 112px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: center; gap: 60px; overflow: hidden; background: radial-gradient(circle at 80% 28%, rgba(99,102,241,.14), transparent 30%), linear-gradient(145deg, #fff 20%, #eef5ff 100%); border-bottom: 1px solid var(--line); }
.hero-copy { max-width: 680px; }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.hero h1 { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: 1.06; letter-spacing: -.055em; }
.hero h1 span { color: transparent; background: linear-gradient(110deg, var(--blue), #7c3aed); background-clip: text; -webkit-background-clip: text; }
.hero-description { max-width: 590px; margin: 25px 0 30px; color: #53637a; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.85; }
.primary-action { gap: 9px; padding: 14px 24px; font-weight: 750; }
.primary-action svg { width: 18px; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; justify-self: center; display: grid; place-items: center; }
.hero-visual::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff, #dbeafe 38%, #c7d2fe 72%, #a5b4fc); box-shadow: inset -30px -35px 70px rgba(79,70,229,.18), 0 45px 90px rgba(37,99,235,.2); }
.hero-sphere { position: relative; z-index: 2; width: 42%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, #60a5fa, #4f46e5); box-shadow: inset -14px -16px 30px rgba(30,41,59,.18), 0 18px 40px rgba(79,70,229,.3); }
.hero-sphere span { font-family: Georgia, serif; font-size: clamp(64px, 8vw, 108px); transform: translateY(-3px); }
.orbit { position: absolute; z-index: 3; width: 86%; height: 34%; border: 2px solid rgba(37,99,235,.34); border-radius: 50%; }
.orbit-one { transform: rotate(-18deg); }
.orbit-two { transform: rotate(64deg); border-color: rgba(124,58,237,.26); }
.float-chip { position: absolute; z-index: 5; padding: 9px 14px; border: 1px solid rgba(255,255,255,.9); border-radius: 999px; color: #334155; background: rgba(255,255,255,.8); box-shadow: 0 10px 30px rgba(30,64,175,.12); backdrop-filter: blur(10px); font-size: 13px; font-weight: 700; }
.chip-one { top: 12%; left: 2%; }
.chip-two { top: 35%; right: -3%; }
.chip-three { bottom: 9%; left: 14%; }

.library { width: 100%; margin: 0; padding: 72px clamp(18px, 2vw, 36px) 88px; scroll-margin-top: 70px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 45px); letter-spacing: -.045em; }
.result-count { margin: 0; color: var(--muted); font-size: 14px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.search-box { min-width: 280px; width: min(560px, 48vw); height: 50px; padding: 0 17px; display: flex; align-items: center; gap: 11px; color: #94a3b8; background: white; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 4px 14px rgba(15,23,42,.035); }
.search-box:focus-within { color: var(--blue); border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(37,99,235,.09); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: #94a3b8; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.filter { padding: 9px 17px; border: 1px solid var(--line); border-radius: 999px; color: #526176; background: white; font-size: 14px; transition: .18s ease; }
.filter:hover { border-color: #93c5fd; color: var(--blue); }
.filter.active { border-color: var(--blue); color: white; background: var(--blue); box-shadow: 0 7px 16px rgba(37,99,235,.18); }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.course-card { min-width: 0; }
.course-card[hidden] { display: none; }
.card-link { height: 100%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 20px; background: white; box-shadow: 0 5px 20px rgba(15,23,42,.045); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card-link:hover { transform: translateY(-7px); border-color: #bfdbfe; box-shadow: 0 20px 50px rgba(30,64,175,.14); }
.card-link:focus-visible { outline: 3px solid rgba(37,99,235,.38); outline-offset: 3px; }
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e8eef6; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card-link:hover .cover img { transform: scale(1.035); }
.subject { position: absolute; top: 15px; left: 15px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.76); border-radius: 8px; color: #0f172a; background: rgba(255,255,255,.9); box-shadow: 0 5px 16px rgba(15,23,42,.09); backdrop-filter: blur(8px); font-size: 12px; font-weight: 800; }
.subject-math { color: #1d4ed8; }
.subject-chinese { color: #b45309; }
.subject-physics { color: #7c3aed; }
.subject-geography { color: #047857; }
.subject-biology { color: #be123c; }
.card-body { flex: 1; padding: 22px; display: flex; flex-direction: column; }
.card-meta { display: flex; gap: 12px; color: #7b8a9e; font-size: 12px; }
.card-meta span + span::before { content: "·"; margin-right: 12px; }
.card-body h3 { margin: 10px 0 10px; font-size: 20px; line-height: 1.4; letter-spacing: -.025em; }
.card-body p { margin: 0 0 21px; color: var(--muted); line-height: 1.75; font-size: 14px; }
.open-label { margin-top: auto; color: var(--blue); font-size: 14px; font-weight: 750; }
.empty-state { padding: 75px 20px; text-align: center; color: var(--muted); }
.empty-state > div { font-size: 45px; color: #94a3b8; }
.empty-state h3 { margin: 12px 0 7px; color: var(--ink); font-size: 22px; }
.empty-state p { margin: 0 0 20px; }
.empty-state button { padding: 10px 18px; border: 0; border-radius: 999px; color: white; background: var(--blue); }

footer { padding: 35px clamp(20px, 5vw, 72px); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 40px; color: #94a3b8; background: #0f172a; font-size: 13px; }
footer strong { color: white; font-size: 17px; }
footer p { margin: 7px 0 0; }
.footer-status { display: flex; align-items: center; gap: 10px; color: #cbd5e1; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr .75fr; gap: 25px; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .filters { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .site-header { min-height: 66px; padding: 11px 16px; gap: 12px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 38px; height: 38px; }
  .wechat-contact { order: 3; width: 100%; min-height: 38px; margin-left: 0; padding: 4px 12px 4px 5px; justify-content: center; }
  .wechat-icon { width: 29px; height: 29px; }
  .header-action { margin-left: auto; padding: 9px 15px; }
  .hero { min-height: auto; padding: 58px 20px 52px; grid-template-columns: 1fr; text-align: center; }
  .hero-copy { margin: auto; }
  .hero-description { margin-left: auto; margin-right: auto; }
  .hero-visual { max-width: 320px; }
  .library { padding-top: 54px; }
  .section-heading { align-items: start; }
  .course-grid { grid-template-columns: 1fr; gap: 20px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: thin; }
  .filter { flex: 0 0 auto; }
  footer { grid-template-columns: 1fr; gap: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
