/* ==========================================================================
   MINIMALIST & ULTRA-LIGHTWEIGHT DESIGN SYSTEM
   - 0 External Font / 0 Framework Dependencies
   - Pure CSS Variables & Responsive Architecture (< 12 KB)
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* 60-30-10 Color Architecture */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #3b82f6;
  
  --brand-primary: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-light: #eff6ff;
  
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --danger: #dc2626;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Container */
.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navbar */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  background: var(--brand-primary);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.lang-switch:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Tool Header */
.tool-hero {
  text-align: center;
  padding: 2.25rem 0 1.5rem;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: var(--brand-light);
  color: var(--brand-primary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.tool-title {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.tool-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Tool Workspace Box */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
  background: #fbfcfe;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand-primary);
  background: var(--brand-light);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--brand-primary);
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.dropzone-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Control Settings */
.controls-panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.control-group {
  margin-bottom: 1.25rem;
}

.control-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preset-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  border-color: var(--border-hover);
  background: white;
}

.preset-btn.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.slider-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-input {
  flex: 1;
  accent-color: var(--brand-primary);
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 48px;
  color: var(--text-primary);
}

/* Action Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--brand-primary);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

/* Results Card */
.result-card {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: none;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  background: white;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid var(--border-light);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

.stat-value.saved {
  color: var(--success);
}

/* SEO Content & FAQ Section */
.seo-section {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 3rem;
}

.seo-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.seo-section h2:first-child {
  margin-top: 0;
}

.seo-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.steps-list {
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.steps-list li {
  margin-bottom: 0.5rem;
}

/* Accordion FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-light);
  background: white;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .tool-title { font-size: 1.5rem; }
  .tool-card { padding: 1.25rem; }
  .dropzone { padding: 2rem 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
}
