/* ========================================
   DiffDone — Clean Professional Styles
   ======================================== */

:root {
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --green: #059669;
  --red: #dc2626;
  --yellow: #d97706;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

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

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 18px;
  border-radius: 8px;
}

.brand-text {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.nav-links { display: flex; gap: 20px; }
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero {
  text-align: center;
  padding: 60px 24px 40px;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
}

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

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-landing { padding: 48px 24px 32px; }

/* Upload Section */
.upload-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.upload-form { width: 100%; }

.upload-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.upload-box {
  flex: 1;
  max-width: 380px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg-secondary);
}

.upload-box:hover { border-color: var(--accent); background: #eef2ff; }
.upload-box.drag-over { border-color: var(--accent); background: #e0e7ff; }
.upload-box.has-file { border-color: var(--green); background: #ecfdf5; border-style: solid; }

.upload-box input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  cursor: pointer;
  text-align: center;
}

.upload-icon { color: var(--text-secondary); }
.upload-title { font-weight: 600; font-size: 16px; }
.upload-hint { font-size: 13px; color: var(--text-secondary); }
.file-name { font-size: 13px; color: var(--accent); font-weight: 500; word-break: break-all; }

.upload-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-divider span {
  font-weight: 800;
  font-size: 18px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 8px;
}

.btn-compare {
  display: block;
  margin: 0 auto;
  padding: 14px 48px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  text-decoration: none;
  text-align: center;
  width: fit-content;
}

.btn-compare:hover { background: var(--accent-hover); }
.btn-compare:disabled { opacity: 0.4; cursor: not-allowed; }

.error-box {
  max-width: 600px;
  margin: 16px auto;
  padding: 12px 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: var(--red);
  font-size: 14px;
}

/* Features */
.features {
  display: flex;
  justify-content: center;
  gap: 32px;
  max-width: 900px;
  margin: 60px auto;
  padding: 0 24px;
}

.feature {
  flex: 1;
  text-align: center;
  padding: 24px;
}

.feature h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* How it Works */
.how-it-works {
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 24px;
  text-align: center;
}

.how-it-works h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 15px;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* Result Page */
.result-hero {
  text-align: center;
  padding: 32px 24px 16px;
}

.result-hero h1 { font-size: 32px; font-weight: 700; }

.file-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.file-label {
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-secondary);
  padding: 6px 16px;
  border-radius: 20px;
  color: var(--text);
}

.vs-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  max-width: 600px;
  margin: 0 auto 32px;
  padding: 0 24px;
}

.stat {
  text-align: center;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.stat-num { font-size: 28px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.stat.has-changes .stat-num { color: var(--accent); }

/* Diff Container (difflib output) */
.diff-container {
  max-width: 1000px;
  margin: 0 auto 40px;
  padding: 0 24px;
  overflow-x: auto;
}

.diff-container table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.diff-container td {
  padding: 2px 8px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.diff_header {
  background: var(--bg-secondary) !important;
  font-weight: 600;
  padding: 8px !important;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.diff_next { display: none; }

.diff_add { background: #dcfce7; }
.diff_sub { background: #fee2e2; }
.diff_chg { background: #fef3c7; }

/* CTA */
.cta-section { text-align: center; padding: 24px 24px 60px; }

/* Privacy */
.privacy-content {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 24px;
}

.privacy-content h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.privacy-content h2 { font-size: 20px; font-weight: 600; margin-top: 32px; margin-bottom: 12px; }
.privacy-content p, .privacy-content li { color: var(--text-secondary); margin-bottom: 8px; font-size: 15px; line-height: 1.7; }
.privacy-content ul { padding-left: 24px; }

/* Footer */
footer {
  margin-top: auto;
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .upload-grid { flex-direction: column; }
  .upload-box { max-width: 100%; width: 100%; }
  .upload-divider { padding: 8px 0; }
  .features, .steps { flex-direction: column; }
  .diff-container { font-size: 11px; }
}
