/* Tailwind配置 - 防止样式冲突 */
@layer base {
  :root {
    /* 设计令牌 - 颜色 */
    --color-primary: #1a1a1a;
    --color-secondary: #666666;
    --color-accent: #f5f5f5;
    --color-neutral-50: #fafafa;
    --color-neutral-100: #f5f5f5;
    --color-neutral-200: #e5e5e5;
    --color-neutral-300: #d4d4d4;
    --color-neutral-400: #a3a3a3;
    --color-neutral-500: #737373;
    --color-neutral-600: #525252;
    --color-neutral-700: #404040;
    --color-neutral-800: #262626;
    --color-neutral-900: #171717;
    
    /* 设计令牌 - 间距 */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* 设计令牌 - 排版 */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --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;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* 设计令牌 - 圆角 */
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    
    /* 设计令牌 - 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }
}

/* 全局基础样式 */
@layer base {
  * {
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-neutral-800);
    background-color: var(--color-neutral-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: var(--line-height-tight);
    color: var(--color-primary);
  }
  
  p {
    margin-top: 0;
    margin-bottom: var(--space-md);
  }
  
  a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
  }
  
  a:hover {
    color: var(--color-neutral-600);
  }
  
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* 组件样式 */
@layer components {
  /* 导航栏样式 */
  .nav-fixed {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 50;
    box-shadow: var(--shadow-sm);
  }
  
  /* 卡片悬停效果 */
  .card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
  
  /* 按钮样式 */
  .btn-ghost {
    background: transparent;
    border: none;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    transition: all 0.2s ease;
  }
  
  .btn-ghost:hover {
    background-color: var(--color-neutral-100);
  }
  
  /* 装饰线 */
  .decorative-line {
    width: 60px;
    height: 1px;
    background-color: var(--color-neutral-300);
    margin: var(--space-lg) auto;
  }
}

/* 工具类 */
@layer utilities {
  .text-serif {
    font-family: var(--font-serif);
  }
  
  .text-sans {
    font-family: var(--font-sans);
  }
  
  .text-balance {
    text-wrap: balance;
  }
  
  .animate-fade-in {
    animation: fadeIn 0.6s ease-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}