/* ═══════════════════════════════════════════
   CSS VARIABLES & THEMES
   ═══════════════════════════════════════════ */
:root {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 30px rgba(var(--accent-rgb), 0.15);
  --transition-fast: 0.15s ease;
  --transition-med: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #FAFAF8;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F2F0EC;
  --bg-elevated: #FFFFFF;
  --bg-drop: #F7F5F0;
  --text-primary: #1A1A18;
  --text-secondary: #5C5C58;
  --text-tertiary: #8A8A86;
  --text-inverse: #FAFAF8;
  --border-light: #E8E6E1;
  --border-medium: #D4D2CC;
  --accent: #2D5A3D;
  --accent-hover: #3A7350;
  --accent-rgb: 45, 90, 61;
  --accent-light: #E8F0EB;
  --accent-subtle: #F0F6F2;
  --danger: #B83B3B;
  --danger-light: #FCF0F0;
  --warning: #C47B1A;
  --warning-light: #FFF8ED;
  --success: #2D7A4F;
  --success-light: #EDFAF2;
  --info: #2B6CB0;
  --info-light: #EBF4FF;
  --format-eml: #2D5A3D;
  --format-mbox: #7B4B94;
  --format-msg: #C47B1A;
  --format-pdf: #B83B3B;
  --format-html: #2B6CB0;
  --format-txt: #5C5C58;
  --format-csv: #2D7A4F;
  --format-vcf: #8B6914;
  --header-bg: rgba(250, 250, 248, 0.85);
  --drop-border: #C8C6C0;
  --code-bg: #F2F0EC;
  --scrollbar-thumb: #C8C6C0;
  --scrollbar-track: transparent;
}

[data-theme="dark"] {
  --bg-primary: #111110;
  --bg-secondary: #1A1A18;
  --bg-tertiary: #222220;
  --bg-elevated: #252523;
  --bg-drop: #1E1E1C;
  --text-primary: #ECECEA;
  --text-secondary: #A0A09C;
  --text-tertiary: #8E8E8A;
  --text-inverse: #111110;
  --border-light: #2E2E2C;
  --border-medium: #3A3A38;
  --accent: #5AAF7B;
  --accent-hover: #6DC48E;
  --accent-rgb: 90, 175, 123;
  --accent-light: #1A2E22;
  --accent-subtle: #151F1A;
  --danger: #E06060;
  --danger-light: #2A1818;
  --warning: #E0A040;
  --warning-light: #2A2010;
  --success: #5AAF7B;
  --success-light: #142218;
  --info: #60A0E0;
  --info-light: #101E2A;
  --format-eml: #5AAF7B;
  --format-mbox: #B080D0;
  --format-msg: #E0A040;
  --format-pdf: #E06060;
  --format-html: #60A0E0;
  --format-txt: #A0A09C;
  --format-csv: #5AAF7B;
  --format-vcf: #D4A84B;
  --header-bg: rgba(17, 17, 16, 0.9);
  --drop-border: #3A3A38;
  --code-bg: #1A1A18;
  --scrollbar-thumb: #3A3A38;
  --scrollbar-track: transparent;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* Visible focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle:focus-visible,
.convert-btn:focus-visible,
.file-remove:focus-visible,
.preview-toggle:focus-visible,
.status-dismiss:focus-visible,
.browse-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.drop-zone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.format-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-med), color var(--transition-med);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

/* ═══════════════════════════════════════════
   BACKGROUND TEXTURE
   ═══════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(var(--accent-rgb), 0.04), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(var(--accent-rgb), 0.03), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  transition: background var(--transition-med), border-color var(--transition-med);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  transition: background var(--transition-fast);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 18px;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.privacy-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.privacy-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero {
  text-align: center;
  padding: 56px 0 40px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.hero h1 .accent { color: var(--accent); }

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.65;
}

.supported-formats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.format-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.format-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.format-chip[data-format="eml"] .dot { background: var(--format-eml); }
.format-chip[data-format="mbox"] .dot { background: var(--format-mbox); }
.format-chip[data-format="msg"] .dot { background: var(--format-msg); }
.format-chip[data-format="pdf"] .dot { background: var(--format-pdf); }
.format-chip[data-format="html"] .dot { background: var(--format-html); }
.format-chip[data-format="txt"] .dot { background: var(--format-txt); }
.format-chip[data-format="csv"] .dot { background: var(--format-csv); }
.format-chip[data-format="vcf"] .dot { background: var(--format-vcf); }

/* ═══════════════════════════════════════════
   CONVERTER CARD
   ═══════════════════════════════════════════ */
.converter-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-med);
  margin-bottom: 32px;
}

/* Drop Zone */
.drop-zone {
  position: relative;
  padding: 48px 32px;
  border: 2px dashed var(--drop-border);
  border-radius: var(--radius-md);
  margin: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-med);
  background: var(--bg-drop);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: var(--shadow-glow);
}

.drop-zone.drag-over {
  transform: scale(1.005);
}

.drop-zone.has-file {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-light);
  padding: 24px 32px;
}

.drop-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
  transition: all var(--transition-med);
}

.drop-zone:hover .drop-icon,
.drop-zone.drag-over .drop-icon {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.3);
}

.drop-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.drop-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}

.drop-subtitle .browse-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
}

.drop-formats {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

#file-input { display: none; }

/* File Info */
.file-info {
  display: none;
  gap: 16px;
  align-items: center;
}

.drop-zone.has-file .file-info { display: flex; }
.drop-zone.has-file .drop-placeholder { display: none; }

.file-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  font-weight: 700;
  font-family: var(--font-mono);
  color: white;
}

.file-icon-wrap.eml { background: var(--format-eml); }
.file-icon-wrap.mbox { background: var(--format-mbox); }
.file-icon-wrap.msg { background: var(--format-msg); }
.file-icon-wrap.pdf { background: var(--format-pdf); }
.file-icon-wrap.html { background: var(--format-html); }
.file-icon-wrap.txt { background: var(--format-txt); }
.file-icon-wrap.csv { background: var(--format-csv); }
.file-icon-wrap.vcf { background: var(--format-vcf); }

.file-details {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.file-remove {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.file-remove:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}

/* ═══════════════════════════════════════════
   PREVIEW PANEL
   ═══════════════════════════════════════════ */
.preview-panel {
  display: none;
  margin: 0 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.preview-panel.visible { display: block; }

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
}

.preview-header-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.preview-toggle {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.preview-toggle:hover { background: var(--accent-subtle); }

.preview-content {
  max-height: 280px;
  overflow-y: auto;
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-secondary);
}

/* ═══════════════════════════════════════════
   CONVERSION OPTIONS
   ═══════════════════════════════════════════ */
.conversion-section {
  display: none;
  padding: 0 24px 24px;
}

.conversion-section.visible { display: block; }

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.format-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.format-option {
  position: relative;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-secondary);
}

.format-option:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.format-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 1px var(--accent);
}

.format-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.format-option-ext {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.format-option-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.format-option.selected .format-option-ext { color: var(--accent); }

/* Convert Button */
.convert-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: white;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.01em;
}

.convert-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
}

.convert-btn:active:not(:disabled) {
  transform: translateY(0);
}

.convert-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.convert-btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.convert-btn.loading .spinner { display: block; }
.convert-btn.loading .btn-text { display: none; }

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

/* ═══════════════════════════════════════════
   STATUS / TOAST
   ═══════════════════════════════════════════ */
.status-bar {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 24px 20px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  animation: slideUp 0.3s ease;
}

.status-bar.visible { display: flex; }
.status-bar.success { background: var(--success-light); color: var(--success); }
.status-bar.error { background: var(--danger-light); color: var(--danger); }
.status-bar.info { background: var(--info-light); color: var(--info); }
.status-bar.warning { background: var(--warning-light); color: var(--warning); }

.status-icon { font-size: 16px; flex-shrink: 0; }
.status-text { flex: 1; }
.status-dismiss {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  padding: 2px;
}
.status-dismiss:hover { opacity: 1; }

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

/* ═══════════════════════════════════════════
   CONVERSION MATRIX TABLE
   ═══════════════════════════════════════════ */
.matrix-section {
  padding: 40px 0 60px;
}

.matrix-section h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.matrix-section .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.matrix-table th,
.matrix-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.matrix-table th:last-child,
.matrix-table td:last-child { border-right: none; }
.matrix-table tr:last-child td { border-bottom: none; }

.matrix-table thead th {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.matrix-table tbody th {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: left;
  color: var(--text-secondary);
}

.matrix-table .check { color: var(--success); font-size: 16px; }
.matrix-table .dash { color: var(--text-tertiary); opacity: 0.3; }
.matrix-table .self { color: var(--text-tertiary); font-size: 11px; }

/* ═══════════════════════════════════════════
   FEATURES GRID
   ═══════════════════════════════════════════ */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding-bottom: 60px;
}

.feature-card {
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  transition: all var(--transition-fast);
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.feature-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.app-footer {
  margin-top: auto;
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { height: 56px; }
  .logo-text { font-size: 18px; }
  .logo-sub { display: none; }
  .privacy-badge span:not(.privacy-dot) { display: none; }
  .privacy-badge { padding: 8px; }
  .hero { padding: 36px 0 28px; }
  .drop-zone { margin: 16px; padding: 36px 20px; }
  .conversion-section { padding: 0 16px 16px; }
  .preview-panel { margin: 0 16px 16px; }
  .status-bar { margin: 0 16px 16px; }
  .format-options { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
  .format-option { padding: 10px 8px; }
  .features { grid-template-columns: 1fr; }
  .file-info { gap: 10px; }
  .file-name { font-size: 13px; }
}

/* ===== SITE FOOTER ===== */
.site-footer{
  margin-top:60px;padding:48px 28px 36px;
  border-top:1px solid var(--border-light);
  background:var(--bg-primary);color:var(--text-secondary);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  font-size:14px;line-height:1.6;
}
.site-footer .footer-inner{max-width:1100px;margin:0 auto}
.site-footer .footer-grid{
  display:grid;grid-template-columns:2fr 1fr 1fr 1fr;
  gap:40px;margin-bottom:40px;
}
.site-footer .footer-brand{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.site-footer .footer-brand svg{width:32px;height:32px;color:#a855f7;flex-shrink:0}
.site-footer .footer-brand-name{
  font-size:20px;font-weight:700;
  background:linear-gradient(90deg,#8B5CF6,#EC4899,#3B82F6);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
}
.site-footer .footer-desc{color:var(--text-tertiary);margin-bottom:16px;max-width:360px}
.site-footer .footer-copy{font-size:12px;color:var(--text-tertiary)}
.site-footer h2{font-weight:700;margin-bottom:16px;color:var(--text-primary);font-size:15px}
.site-footer ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.site-footer a{color:var(--text-secondary);text-decoration:underline;text-decoration-color:var(--border-light);text-underline-offset:2px;transition:color .2s,text-decoration-color .2s}
.site-footer a:hover{color:#a855f7;text-decoration-color:#a855f7}
.site-footer .footer-bottom{
  border-top:1px solid var(--border-light);
  padding-top:20px;text-align:center;
}
.site-footer .footer-bottom p{color:var(--text-tertiary);font-size:13px}
.site-footer .footer-bottom span{color:#a855f7}

@media(max-width:768px){
  .site-footer .footer-grid{grid-template-columns:1fr;gap:32px}
  .site-footer{padding:36px 16px 28px}
}
