/* ============================================
   CSS VARIABLES & THEME SYSTEM
   ============================================ */
:root {
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-soft: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-med: 0 8px 40px rgba(0,0,0,0.10);
  --shadow-strong: 0 16px 60px rgba(0,0,0,0.18);
}

[data-theme="dark"] {
  --bg-primary: #0c0c0f;
  --bg-secondary: #141419;
  --bg-tertiary: #1c1c24;
  --bg-elevated: #22222e;
  --bg-glass: rgba(28, 28, 36, 0.7);
  --text-primary: #f0eff4;
  --text-secondary: #9d9bab;
  --text-tertiary: #6b6979;
  --accent: #7c6aff;
  --accent-hover: #9485ff;
  --accent-subtle: rgba(124, 106, 255, 0.12);
  --accent-glow: rgba(124, 106, 255, 0.25);
  --success: #3ddfa0;
  --success-subtle: rgba(61, 223, 160, 0.12);
  --warning: #ffb347;
  --warning-subtle: rgba(255, 179, 71, 0.12);
  --error: #ff6b7a;
  --error-subtle: rgba(255, 107, 122, 0.12);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --dropzone-border: rgba(124, 106, 255, 0.3);
  --dropzone-bg: rgba(124, 106, 255, 0.04);
  --dropzone-active-bg: rgba(124, 106, 255, 0.1);
  --card-bg: #16161e;
  --input-bg: #1a1a24;
  --scrollbar-thumb: #2a2a38;
  --shadow-soft: 0 2px 20px rgba(0,0,0,0.2);
  --shadow-med: 0 8px 40px rgba(0,0,0,0.3);
  --noise-opacity: 0.03;
}

[data-theme="light"] {
  --bg-primary: #f5f4f8;
  --bg-secondary: #eeedf3;
  --bg-tertiary: #e5e4ec;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --text-primary: #1a1825;
  --text-secondary: #5c5a6e;
  --text-tertiary: #8a889a;
  --accent: #6451e0;
  --accent-hover: #5340cc;
  --accent-subtle: rgba(100, 81, 224, 0.08);
  --accent-glow: rgba(100, 81, 224, 0.15);
  --success: #1aab6d;
  --success-subtle: rgba(26, 171, 109, 0.08);
  --warning: #e08a1e;
  --warning-subtle: rgba(224, 138, 30, 0.08);
  --error: #dc3d4e;
  --error-subtle: rgba(220, 61, 78, 0.08);
  --border: rgba(0,0,0,0.07);
  --border-hover: rgba(0,0,0,0.14);
  --dropzone-border: rgba(100, 81, 224, 0.35);
  --dropzone-bg: rgba(100, 81, 224, 0.03);
  --dropzone-active-bg: rgba(100, 81, 224, 0.08);
  --card-bg: #ffffff;
  --input-bg: #f0eff5;
  --scrollbar-thumb: #cccad6;
  --noise-opacity: 0.02;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 9999;
}

::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* ============================================
   LAYOUT
   ============================================ */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #c084fc);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-title {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 400;
  letter-spacing: 0.03em;
}

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

.privacy-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(61, 223, 160, 0.1);
  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-privacy 2s ease infinite;
}

@keyframes pulse-privacy {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

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

/* ============================================
   HERO
   ============================================ */
.hero {
  text-align: center;
  margin-bottom: 44px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent), #c084fc, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.format-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.format-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
}

.format-badge.highlight {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ============================================
   DROPZONE
   ============================================ */
.dropzone {
  border: 2px dashed var(--dropzone-border);
  border-radius: var(--radius-lg);
  padding: 52px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-med);
  background: var(--dropzone-bg);
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-med);
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--dropzone-active-bg);
}

.dropzone:hover::before,
.dropzone.drag-over::before {
  opacity: 1;
}

.dropzone-content {
  position: relative;
  z-index: 1;
}

.dropzone-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.85;
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.dropzone-hint {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.dropzone-hint span {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.dropzone-formats {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

#fileInput { display: none; }

/* ============================================
   CONVERTER PANEL
   ============================================ */
.converter-panel {
  display: none;
  margin-top: 28px;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.converter-panel.active { display: block; }

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

/* File Card */
.file-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.file-card-inner {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: center;
}

.preview-wrap {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-placeholder {
  font-size: 38px;
  opacity: 0.5;
}

.file-meta {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.file-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.file-tag.type-tag {
  background: var(--accent-subtle);
  color: var(--accent);
}

.btn-remove {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 22px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  line-height: 1;
}

.btn-remove:hover {
  background: var(--error-subtle);
  color: var(--error);
}

/* Conversion Controls */
.conversion-controls {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.controls-header {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.control-row {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.control-group {
  flex: 1;
  min-width: 180px;
}

.control-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.control-group select,
.control-group input[type="range"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.control-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239d9bab' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.control-group select:focus,
.control-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* Quality Slider */
.quality-control {
  display: flex;
  flex-direction: column;
}

.quality-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quality-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 3px;
  background: var(--bg-tertiary) !important;
  cursor: pointer;
  margin-top: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--accent-glow);
  border: 3px solid var(--card-bg);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--accent-glow);
  border: 3px solid var(--card-bg);
}

/* Convert Button */
.btn-convert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), #9b7aff);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn-convert::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.12));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-convert:hover::before { opacity: 1; }

.btn-convert:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

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

.btn-convert:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-convert:disabled::before { display: none; }

/* ============================================
   STATUS MESSAGES
   ============================================ */
.status-bar {
  display: none;
  margin-top: 20px;
  animation: slideUp 0.3s ease;
}

.status-bar.active { display: block; }

.status-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
}

.status-inner.info {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(124, 106, 255, 0.15);
}

.status-inner.success {
  background: var(--success-subtle);
  color: var(--success);
  border: 1px solid rgba(61, 223, 160, 0.15);
}

.status-inner.error {
  background: var(--error-subtle);
  color: var(--error);
  border: 1px solid rgba(255, 107, 122, 0.15);
}

.status-inner.warning {
  background: var(--warning-subtle);
  color: var(--warning);
  border: 1px solid rgba(255, 179, 71, 0.15);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* Progress bar */
.progress-track {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #c084fc);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ============================================
   RESULT PANEL
   ============================================ */
.result-panel {
  display: none;
  margin-top: 20px;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-panel.active { display: block; }

.result-card {
  background: var(--card-bg);
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--success-subtle);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--success);
}

.result-body {
  padding: 20px;
}

.result-previews {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.result-preview-box {
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.result-preview-box img {
  max-width: 100%;
  max-height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--bg-tertiary);
}

.result-preview-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.result-arrow {
  font-size: 24px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.result-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.result-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-stat-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.result-stat-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--success);
  color: #0c0c0f;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: -0.01em;
}

.btn-download:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* ============================================
   INFO SECTION
   ============================================ */
.info-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.info-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: border-color var(--transition-fast);
}

.info-card:hover {
  border-color: var(--border-hover);
}

.info-card-icon {
  font-size: 26px;
  margin-bottom: 12px;
  display: block;
}

.info-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.info-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Conversion Matrix */
.matrix-section {
  margin-top: 36px;
}

.matrix-title {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.8rem;
}

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

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

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

.matrix-table th {
  background: var(--bg-tertiary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.matrix-table td {
  background: var(--card-bg);
}

.matrix-check { color: var(--success); font-weight: bold; }
.matrix-dash { color: var(--text-tertiary); }
.matrix-self { color: var(--text-tertiary); font-size: 0.7rem; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  line-height: 1.7;
}

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

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  .page-wrapper { padding: 24px 16px 60px; }
  .header-inner { height: 56px; }
  .logo-title { font-size: 17px; }
  .logo-subtitle { display: none; }
  .privacy-badge span:not(.privacy-dot) { display: none; }
  .privacy-badge { padding: 8px; }
  .hero { margin-bottom: 32px; }
  .dropzone { padding: 36px 20px; }
  .file-card-inner { flex-direction: column; text-align: center; }
  .preview-wrap { width: 100%; height: 160px; }
  .file-meta { width: 100%; }
  .file-name { white-space: normal; }
  .file-details { justify-content: center; }
  .control-row { flex-direction: column; }
  .control-group { min-width: 100%; }
  .result-previews { flex-direction: column; }
  .result-arrow { transform: rotate(90deg); }
  .info-grid { grid-template-columns: 1fr; }
  .matrix-table { font-size: 0.72rem; }
  .matrix-table th, .matrix-table td { padding: 8px 8px; }
}

/* ===== SITE FOOTER ===== */
.site-footer{
  margin-top:60px;padding:48px 28px 36px;
  border-top:1px solid var(--border);
  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);opacity:.7}
.site-footer h4{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:none;transition:color .2s}
.site-footer a:hover{color:#a855f7}
.site-footer .footer-bottom{
  border-top:1px solid var(--border);
  padding-top:20px;text-align:center;
}
.site-footer .footer-bottom p{color:var(--text-tertiary);font-size:13px;opacity:.7}
.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}
}
