/* =========
   基础
   ========= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  background: #f5f7fb;
}

/* 容器与布局 */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 链接 */
a {
  color: #1864ab;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* 隐藏仅供屏幕阅读器用的文字 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =========
   顶部导航 & 搜索
   ========= */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo img {
  height: 32px;
  width: auto;
  display: block;
}
.logo-text {
  font-weight: 600;
  font-size: 18px;
  color: #111827;
}

/* 搜索表单 */
.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-form input[type="text"] {
  min-width: 200px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d0d7de;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background-color: #ffffff;
}

.search-form input[type="text"]:focus {
  outline: none;
  border-color: #1d72e8;
  box-shadow: 0 0 0 3px rgba(29, 114, 232, 0.18);
}

/* 按钮 */
.btn-primary {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #1d72e8, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    background 0.15s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.3);
}

/* =========
   面包屑
   ========= */
.breadcrumb {
  background: transparent;
  padding: 8px 0;
  font-size: 13px;
  color: #6b7280;
}
.breadcrumb a {
  color: #4b5563;
}
.breadcrumb-sep {
  margin: 0 4px;
  color: #9ca3af;
}
.breadcrumb-current {
  color: #111827;
}

/* =========
   标题区
   ========= */
.hero {
  padding: 16px 0 12px;
}
.hero-title {
  font-size: 24px;
  margin: 4px 0 6px;
  color: #111827;
}
.hero-char {
  font-size: 28px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e0edff;
  margin-left: 4px;
}
.hero-subtitle {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

/* =========
   卡片与两栏布局
   ========= */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.card-title {
  font-size: 18px;
  margin: 0 0 12px;
  color: #111827;
}

.section-subtitle {
  font-size: 14px;
  margin: 0 0 8px;
  color: #4b5563;
}

/* 上半部分两列 */
.layout-two-columns {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* 动画卡片 */
.card-animation .animation-wrapper {
  text-align: center;
  margin-bottom: 12px;
}
.animation-main {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(156, 163, 175, 0.6);
  background: #f9fafb;
}
.steps-wrapper {
  margin-top: 8px;
}
.steps-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px dashed rgba(156, 163, 175, 0.9);
  background: #f9fafb;
}

/* 信息卡片 */
.card-info .meta-list {
  margin: 0 0 12px;
}
.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  font-size: 14px;
}
.meta-item dt {
  font-weight: 600;
  color: #4b5563;
}
.meta-item dd {
  margin: 0;
  color: #111827;
}
.meta-char {
  font-size: 26px;
  font-weight: 700;
}

.pinyin-block {
  margin-top: 8px;
}

/* 拼音表 */
.table-pinyin {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
}
.table-pinyin td {
  padding: 6px 6px;
  vertical-align: top;
}
.table-pinyin .pinyin {
  width: 70px;
  font-weight: 600;
  color: #111827;
}
.table-pinyin .definition {
  color: #4b5563;
}

/* 广告块预留 */
.ad-block {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

/* =========
   相关汉字
   ========= */
.related-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
}
.related-chars a {
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e293b;
  border: 1px solid rgba(129, 140, 248, 0.5);
}
.related-chars a:hover {
  background: #dbe3ff;
}

/* =========
   词语表 table
   ========= */
.table-words {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
}
.table-words tr:nth-child(odd) {
  background: #f9fafb;
}
.table-words tr:nth-child(even) {
  background: #ffffff;
}
.table-words td {
  padding: 6px 8px;
  vertical-align: top;
}
.table-words .word {
  width: 120px;
  font-weight: 600;
  color: #111827;
}
.table-words .definition {
  color: #4b5563;
}

/* =========
   页脚
   ========= */
.site-footer {
  margin-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: #f9fafb;
  padding: 14px 0 18px;
  font-size: 13px;
  color: #6b7280;
}
.site-footer a {
  color: #4b5563;
}
.footer-main,
.footer-sub {
  margin: 4px 0;
  text-align: center;
}

/* =========
   响应式
   ========= */
@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-form {
    width: 100%;
  }

  .search-form input[type="text"] {
    flex: 1;
    min-width: 0;
    width: 100%;
  }

  .layout-two-columns {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 14px 12px 16px;
  }

  .hero-title {
    font-size: 20px;
  }
  .hero-char {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .topbar-inner {
    padding: 8px 12px;
  }
  .container {
    padding: 0 12px;
  }
  .logo-text {
    display: none; /* 小屏只显示 logo 图，节省空间 */
  }
}

.card-animation .ad-block { 
    margin-top: 16px; 
}

