/**
 * SGE 文案助手 - Base Styles
 * Design System v1.9 — CSS Variables + Reset
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
  /* Primary Colors */
  --color-primary: #D4A5A5;
  --color-primary-light: #E8C4C4;
  --color-primary-dark: #C08A8A;
  --color-secondary: #B8A9C9;
  --color-secondary-light: #D4C9E0;
  --color-secondary-dark: #9B8AB0;

  /* v1.9 Palette — DS 標準名稱 */
  --color-rose: #D4A5A5;
  --color-lavender: #B8A9C9;
  --color-blush: #F5D0C5;
  --color-dusty-rose: #C9929A;
  --color-nadeshiko: #E8B4B8;
  --color-sakura: #FEDFE1;
  --color-lotus: #9B7E93;
  --color-wisteria: #C4B7D7;
  --color-bellflower: #8F77B5;
  --color-sage: #A8B5A0;
  --color-mist: #E8E4E1;
  --color-warm-gray: #B5ADA7;
  --color-charcoal: #5C5856;

  /* Status Colors — v1.9 */
  --color-success: #7BAE7F;
  --color-warning: #D4A85A;
  --color-error: #C97070;
  --color-info: #6B9EC2;

  /* Text */
  --color-text: #333333;
  --color-text-secondary: #4A4A4A;
  --color-text-muted: #888888;
  --color-text-light: #AAAAAA;

  /* Background */
  --color-bg: #FAFAFA;
  --color-bg-card: #FFFFFF;
  --color-bg-hover: #F5F5F5;
  --color-border: #E8E4E1;
  --color-border-light: #F0EDE9;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #D4A5A5, #B8A9C9);
  --gradient-light: linear-gradient(180deg, #FFFFFF, #FAFAFA);
  --gradient-pink-purple: linear-gradient(135deg, #F5D0C5, #C4B7D7);

  /* Typography */
  --font-title: 'GenSenRounded', 'Noto Sans TC', sans-serif;
  --font-body: 'GenSenRounded', 'Noto Sans TC', sans-serif;
  --font-ui: 'Noto Sans TC', sans-serif;
  --font-display: 'GenSenRounded', 'Noto Sans TC', sans-serif;
  --font-heading: 'GenSenRounded', 'Noto Sans TC', sans-serif;
  --font-small: 'Noto Sans TC', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing — 4px 基準 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --header-height: 64px;
  --footer-height: 60px;
  --panel-gap: 24px;
}

/* Dark Mode — v1.9 暖可可配色 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1E181B;
    --color-bg-card: #282224;
    --color-bg-hover: #3D3538;
    --color-text: #EDE8E9;
    --color-text-secondary: #C8C0C2;
    --color-text-muted: #9E9496;
    --color-border: #4D4548;
    --color-border-light: #3D3538;
    --color-primary: #E0AFAF;
    --color-secondary: #C8B9DB;
    --color-success: #8FC093;
    --color-warning: #DEBB78;
    --color-error: #D48A8A;
    --color-info: #88B5D4;
  }
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-ui);
  font-size: 1rem;
}
