/* =============================================
   TOOLS.ZHCZLX.COM — Design System
   Inspired by Open Design / Vercel Design System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f5;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: #f0f0f0;
  --bg-toolbar: #fafafa;

  /* Text */
  --text-primary: #171717;
  --text-secondary: #4d4d4d;
  --text-tertiary: #808080;
  --text-placeholder: #a0a0a0;
  --text-inverse: #ffffff;

  /* Borders */
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-strong: rgba(0, 0, 0, 0.12);

  /* Shadows */
  --shadow-sm: 0px 0px 0px 1px rgba(0,0,0,0.08), 0px 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0px 0px 0px 1px rgba(0,0,0,0.08), 0px 2px 4px rgba(0,0,0,0.04), 0px 8px 16px -8px rgba(0,0,0,0.06);
  --shadow-lg: 0px 0px 0px 1px rgba(0,0,0,0.08), 0px 4px 8px rgba(0,0,0,0.04), 0px 16px 24px -8px rgba(0,0,0,0.08);
  --shadow-inset: inset 0px 0px 0px 1px rgba(0,0,0,0.08);

  /* Accents */
  --accent: #0072f5;
  --accent-hover: #005cc9;
  --accent-light: #ebf5ff;
  --accent-ring: hsla(212, 100%, 48%, 1);

  /* Status colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --header-height: 64px;
  --max-width: 1200px;
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-card: #111113;
    --bg-input: #18181b;
    --bg-hover: #27272a;
    --bg-toolbar: #18181b;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-placeholder: #52525b;
    --text-inverse: #0a0a0b;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-strong: rgba(255, 255, 255, 0.12);

    --shadow-sm: 0px 0px 0px 1px rgba(255,255,255,0.06), 0px 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0px 0px 0px 1px rgba(255,255,255,0.06), 0px 2px 4px rgba(0,0,0,0.2), 0px 8px 16px -8px rgba(0,0,0,0.3);
    --shadow-lg: 0px 0px 0px 1px rgba(255,255,255,0.06), 0px 4px 8px rgba(0,0,0,0.2), 0px 16px 24px -8px rgba(0,0,0,0.4);

    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-light: rgba(59, 130, 246, 0.1);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-normal), color var(--transition-normal);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-normal);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.header-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: 700;
  transition: transform var(--transition-fast);
}

.header-logo:hover .logo-icon {
  transform: scale(1.05);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  line-height: 1;
}

.header-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.header-nav a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 18px;
  transition: all var(--transition-fast);
  margin-left: 8px;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ===== CONTAINER ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ===== PAGE HERO ===== */
.page-hero {
  padding: 60px 0 40px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.page-hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.page-hero p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== TOOL GRID (Homepage) ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding-bottom: 80px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:active {
  transform: translateY(0);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: var(--accent-light);
}

.tool-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.tool-card .tag {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  align-self: flex-start;
}

/* ===== TOOL PAGE LAYOUT ===== */
.tool-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0 80px;
}

.tool-header {
  margin-bottom: 32px;
}

.tool-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.tool-header .breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.tool-header .breadcrumb a:hover {
  color: var(--accent);
}

.tool-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}

.tool-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ===== TOOL CARD (individual tool container) ===== */
.tool-card-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.tool-card-container:focus-within {
  box-shadow: var(--shadow-md), 0 0 0 2px var(--accent-ring);
}

.tool-body {
  padding: 32px;
}

.tool-footer {
  padding: 16px 32px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-footer .hint {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== FORM ELEMENTS ===== */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.input-group .label-hint {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 12px;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: all var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0px 0px 0px 1px transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.1), 0px 2px 6px rgba(59,130,246,0.3);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color-strong);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color-strong);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--text-tertiary);
}

.btn-icon.copied {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

/* ===== OUTPUT FIELD ===== */
.output-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
  min-height: 44px;
  color: var(--text-primary);
  position: relative;
}

.output-field .output-text {
  flex: 1;
}

/* ===== STRENGTH METER ===== */
.strength-meter {
  display: flex;
  gap: 4px;
  margin: 8px 0 16px;
}

.strength-bar {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--bg-tertiary);
  transition: all var(--transition-normal);
}

.strength-bar.active.weak { background: var(--error); }
.strength-bar.active.medium { background: var(--warning); }
.strength-bar.active.strong { background: var(--info); }
.strength-bar.active.very-strong { background: var(--success); }

.strength-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.strength-label.weak { color: var(--error); }
.strength-label.medium { color: var(--warning); }
.strength-label.strong { color: var(--info); }
.strength-label.very-strong { color: var(--success); }

/* ===== CHECKBOX / TOGGLE ===== */
.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
  user-select: none;
}

.toggle-label:hover {
  border-color: var(--accent);
}

.toggle-label.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.toggle-label input[type="checkbox"] {
  display: none;
}

/* ===== SLIDER ===== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  border: none;
  box-shadow: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.1), 0px 2px 4px rgba(0,0,0,0.15);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* ===== CHECKBOX (native style) ===== */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ===== RESULT STATS ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.stat-item {
  text-align: center;
  padding: 16px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.stat-item .stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--accent);
  line-height: 1.2;
}

.stat-item .stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 4px;
}

/* ===== CONVERTER ROW ===== */
.converter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.converter-row .input-wrap {
  flex: 1;
}

.converter-row .swap-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color-strong);
  background: var(--bg-input);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  margin-top: 20px;
}

.converter-row .swap-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
  transform: rotate(180deg);
}

/* ===== UNIT CATEGORY TABS ===== */
.unit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.unit-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.unit-tab:hover {
  color: var(--text-primary);
}

.unit-tab.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ===== TEXT TOOLS ===== */
.text-area-wrap {
  position: relative;
}

.text-area-wrap .char-count {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

/* ===== UUID LIST ===== */
.uuid-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
}

.uuid-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  gap: 12px;
}

.uuid-item .uuid-text {
  flex: 1;
  word-break: break-all;
}

/* ===== COLOR PICKER ===== */
.color-preview-area {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.color-swatch {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.color-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-input-wrap input[type="color"] {
  width: 60px;
  height: 60px;
  padding: 0;
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: none;
}

.color-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.color-value-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 13px;
}

.color-value-item .label {
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  min-width: 32px;
}

.color-value-item .value {
  flex: 1;
  word-break: break-all;
}

.color-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.color-history-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.color-history-swatch:hover {
  transform: scale(1.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  
  .tool-body {
    padding: 20px;
  }
  
  .tool-footer {
    padding: 12px 20px;
    flex-direction: column;
    text-align: center;
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .converter-row {
    flex-direction: column;
  }
  
  .converter-row .swap-btn {
    margin-top: 0;
    transform: rotate(90deg);
  }
  
  .converter-row .swap-btn:hover {
    transform: rotate(270deg);
  }
  
  .color-preview-area {
    flex-direction: column;
  }
  
  .color-swatch {
    width: 100%;
    height: 80px;
  }
  
  .color-values {
    grid-template-columns: 1fr;
  }
  
  .unit-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .header-nav a span {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .page-hero {
    padding: 40px 0 24px;
  }
  
  .tool-section {
    padding: 24px 0 60px;
  }
  
  .action-bar {
    flex-direction: column;
  }
  
  .action-bar .btn {
    width: 100%;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-in {
  animation: fadeIn 0.4s ease both;
}

.animate-slide-up {
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all var(--transition-slow);
  z-index: 999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.empty-state .icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-inner a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-inner a:hover {
  color: var(--accent);
}
