/* 
  国内可用Inter字体配置：双CDN冗余 + 系统字体降级
  优先级：字节跳动CDN → 阿里云CDN → 系统自带无衬线字体
*/

/* 1. 主用：字节跳动CDN（国内访问最快、最稳定） */
@import url('https://lf6-cdn-tos.bytecdntp.com/cdn/expire-100-M/inter/4.0.0/inter.css');

/* 2. 备用：阿里云CDN（主CDN故障时自动 fallback，解除注释即可启用双保险） */
/* @import url('https://g.alicdn.com/msfs/fonts/inter/v4/inter.css'); */

/* 3. Tailwind CSS变量定义（统一管理字体族，方便后续修改） */
:root {
  /* 汉字专用字体族：系统自带楷体，无网络依赖 */
  --font-kai: 'KaiTi', 'STKaiti', 'SimKai', '楷体', 'AR PL UKai CN', ' serif';
  /* 无衬线字体族：CDN Inter → 国内系统字体 → 通用字体，层层降级 */
  --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'Heiti SC', '黑体', 'Arial', 'sans-serif';
}

/* 4. 全局基础样式（确保所有页面默认字体统一） */
html, body {
  font-family: var(--font-sans);
  scroll-behavior: smooth; /* 平滑滚动（可选保留） */
  -webkit-font-smoothing: antialiased; /* 字体抗锯齿，更清晰 */
  -moz-osx-font-smoothing: grayscale;
}

/* 5. 汉字强制楷体规则（所有中文文本默认楷体，不受非中文字体影响） */
*:lang(zh),
*:lang(zh-CN),
*:lang(zh-Hans),
html[lang^="zh"] .text-gray-800:not(.text-french):not(.pinyin-text):not(.footer-link):not(.social-text),
html[lang^="zh"] .text-gray-700:not(.text-french):not(.pinyin-text):not(.footer-link):not(.social-text),
html[lang^="zh"] .text-gray-600:not(.text-french):not(.pinyin-text):not(.footer-link):not(.social-text),
html[lang^="zh"] .text-gray-500:not(.text-french):not(.pinyin-text):not(.footer-link):not(.social-text),
html[lang^="zh"] .text-white:not(.text-french):not(.pinyin-text):not(.footer-link):not(.social-text) {
  font-family: var(--font-kai) !important;
}

/* 6. 非中文文本强制无衬线规则（拼音/法语/英文/表单元素统一样式） */
*:lang(fr),
.text-french,
.pinyin-text,
.footer-link,
.social-text,
footer *,
input,
button,
select,
textarea,
label,
.btn-primary,
.btn-secondary {
  font-family: var(--font-sans) !important;
}

/* 7. 专用工具类（直接通过class调用，简化页面开发） */
/* 法语专用类 */
.text-french {
  font-family: var(--font-sans) !important;
  letter-spacing: 0.02em;
}

/* 拼音专用类（优化声调显示） */
.pinyin-text {
  font-family: var(--font-sans) !important;
  letter-spacing: 0.05em;
  color: #6B7280; /* 拼音默认灰色，与原页面一致 */
}

/* 页脚链接专用类 */
.footer-link {
  font-family: var(--font-sans) !important;
  color: #10B981; /* 强调色 */
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-link:hover {
  color: #059669; /* hover加深色 */
  text-decoration: underline;
}

/* 社交媒体文字专用类 */
.social-text {
  font-family: var(--font-sans) !important;
  color: #9CA3AF; /* 灰色 */
  transition: all 0.3s ease;
}

.social-text:hover {
  color: #10B981; /* hover变强调色 */
}

/* 8. 图标颜色同步（页脚Font Awesome图标） */
footer .fa {
  color: #9CA3AF !important;
  transition: color 0.3s ease;
}

footer a:hover .fa {
  color: #10B981 !important;
}

 .cta-rainbow {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 0.875rem 1.25rem;
   font-weight: 600;
   background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #3b82f6, #8b5cf6, #ec4899);
   background-origin: border-box;
   background-clip: padding-box, border-box;
   border: 2px solid transparent;
   border-radius: 9999px;
   color: #111827;
   box-shadow: 0 6px 16px rgba(0,0,0,0.1);
   transition: transform .15s ease, box-shadow .15s ease;
 }
 
.cta-rainbow:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

 .rainbow-text {
   background-image: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #3b82f6, #8b5cf6, #ec4899);
   -webkit-background-clip: text;
   background-clip: text;
   color: transparent;
 }

/* 9. 兼容性修复（针对部分浏览器字体加载异常） */
@supports not (font-family: 'Inter') {
  :root {
    --font-sans: 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'Heiti SC', '黑体', 'Arial', 'sans-serif';
  }
}