/* ===== GEO输入法 - 共享样式 ===== */

/* ----- CSS Variables ----- */
:root {
  --primary: #FF5F1F;
  --primary-dark: #4338CA;
  --primary-light: #EEF2FF;
  --accent: #7C3AED;
  --text: #1F2937;
  --text-secondary: #6B7280;
  --bg: #FFFFFF;
  --bg-gray: #F9FAFB;
  --border: #E5E7EB;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ----- Header ----- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-link img { height: 40px; width: auto; }

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.logo-text span { color: var(--primary); }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 8px; }

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.main-nav .btn-download-header {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 22px;
  margin-left: 4px;
}

.main-nav .btn-download-header:hover {
  background: var(--primary-dark);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--text);
  padding: 4px 8px;
}

/* ----- Footer ----- */
.site-footer {
  background: #111827;
  color: #D1D5DB;
  padding: 48px 24px 24px;
  margin-top: 64px;
}

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

.footer-brand .logo-link { margin-bottom: 12px; }
.footer-brand .logo-text { color: #fff; }
.footer-brand p { font-size: 14px; line-height: 1.8; margin-top: 8px; }

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #9CA3AF;
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid #374151;
  text-align: center;
  font-size: 13px;
  color: #6B7280;
}

/* ----- Page Layout ----- */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Hero Section ----- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero .subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: 10px; font-size: 16px; font-weight: 600; transition: all 0.2s; border: none; cursor: pointer; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); color: #fff; }

.btn-outline { background: var(--bg); color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

.btn-lg { padding: 16px 40px; font-size: 18px; border-radius: 12px; }

/* ----- Section ----- */
.section { padding: 64px 0; }

.section-title {
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 16px;
}

/* ----- Feature Cards ----- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.3s;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-card .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 20px;
}

.feature-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }

.feature-card p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

/* ----- Download Card ----- */
.download-card {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px;
  padding: 48px 40px;
  color: #fff;
  text-align: center;
  margin: 48px 0;
}

.download-card h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }

.download-card p { font-size: 16px; opacity: 0.9; margin-bottom: 28px; }

.download-card .btn {
  background: #fff;
  color: var(--primary);
  font-size: 18px;
  padding: 16px 48px;
}

.download-card .btn:hover { background: #F3F4F6; transform: translateY(-1px); }

.download-meta { margin-top: 16px; font-size: 13px; opacity: 0.7; }

/* ----- Article Card ----- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

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

.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.article-card .card-img {
  height: 180px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card .card-body { padding: 24px; }

.article-card .card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.article-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }

.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--primary); }

.article-card .card-date { font-size: 13px; color: var(--text-secondary); }

/* ----- Article Page ----- */
.article-page { padding: 48px 0; }

.article-header { text-align: center; margin-bottom: 40px; }

.article-header h1 { font-size: 34px; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }

.article-meta { color: var(--text-secondary); font-size: 14px; }

.article-body { max-width: 760px; margin: 0 auto; }

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}

.article-body h3 { font-size: 19px; font-weight: 600; margin: 28px 0 12px; }

.article-body p { font-size: 16px; line-height: 1.85; margin-bottom: 18px; color: #374151; }

.article-body ul, .article-body ol { margin: 16px 0 24px 24px; }
.article-body li { margin-bottom: 10px; font-size: 16px; line-height: 1.7; }

.article-body .faq-item {
  background: var(--bg-gray);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.article-body .faq-item h4 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }

.article-body .faq-item p { margin-bottom: 0; }

.article-illustration {
  display: block;
  max-width: 100%;
  margin: 32px auto;
  border-radius: var(--radius);
}

.article-cta {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin: 40px 0;
}

.article-cta h3 { margin-top: 0; }

/* ----- Download Page ----- */
.download-hero { padding: 64px 0 40px; text-align: center; }

.download-hero h1 { font-size: 38px; font-weight: 800; }

.download-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
}

.download-table th, .download-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.download-table th { background: var(--bg-gray); font-weight: 600; font-size: 14px; color: var(--text-secondary); }

.download-table td { font-size: 15px; }

/* ----- Breadcrumb ----- */
.breadcrumb { padding: 16px 0; font-size: 14px; color: var(--text-secondary); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span { color: var(--text); }

/* ----- Stats ----- */
.stats-row { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; margin: 40px 0; }

.stat-item { text-align: center; }

.stat-num { font-size: 40px; font-weight: 800; color: var(--primary); }

.stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

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

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

  .section-title { font-size: 24px; }

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

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

  .stats-row { gap: 24px; }
  .stat-num { font-size: 30px; }

  .download-card { padding: 32px 20px; }
  .download-card h2 { font-size: 22px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .btn-lg { padding: 14px 28px; font-size: 16px; }
}

/* Print */
@media print {
  .site-header, .site-footer, .btn { display: none; }
}

/* ----- Card Image with FA Icon (replaces SVG emoji) ----- */
.card-img-fa {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.card-img-fa .fa-icon {
  font-size: 40px;
  opacity: 0.85;
}

.card-img-fa .fa-label {
  font-size: 14px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.card-img-fa .fa-sub {
  font-size: 12px;
  opacity: 0.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ----- Three-Mode Showcase (Hero scene) ----- */
.three-mode-showcase {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.mode-card {
  flex: 1;
  min-width: 220px;
  max-width: 260px;
  border-radius: 16px;
  padding: 32px 20px 24px;
  text-align: center;
  border: 2px solid;
}

.mode-card.mode-pinyin {
  background: #EEF2FF;
  border-color: #C7D2FE;
}

.mode-card.mode-voice {
  background: #FEF3C7;
  border-color: #FCD34D;
}

.mode-card.mode-handwrite {
  background: #ECFDF5;
  border-color: #6EE7B7;
}

.mode-card-header {
  margin-bottom: 12px;
}

.mode-badge {
  display: inline-block;
  background: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: #4F46E5;
  font-family: monospace;
  border: 1px solid #A5B4FC;
}

.mode-card-body {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-card-label {
  font-size: 13px;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Voice pulse icon */
.mode-icon-pulse {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #F59E0B;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
}

.mode-icon-pulse::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #F59E0B;
  opacity: 0.25;
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.35; }
  100% { transform: scale(1.6); opacity: 0; }
}

.mode-voice-text {
  font-size: 14px;
  color: #92400E;
  font-weight: 500;
  margin-bottom: 16px;
}

/* Handwrite char display */
.mode-handwrite-char {
  font-size: 44px;
  color: #047857;
  font-weight: 700;
  font-family: "KaiTi", "STKaiti", "楷体", serif;
  margin-bottom: 8px;
}

.mode-handwrite-hint {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 16px;
}

/* ----- Article Hero Banner (FA-based) ----- */
.article-hero-banner {
  max-width: 760px;
  margin: 0 auto 32px;
  border-radius: 12px;
  padding: 40px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.article-hero-banner .hero-icon-wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  flex-shrink: 0;
}

.article-hero-banner .hero-info {
  flex: 1;
  min-width: 200px;
}

.article-hero-banner .hero-info .hero-tagline {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-hero-banner .hero-info .hero-detail {
  font-size: 13px;
  opacity: 0.75;
  line-height: 1.6;
}

/* Responsive for three-mode */
@media (max-width: 768px) {
  .three-mode-showcase {
    flex-direction: column;
    align-items: center;
  }
  .mode-card {
    max-width: 100%;
    min-width: auto;
    width: 100%;
  }
  .article-hero-banner {
    flex-direction: column;
    text-align: center;
  }
}
