/* SunsetCSS 字体样式 */

/* 自定义字体导入 */
@font-face {
  font-family: 'JasonHandwriting';
  src: url('JasonHandwriting1.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ChillBitmap';
  src: url('ChillBitmap7x.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CineCaption';
  src: url('cinecaption2.28.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'AidianFengyaHei';
  src: url('爱点风雅黑.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 字体变量 */
:root {
  /* 中文字体 */
  --font-sans-cn: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --font-serif-cn: "Songti SC", "SimSun", "STSong", "serif";
  --font-mono-cn: "PingFang SC", "Microsoft YaHei", "Consolas", "Monaco", monospace;
  
  /* 英文字体 */
  --font-sans-en: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif-en: Georgia, "Times New Roman", Times, serif;
  --font-mono-en: "SF Mono", "Monaco", "Inconsolata", "Fira Code", "Droid Sans Mono", "Source Code Pro", monospace;
  
  /* 手写字体 */
  --font-handwriting: 'JasonHandwriting', cursive;
  
  /* 像素字体 */
  --font-pixel: 'ChillBitmap', monospace;
  
  /* 电影字幕字体 */
  --font-cinecaption: 'CineCaption', sans-serif;
  
  /* 中文字体 - 爱点风雅黑 */
  --font-fengya: 'AidianFengyaHei', "Microsoft YaHei", sans-serif;
  
  /* 混合字体（中英文混合） */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Songti SC", "SimSun", "STSong", Georgia, "Times New Roman", Times, serif;
  --font-mono: "SF Mono", "Monaco", "PingFang SC", "Microsoft YaHei", "Consolas", "Inconsolata", "Fira Code", monospace;
  
  /* 字体大小 */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;
  
  /* 字体粗细 */
  --font-weight-thin: 100;
  --font-weight-extralight: 200;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;
  
  /* 行高 */
  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* 字间距 */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  --letter-spacing-widest: 0.1em;
}

/* 基础字体设置 */
html {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
}

/* 字体族类 */
.font-sans {
  font-family: var(--font-sans);
}

.font-serif {
  font-family: var(--font-serif);
}

.font-mono {
  font-family: var(--font-mono);
}

.font-handwriting {
  font-family: var(--font-handwriting);
}

.font-pixel {
  font-family: var(--font-pixel);
}

.font-cinecaption {
  font-family: var(--font-cinecaption);
}

.font-fengya {
  font-family: var(--font-fengya);
}

/* 字体大小类 */
.text-xs {
  font-size: var(--font-size-xs);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-base {
  font-size: var(--font-size-base);
}

.text-lg {
  font-size: var(--font-size-lg);
}

.text-xl {
  font-size: var(--font-size-xl);
}

.text-2xl {
  font-size: var(--font-size-2xl);
}

.text-3xl {
  font-size: var(--font-size-3xl);
}

.text-4xl {
  font-size: var(--font-size-4xl);
}

.text-5xl {
  font-size: var(--font-size-5xl);
}

.text-6xl {
  font-size: var(--font-size-6xl);
}

/* 字体粗细类 */
.font-thin {
  font-weight: var(--font-weight-thin);
}

.font-extralight {
  font-weight: var(--font-weight-extralight);
}

.font-light {
  font-weight: var(--font-weight-light);
}

.font-normal {
  font-weight: var(--font-weight-normal);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

.font-extrabold {
  font-weight: var(--font-weight-extrabold);
}

.font-black {
  font-weight: var(--font-weight-black);
}

/* 行高类 */
.leading-none {
  line-height: var(--line-height-none);
}

.leading-tight {
  line-height: var(--line-height-tight);
}

.leading-snug {
  line-height: var(--line-height-snug);
}

.leading-normal {
  line-height: var(--line-height-normal);
}

.leading-relaxed {
  line-height: var(--line-height-relaxed);
}

.leading-loose {
  line-height: var(--line-height-loose);
}

/* 字间距类 */
.tracking-tighter {
  letter-spacing: var(--letter-spacing-tighter);
}

.tracking-tight {
  letter-spacing: var(--letter-spacing-tight);
}

.tracking-normal {
  letter-spacing: var(--letter-spacing-normal);
}

.tracking-wide {
  letter-spacing: var(--letter-spacing-wide);
}

.tracking-wider {
  letter-spacing: var(--letter-spacing-wider);
}

.tracking-widest {
  letter-spacing: var(--letter-spacing-widest);
}

/* 文本对齐类 */
.text-left {
  text-align: left;
}

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

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

/* 文本装饰类 */
.underline {
  text-decoration: underline;
}

.line-through {
  text-decoration: line-through;
}

.no-underline {
  text-decoration: none;
}

/* 文本转换类 */
.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

/* 文本溢出类 */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overflow-ellipsis {
  text-overflow: ellipsis;
}

.overflow-clip {
  text-overflow: clip;
}

/* 文本换行类 */
.whitespace-normal {
  white-space: normal;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.whitespace-pre {
  white-space: pre;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.whitespace-pre-line {
  white-space: pre-line;
}

/* 文本断行类 */
.break-normal {
  overflow-wrap: normal;
  word-break: normal;
}

.break-words {
  overflow-wrap: break-word;
}

.break-all {
  word-break: break-all;
}

/* 文本阴影类 */
.text-shadow-sm {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
}

.text-shadow-lg {
  text-shadow: 4px 4px 16px rgba(0, 0, 0, 0.2);
}

.text-shadow-none {
  text-shadow: none;
}

/* 特殊字体效果类 */
.font-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, var(--primary), var(--secondary));
}

.font-gradient-primary {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: var(--gradient-primary);
}

.font-gradient-secondary {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: var(--gradient-secondary);
}

.font-gradient-success {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: var(--gradient-success);
}

.font-gradient-danger {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: var(--gradient-danger);
}

/* 响应式字体大小 */
@media (max-width: 640px) {
  .text-responsive-xl {
    font-size: var(--font-size-xl);
  }
  .text-responsive-2xl {
    font-size: var(--font-size-xl);
  }
  .text-responsive-3xl {
    font-size: var(--font-size-2xl);
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .text-responsive-xl {
    font-size: var(--font-size-2xl);
  }
  .text-responsive-2xl {
    font-size: var(--font-size-2xl);
  }
  .text-responsive-3xl {
    font-size: var(--font-size-3xl);
  }
}

@media (min-width: 769px) {
  .text-responsive-xl {
    font-size: var(--font-size-xl);
  }
  .text-responsive-2xl {
    font-size: var(--font-size-2xl);
  }
  .text-responsive-3xl {
    font-size: var(--font-size-3xl);
  }
}

/* 打印样式 */
@media print {
  body {
    font-family: var(--font-serif);
    font-size: 12pt;
    line-height: 1.5;
  }
  
  .no-print {
    display: none;
  }
}

/* 无障碍字体 */
.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* 字体加载状态 */
.font-loading {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.font-loaded {
  opacity: 1;
}