/**
 * 页面特定样式 - pages.css
 * 整合所有页面的内嵌样式
 */

/* ==================== 通用页面头部 ==================== */
.page-header {
  padding: 1rem 0;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* ==================== 关于页面 (about.html) ==================== */
.about-hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: var(--border-radius-xl);
  margin-bottom: 3rem;
}

.about-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about-hero .lead {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 3rem;
}

.about-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.about-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

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

.feature-card {
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.feature-icon.blue { background: #dbeafe; color: #2563eb; }
.feature-icon.green { background: #dcfce7; color: #16a34a; }
.feature-icon.yellow { background: #fef3c7; color: #d97706; }
.feature-icon.purple { background: #f3e8ff; color: #9333ea; }
.feature-icon.pink { background: #fce7f3; color: #db2777; }
.feature-icon.teal { background: #ccfbf1; color: #0d9488; }

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.team-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.team-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.team-card h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.team-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-item h4 {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-item p {
  font-size: 1rem;
}

/* ==================== 帮助页面 (help.html) ==================== */
.help-header {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: var(--border-radius-xl);
  margin-bottom: 2rem;
}

.help-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.help-header p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.help-search {
  max-width: 400px;
  margin: 0 auto;
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.quick-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--primary-color);
}

.quick-link-card i {
  font-size: 2rem;
  color: var(--primary-color);
}

.quick-link-card span {
  font-weight: 500;
}

.help-content {
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.help-section {
  margin-bottom: 3rem;
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.help-section h2 i {
  color: var(--primary-color);
}

.help-article {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
}

.help-article.highlight {
  background: rgba(79, 70, 229, 0.1);
  border-left: 4px solid var(--primary-color);
}

.help-article h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.help-article p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.help-article ul, .help-article ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.help-article li {
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.faq-item.highlight {
  background: rgba(79, 70, 229, 0.1);
}

.faq-item summary {
  padding: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.faq-item summary::before {
  content: '+';
  font-size: 1.25rem;
  color: var(--primary-color);
}

.faq-item[open] summary::before {
  content: '−';
}

.faq-answer {
  padding: 0 1rem 1rem 2.5rem;
  color: var(--text-secondary);
}

.faq-answer ul, .faq-answer ol {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.faq-answer li {
  margin-bottom: 0.25rem;
}

.contact-methods {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.contact-method i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

/* ==================== 登录/注册页面 (login.html, register.html) ==================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem 1rem;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header .logo {
  display: inline-flex;
  margin-bottom: 1.5rem;
}

.auth-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.auth-header p {
  color: var(--text-secondary);
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-icon .form-control {
  padding-left: 2.75rem;
  padding-right: 2.75rem;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.forgot-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.social-login {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.social-btn .fa-weixin { color: #07c160; }
.social-btn .fa-qq { color: #12b7f5; }
.social-btn .fa-github { color: #333; }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
}

.auth-footer a {
  font-weight: 500;
}

.demo-info {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  text-align: center;
}

.demo-info p {
  margin-bottom: 0.25rem;
}

.demo-info button {
  margin-top: 0.5rem;
}

.form-check span a {
  color: var(--primary-color);
}

/* ==================== 个人中心 (profile.html) ==================== */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.profile-details h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.profile-details p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.profile-actions {
  display: flex;
  gap: 0.75rem;
}

.checkin-section .checkin-card {
  display: flex;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
}

.checkin-left {
  display: flex;
  align-items: center;
}

.checkin-right {
  flex: 1;
}

.checkin-right h3 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.streak-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.streak-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.streak-day.empty {
  background: transparent;
}

.streak-day.active {
  background: var(--success-color);
  color: white;
}

.streak-day.today {
  border: 2px solid var(--primary-color);
}

.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tab-filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.875rem;
}

.filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.note-card {
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.note-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.note-item-title {
  font-weight: 500;
  color: var(--primary-color);
}

.note-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.note-content {
  margin-bottom: 0.75rem;
}

.progress-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.progress-card {
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-header h4 {
  font-size: 0.9rem;
}

.progress-percent {
  font-weight: 600;
  color: var(--primary-color);
}

.progress-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.setting-section h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
}

.history-icon {
  font-size: 1.25rem;
}

.history-info {
  flex: 1;
}

.history-type {
  font-weight: 500;
  font-size: 0.9rem;
}

.history-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==================== 新概念英语 (nce.html) ==================== */
.book-overview-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.book-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.book-cover {
  width: 120px;
  height: 160px;
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  position: relative;
}

.book-cover.nce1 { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.book-cover.nce2 { background: linear-gradient(135deg, #22c55e, #4ade80); }
.book-cover.nce3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.book-cover.nce4 { background: linear-gradient(135deg, #ec4899, #f472b6); }

.book-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.book-icon {
  font-size: 2rem;
  margin-top: 0.5rem;
}

.book-info {
  flex: 1;
}

.book-info h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.book-subtitle {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.book-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.book-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.book-meta i {
  margin-right: 0.25rem;
}

.book-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.book-progress .progress-bar {
  flex: 1;
  height: 6px;
}

.book-progress .progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.lesson-card.completed {
  position: relative;
}

.completed-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
}

.lesson-cn {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

/* ==================== 单词本 (vocabulary.html) ==================== */
.category-card.active {
  border: 2px solid var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
}

/* ==================== 搜索页面 (search.html) ==================== */
.search-large {
  max-width: 700px;
  margin: 0 auto;
}

.search-large input {
  font-size: 1.1rem;
  padding: 1rem 1.5rem;
}

.search-filters {
  display: flex;
  justify-content: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.search-filter-btn {
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: 999px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.search-filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.hot-searches {
  text-align: center;
}

.hot-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.hot-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--bg-tertiary);
  border-radius: 999px;
  font-size: 0.8rem;
  margin: 0.25rem;
  color: var(--text-secondary);
}

.hot-tag:hover {
  background: var(--primary-color);
  color: white;
}

.results-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recent-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.recent-item:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.recent-item i {
  font-size: 0.75rem;
}

/* ==================== 练习页面 (practice.html) ==================== */
.source-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.source-card:hover {
  border-color: var(--primary-color);
}

.source-card.active {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
}

.source-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.source-card span {
  font-size: 0.875rem;
  font-weight: 500;
}

.settings-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.setting-row:last-child {
  margin-bottom: 0;
}

.setting-row label {
  width: 100px;
  flex-shrink: 0;
  font-weight: 500;
}

.setting-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.setting-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.setting-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.setting-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.practice-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.practice-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.practice-history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.practice-history-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.practice-history-icon.good { background: #dcfce7; }
.practice-history-icon.average { background: #fef3c7; }
.practice-history-icon.poor { background: #fee2e2; }

.history-mode {
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.history-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==================== 单词详情页 (word-detail.html) ==================== */
.word-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.example-item {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary-color);
}

.example-en {
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.note-item {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.note-actions {
  display: flex;
  gap: 0.5rem;
}

/* ==================== 课程详情页 (lesson-detail.html) ==================== */
.lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.lesson-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.lesson-detail-header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.lesson-detail-cn {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.lesson-header-actions {
  display: flex;
  gap: 0.75rem;
}

.lesson-text-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.text-content {
  line-height: 2;
}

.text-line {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.text-line:last-child {
  border-bottom: none;
}

.text-line .en {
  font-size: 1.1rem;
  display: block;
}

.text-line .cn {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-top: 0.25rem;
}

.audio-player-large {
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.audio-tips {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 1rem;
}

.audio-tips h4 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.audio-tips ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.audio-tips li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.lesson-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.words-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==================== 返回顶部按钮 ==================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

/* ==================== 响应式布局 ==================== */
@media (max-width: 992px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .profile-info {
    flex-direction: column;
  }
  
  .checkin-card {
    flex-direction: column;
  }
  
  .progress-cards {
    grid-template-columns: 1fr;
  }
  
  .book-overview-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .book-meta {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .book-progress {
    justify-content: center;
  }
  
  .setting-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .setting-row label {
    width: auto;
  }
  
  .word-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .word-navigation .btn {
    width: 100%;
  }
  
  .lesson-header {
    flex-direction: column;
  }
  
  .lesson-header-actions {
    width: 100%;
  }
  
  .lesson-header-actions .btn {
    flex: 1;
  }
  
  .lesson-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .lesson-navigation .btn {
    width: 100%;
  }
  
  .help-content {
    padding: 1rem;
  }
  
  .contact-methods {
    flex-direction: column;
    gap: 1rem;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 576px) {
  .feature-grid, .team-grid {
    grid-template-columns: 1fr;
  }
  
  .about-hero h1 {
    font-size: 1.75rem;
  }
}
/* ==================== chinesetales.org 汉字详情页 ==================== */
/*
 * chinesetales.org — 汉字详情页 Pro主题
 * 全站统一色彩：使用 style.css 中定义的 CSS Variables
 * 布局：左侧汉字大字 + 右侧信息面板（两栏并排）
 */

/* ══════════════════════════════════════════
   英雄区：汉字(左) + 信息面板(右)
══════════════════════════════════════════ */
.char-info-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  padding: 36px 40px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

/* 两栏并排：左=汉字+笔顺，右=拼音+信息 */
.char-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 0;
}

/* ── 左栏：汉字大字 ── */
.char-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.char-big {
  font-size: 130px;
  line-height: 1;
  font-family: "KaiTi", "楷体", "STKaiti", "Noto Serif CJK SC", serif;
  color: var(--text-primary);
  letter-spacing: 0;
  user-select: none;
  display: block;
  min-width: 140px;
  text-align: center;
}

/* 笔顺面板（在大字下面） */
.char-stroke-panel {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 300px;
  min-height: 340px;
}

.stroke-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
}

#stroke-canvas-wrap svg {
  display: block;
}

.stroke-btns {
  display: flex;
  gap: 8px;
}

.stroke-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  font-weight: 500;
}
.stroke-btn:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ── 右栏：拼音 + 多音 + 信息标签 + 释义 ── */
.char-right-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 8px;
}

/* 拼音行 */
.char-phonetics {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.char-phonetics-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.char-pinyin {
  font-size: 44px;
  font-weight: 700;
  color: var(--primary-color);
  font-family: var(--font-sans);
  letter-spacing: 0;
  line-height: 1.2;
  word-spacing: 0;
}

/* 声调颜色 */
.tone-1 { color: var(--info-color); }
.tone-2 { color: var(--secondary-color); }
.tone-3 { color: var(--warning-color); }
.tone-4 { color: var(--danger-color); }
.tone-5 { color: var(--text-muted); }

/* 发音按钮 */
.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  font-weight: 500;
}
.audio-btn:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.audio-btn:active { transform: translateY(0); }

/* 多音字 */
.char-alt-pinyin {
  font-size: 16px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: 20px;
  padding: 4px 14px;
  border: 1px solid var(--border-color);
  font-style: italic;
}

/* Badge 行 */
.char-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.char-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--border-radius);
  padding: 6px 16px;
  letter-spacing: 0.3px;
  cursor: default;
  transition: all var(--transition-fast);
}
.char-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.badge-hsk {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-radical {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-strokes {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 英文释义 */
.char-english {
  font-size: 17px;
  color: var(--text-primary);
  line-height: 1.65;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}
.char-english strong {
  color: var(--primary-color);
  margin-right: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── 词组预览（右栏内） ── */
.char-compounds-preview {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}
.cpv-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.compounds-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.cpv-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 80px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 10px 14px;
  white-space: nowrap;
  cursor: default;
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
}
.cpv-card:hover {
  background: var(--bg-tertiary, #eceeff);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.cpv-word {
  font-size: 26px;
  font-family: "KaiTi","楷体",serif;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.cpv-word a { color: var(--primary-color); text-decoration: none; }
.cpv-word a:hover { text-decoration: underline; }
.cpv-pinyin {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
  line-height: 1.4;
  min-height: 18px;
}
.cpv-more {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  padding: 10px 20px;
  border: 1.5px solid var(--primary-color);
  border-radius: var(--border-radius);
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cpv-more:hover { background: var(--primary-color); color: #fff; }

/* ── HSK标签行间距修正 ── */
.word-tags {
  margin-top: -20px;
  margin-bottom: 16px;
}
.word-tags a {
  display: inline-block;
}






/* ── 正文配图（SVG封面图）── */
.char-cover-img {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 12px;
  margin: 0 auto 1.5em auto !important;
  box-shadow: var(--shadow-sm);
}

/* ── 正文配图 ── */
.char-illustration {
  margin-top: 24px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.char-illust-img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  background: var(--bg-secondary);
}

/* ══════════════════════════════════════════
   通用模块卡片
══════════════════════════════════════════ */
.word-section {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-icon {
  font-size: 16px;
}

/* ── 字源故事 ── */
.char-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.char-content p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* ── 例句 ── */
.char-examples {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.char-example {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.char-example:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.example-num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
  flex-shrink: 0;
}

.example-pinyin {
  font-size: 13px;
  color: var(--primary-light);
  margin: 0 0 4px 0;
  font-style: italic;
  letter-spacing: 0.5px;
}

.example-cn {
  font-size: 18px;
  color: var(--text-primary);
  font-family: "KaiTi", "楷体", serif;
  margin: 0 0 5px 0;
  line-height: 1.6;
}

.example-en {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
  line-height: 1.5;
}

/* ── 组词：两列网格（大字版） ── */
.char-compounds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.compound-item {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  transition: all var(--transition-normal);
  cursor: default;
}
.compound-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-light);
  border-top-color: var(--accent-color);
}

.compound-word {
  display: block;
  font-size: 28px;
  font-family: "KaiTi", "楷体", serif;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.2;
}
.compound-word a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.compound-word a:hover {
  color: var(--primary-color);
}

.compound-pinyin {
  display: block;
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.compound-en {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.compound-example {
  font-size: 13px;
  color: var(--text-muted);
  font-family: "KaiTi", "楷体", serif;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
  line-height: 1.5;
}

/* ── 记忆技巧 ── */
.char-memory-tip {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.75;
  padding: 18px 22px;
  background: rgba(79, 70, 229, 0.05);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

/* ── 易混淆字：两列 ── */
.char-similar-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.similar-item {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}
.similar-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.similar-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.similar-char {
  font-size: 40px;
  font-family: "KaiTi", "楷体", serif;
  color: var(--text-primary);
  line-height: 1;
}

.similar-pinyin {
  font-size: 15px;
  color: var(--primary-color);
  font-weight: 600;
}

.similar-en {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

.similar-diff {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  padding: 8px 12px;
  background: rgba(79, 70, 229, 0.06);
  border-radius: var(--border-radius);
}

.info-icon {
  color: var(--primary-color);
  margin-right: 4px;
}

/* ══════════════════════════════════════════
   响应式
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .char-info-card { padding: 22px 18px; }
  .char-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .char-display { align-items: center; }
  .char-stroke-panel { width: 100%; max-width: 220px; margin: 0 auto; }
  .char-big { font-size: 100px; }
  .char-pinyin { font-size: 34px; }
  .char-compounds { grid-template-columns: 1fr 1fr; }
  .char-similar-list { grid-template-columns: 1fr; }
  .word-section { padding: 20px 16px; }
  .cpv-word { font-size: 22px; }
  .cpv-card { padding: 8px 10px; min-height: 68px; }
}

@media (max-width: 480px) {
  .char-big { font-size: 80px; }
  .char-pinyin { font-size: 28px; }
  .char-compounds { grid-template-columns: 1fr; }
  .compound-word { font-size: 24px; }
  .cpv-word { font-size: 20px; }
  .cpv-pinyin { font-size: 12px; }
}

/* ══════════════════════════════════════════
   评论区 — ct-comment
══════════════════════════════════════════ */
.ct-comment-wrap {
  margin-top: 40px;
  padding: 28px 32px 24px;
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

/* 头部 */
.ct-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e0e7ff;
}
.ct-comment-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}
.ct-comment-count {
  font-size: 13px;
  color: #4f46e5;
  text-decoration: none;
  background: #f0f0ff;
  border-radius: 999px;
  padding: 3px 12px;
  transition: background 0.15s;
}
.ct-comment-count:hover { background: #e0e7ff; }

/* 输入框 */
.ct-comment-form {
  border: 1.5px solid #c7d2fe;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ct-comment-form:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.10);
}
.ct-comment-textarea {
  width: 100%;
  min-height: 90px;
  padding: 14px 16px;
  border: none;
  outline: none;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
  background: transparent;
  display: block;
  box-sizing: border-box;
}
.ct-comment-textarea::placeholder { color: #9ca3af; }

/* 表单底部工具栏 */
.ct-comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: #f8f7ff;
  border-top: 1px solid #e0e7ff;
}
.ct-comment-fields {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ct-input {
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 130px;
  color: #374151;
  background: #fff;
  transition: border-color 0.15s;
}
.ct-input:focus { border-color: #4f46e5; }
.ct-input::placeholder { color: #9ca3af; }
.ct-anon-label {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}
.ct-anon-label input { accent-color: #4f46e5; cursor: pointer; }

/* 发布按钮 */
.ct-submit-btn {
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.ct-submit-btn:hover { background: #4338ca; transform: translateY(-1px); }
.ct-submit-btn:active { transform: translateY(0); }

/* 评论列表 */
.ct-pl-list {
  margin-top: 24px;
}
.ct-pl-item {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0ff;
}
.ct-pl-item:last-child { border-bottom: none; }
.ct-pl-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.ct-pl-name {
  font-weight: 600;
  font-size: 14px;
  color: #4f46e5;
}
.ct-pl-time {
  font-size: 12px;
  color: #9ca3af;
}
.ct-pl-text {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
  word-wrap: break-word;
}

/* 空状态 */
.ct-pl-empty {
  padding: 28px 0;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
}

/* 加载中 */
.ct-pl-loading {
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ct-pl-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e0e7ff;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: ct-spin 0.7s linear infinite;
}
@keyframes ct-spin { to { transform: rotate(360deg); } }

/* 响应式 */
@media (max-width: 600px) {
  .ct-comment-wrap { padding: 18px 16px; }
  .ct-comment-form-footer { flex-direction: column; align-items: flex-start; }
  .ct-submit-btn { width: 100%; text-align: center; }
  .ct-input { width: 110px; }
}

