/* ============================================
   零零AI (00ai00.com) — 主样式表
   版本: v0.1 | 更新: 2026-06-26
   ============================================ */

/* ─── CSS 变量 ─── */
:root {
  /* 品牌色 */
  --brand: #4A90E2;
  --brand-dark: #3572C5;
  --brand-light: #EBF2FF;
  --accent: #7C5CBF;

  /* 渐变色 */
  --gradient: linear-gradient(135deg, #4A90E2, #7C5CBF);
  --gradient-hover: linear-gradient(135deg, #3572C5, #6A4CAF);
  --gradient-progress: linear-gradient(90deg, #A6E3A1, #4A90E2);
  --gradient-hero: linear-gradient(180deg, #F8FAFF 0%, #FFFFFF 100%);

  /* 中性色 */
  --fg: #1A1A2E;
  --fg-gray: #5A5A72;
  --fg-light: #9999AA;
  --border: #E4E7ED;
  --bg: #FFFFFF;
  --bg-gray: #F7F8FA;

  /* 侧边栏 */
  --bg-sidebar: #1A1A2E;
  --fg-sidebar: #CDD6F4;
  --sidebar-border: #313244;
  --sidebar-hover: #45475A;

  /* 间距与圆角 */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 10px;
  --radius-xl: 20px;
  --shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
  --shadow-lg: 0 4px 16px rgba(74, 144, 226, 0.12);
  --shadow-toast: 0 4px 12px rgba(0, 0, 0, 0.15);

  /* 字体 */
  --font: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* 导航栏 */
  --nav-height: 56px;

  /* 侧边栏 */
  --sidebar-width: 280px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
}

/* ─── 导航栏 ─── */
.topnav {
  height: var(--nav-height);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topnav .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin-right: 40px;
  white-space: nowrap;
  flex-shrink: 0;
}

.topnav .logo:hover {
  text-decoration: none;
  color: var(--fg);
}

.topnav .logo-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--fg-gray);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
  background: var(--brand-light);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.nav-actions .btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--fg-gray);
  transition: all 0.2s;
  cursor: pointer;
  background: none;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
}

.nav-actions .btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

.nav-actions .btn-primary {
  background: var(--gradient);
  color: #fff !important;
  border: none;
  padding: 7px 18px;
}

.nav-actions .btn-primary:hover {
  background: var(--gradient-hover);
  opacity: 0.95;
}

/* 汉堡按钮 */
.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: var(--fg);
  flex-shrink: 0;
}

/* ─── Hero 区 ─── */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  background: var(--gradient-hero);
}

.hero h1 {
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 16px;
  color: var(--fg-gray);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero .search-box {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  max-width: 480px;
  width: 100%;
  transition: all 0.3s;
}

.hero .search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.hero .search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--fg);
  background: transparent;
}

.hero .search-box input::placeholder {
  color: var(--fg-light);
}

.hero .search-box button {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.hero .search-box button:hover {
  opacity: 0.9;
}

.hero .stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--fg-light);
}

.hero .stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero .stats strong {
  color: var(--fg);
  font-weight: 600;
}

/* ─── 页面容器 ─── */
.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── 板块标题 ─── */
.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .more {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-light);
  margin-left: auto;
}

.section-title .more:hover {
  color: var(--brand);
}

/* ─── 分类标签 ─── */
.category-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.category-tabs .tab {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 13px;
  color: var(--fg-gray);
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  font-family: var(--font);
}

.category-tabs .tab:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.category-tabs .tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ─── 课程网格 ─── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.course-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: all 0.25s;
  overflow: hidden;
}

.course-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.course-card a {
  display: block;
  padding: 20px;
  color: var(--fg);
  text-decoration: none;
  height: 100%;
}

.course-card .card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.course-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.course-card .card-icon.bg-blue { background: #EBF2FF; }
.course-card .card-icon.bg-purple { background: #F3EEFF; }
.course-card .card-icon.bg-green { background: #EBF9F0; }
.course-card .card-icon.bg-orange { background: #FFF4E8; }
.course-card .card-icon.bg-pink { background: #FFEEF5; }
.course-card .card-icon.bg-teal { background: #E8F8F5; }

.course-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.course-card .card-desc {
  font-size: 13px;
  color: var(--fg-gray);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card .card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--fg-light);
}

.course-card .card-meta .tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.tag-ready { background: #E8F5E9; color: #2E7D32; }
.tag-new { background: #FFF3E0; color: #E65100; }
.tag-coming { background: #F3F4F6; color: #888; }

/* ─── 空状态 ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-light);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

/* ─── Skeleton 加载 ─── */
.skeleton-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.skeleton-card .skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: 4px;
  margin-bottom: 10px;
}

.skeleton-card .skeleton-line:first-child {
  width: 60%;
  height: 20px;
}

.skeleton-card .skeleton-line:nth-child(2) {
  width: 90%;
}

.skeleton-card .skeleton-line:nth-child(3) {
  width: 40%;
  height: 12px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── 特色板块 ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.feature-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.feature-item .icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.feature-item h4 {
  font-size: 15px;
  margin-bottom: 6px;
}

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

/* ─── 页脚 ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px 30px;
  margin-top: 60px;
  background: var(--bg-gray);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-inner h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--fg);
}

.footer-inner p,
.footer-inner a {
  font-size: 13px;
  color: var(--fg-gray);
  display: block;
  margin-bottom: 6px;
}

.footer-inner a:hover {
  color: var(--brand);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-light);
}

/* ─── Toast 通知 ─── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A2E;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 1000;
  box-shadow: var(--shadow-toast);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s;
  white-space: nowrap;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ════════════════════════════════════
   教程详情页样式
   ════════════════════════════════════ */

/* ─── 教程页 Layout ─── */
.tutorial-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── 侧边栏 ─── */
.tutorial-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--fg-sidebar);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-header .back-home {
  font-size: 12px;
  color: #6C7086;
  margin-bottom: 8px;
  display: inline-block;
  cursor: pointer;
}

.sidebar-header .back-home:hover {
  color: var(--brand);
  text-decoration: none;
}

.sidebar-header .course-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header .course-title .icon {
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-header .course-title h1 {
  font-size: 15px;
  font-weight: 700;
  color: #CDD6F4;
  line-height: 1.3;
}

.sidebar-header .progress-info {
  margin-top: 10px;
  font-size: 11px;
  color: #6C7086;
}

.sidebar-header .progress-bar {
  height: 4px;
  background: var(--sidebar-border);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.sidebar-header .progress-fill {
  height: 100%;
  background: var(--gradient-progress);
  border-radius: 2px;
  transition: width 0.4s;
}

.sidebar-toc {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.sidebar-toc::-webkit-scrollbar {
  width: 4px;
}

.sidebar-toc::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-toc::-webkit-scrollbar-thumb {
  background: #45475A;
  border-radius: 2px;
}

.toc-section {
  margin-bottom: 2px;
}

.toc-part {
  padding: 8px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #6C7086;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.toc-part:hover {
  color: #A6ADC8;
}

.toc-part .arrow {
  font-size: 10px;
  transition: transform 0.2s;
  display: inline-block;
}

.toc-part .arrow.open {
  transform: rotate(90deg);
}

.toc-chapters {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 20px;
  cursor: pointer;
  font-size: 13px;
  color: #BAC2DE;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}

.toc-item:hover {
  background: var(--sidebar-border);
  color: #CDD6F4;
  text-decoration: none;
}

.toc-item.active {
  background: var(--sidebar-hover);
  color: #CDD6F4;
  border-left-color: var(--brand);
}

.toc-item .status {
  font-size: 10px;
  flex-shrink: 0;
}

.toc-item .label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-item .ch-num {
  font-size: 11px;
  color: #585B70;
  flex-shrink: 0;
}

/* ─── 主内容区 ─── */
.tutorial-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ─── TopBar ─── */
.tutorial-topbar {
  background: #fff;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.tutorial-topbar .breadcrumb {
  font-size: 13px;
  color: var(--fg-gray);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.tutorial-topbar .breadcrumb a {
  color: var(--fg-gray);
}

.tutorial-topbar .breadcrumb a:hover {
  color: var(--brand);
}

.tutorial-topbar .breadcrumb .sep {
  margin: 0 6px;
  color: var(--fg-light);
}

.tutorial-topbar .breadcrumb .current {
  font-weight: 500;
  color: var(--fg);
}

.tutorial-topbar .topbar-actions {
  display: flex;
  gap: 8px;
}

.tutorial-topbar .icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--fg-gray);
  transition: all 0.2s;
}

.tutorial-topbar .icon-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ─── 内容区 ─── */
.tutorial-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

.tutorial-content-inner {
  max-width: 800px;
  margin: 0 auto;
}

/* ─── Markdown 渲染样式 ─── */
.tutorial-content-inner h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.tutorial-content-inner h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 24px 0 10px;
}

.tutorial-content-inner h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 8px;
}

.tutorial-content-inner p {
  margin-bottom: 14px;
}

.tutorial-content-inner ul,
.tutorial-content-inner ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.tutorial-content-inner li {
  margin-bottom: 4px;
}

.tutorial-content-inner code {
  background: #ECEEF2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-mono);
}

.tutorial-content-inner pre {
  background: #1E1E2E;
  color: #CDD6F4;
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 14px;
}

.tutorial-content-inner pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  color: inherit;
  line-height: 1.6;
}

.tutorial-content-inner blockquote {
  border-left: 4px solid var(--brand);
  background: var(--brand-light);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 14px;
}

.tutorial-content-inner blockquote p {
  margin-bottom: 0;
}

.tutorial-content-inner img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 14px 0;
}

.tutorial-content-inner table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}

.tutorial-content-inner th,
.tutorial-content-inner td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.tutorial-content-inner th {
  background: var(--bg-gray);
  font-weight: 600;
}

.tutorial-content-inner .tip-box {
  background: linear-gradient(135deg, #EBF2FF, #F0F4FF);
  border: 1px solid #D0E3FF;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.tutorial-content-inner .tip-box strong {
  color: var(--brand-dark);
}

/* ─── 章节导航 ─── */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.chapter-nav .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--fg-gray);
  text-decoration: none;
  transition: all 0.2s;
}

.chapter-nav .nav-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

.chapter-nav .nav-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.chapter-nav .nav-btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.chapter-nav .nav-btn.primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

/* ─── 评论区占位 ─── */
.comment-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ─── 加载/错误状态 ─── */
.loading-state,
.error-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--fg-light);
}

.loading-state .spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

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

.error-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.error-state p {
  font-size: 14px;
  margin-bottom: 8px;
}

.error-state a {
  font-size: 13px;
}

/* ════════════════════════════════════
   About 页面
   ════════════════════════════════════ */
.page-about {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
}

.page-about h1 {
  font-size: 28px;
  margin-bottom: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-about section {
  margin-bottom: 32px;
}

.page-about h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.page-about p {
  font-size: 14px;
  color: var(--fg-gray);
  margin-bottom: 10px;
  line-height: 1.8;
}

/* ════════════════════════════════════
   响应式
   ════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
  .course-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .topnav {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
  }

  .hamburger {
    display: flex;
    margin-right: 8px;
  }

  .topnav .logo {
    margin-right: auto;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 14px;
  }

  .hero .stats {
    gap: 16px;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* 教程页移动端 */
  .tutorial-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: 200;
    transition: left 0.3s ease;
  }

  .tutorial-sidebar.open {
    left: 0;
  }

  .tutorial-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
  }

  .tutorial-sidebar-overlay.open {
    display: block;
  }

  .tutorial-topbar {
    padding: 10px 16px;
  }

  .tutorial-content {
    padding: 20px 16px;
  }

  .tutorial-content-inner h1 {
    font-size: 20px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }

  .hero {
    padding: 40px 16px 30px;
  }

  .hero .search-box {
    flex-direction: column;
    padding: 0;
    border: none;
    gap: 8px;
  }

  .hero .search-box input {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
  }

  .hero .search-box button {
    width: 100%;
    padding: 10px;
  }
}

/* ─── 搜索页 ─── */
.search-result-item:hover {
  border-color: var(--brand) !important;
  box-shadow: 0 2px 12px rgba(74, 144, 226, 0.12);
}

.search-result-item mark {
  background: #fde68a;
  color: inherit;
  padding: 1px 3px;
  border-radius: 3px;
}

#search-input:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}
