/* ── CSVFixer Stylesheet ─────────────────────────────────────────── */
/* Aesthetic: Industrial Utility — dark canvas, neon data-green accent */

:root {
  --bg:        #0c0d10;
  --bg-card:   #13151b;
  --bg-card2:  #1a1d26;
  --border:    rgba(255,255,255,0.08);
  --border-md: rgba(255,255,255,0.13);
  --text:      #e8eaf0;
  --text-muted:#7b8099;
  --green:     #00e5a0;
  --green-dim: rgba(0,229,160,0.12);
  --green-glow:rgba(0,229,160,0.25);
  --blue:      #3b82f6;
  --blue-dim:  rgba(59,130,246,0.12);
  --red:       #f87171;
  --red-dim:   rgba(248,113,113,0.12);
  --yellow:    #fbbf24;
  --yellow-dim:rgba(251,191,36,0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient Background ── */
.ambient-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #00e5a0 0%, transparent 70%);
  top: -200px; left: -150px;
  animation: drift1 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  bottom: -180px; right: -100px;
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(80px, 60px) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, -40px) scale(1.1); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ── Navbar ── */
.navbar {
  position: relative; z-index: 100;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
  background: rgba(12,13,16,0.7);
  backdrop-filter: blur(12px);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--green-dim);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  font-size: 18px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.5px;
}
.brand-accent { color: var(--green); }
.nav-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ── Hero ── */
.hero-section {
  position: relative; z-index: 1;
  padding: 5rem 0 6rem;
}
.hero-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(0,229,160,0.25);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1.2rem;
  color: var(--text);
}
.hero-title .highlight {
  color: var(--green);
  position: relative;
  display: inline-block;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Feature pills */
.feature-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.2s;
}
.pill i { color: var(--green); font-size: 11px; }
.pill:hover {
  border-color: var(--border-md);
  color: var(--text);
}

/* ── Upload Card ── */
.upload-card {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 0 0 1px rgba(0,229,160,0.04),
              0 20px 60px rgba(0,0,0,0.5);
}

.drop-zone {
  position: relative;
  border: 2px dashed var(--border-md);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: rgba(255,255,255,0.02);
  margin-bottom: 1.2rem;
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--green);
  background: var(--green-dim);
}
.drop-zone.dragover { transform: scale(1.01); }

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

.drop-icon {
  font-size: 2.6rem;
  color: var(--green);
  margin-bottom: 0.75rem;
  line-height: 1;
  opacity: 0.8;
}
.drop-text { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }
.drop-text strong { color: var(--text); }
.browse-link {
  color: var(--green);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drop-selected {
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
  color: var(--green);
  font-weight: 500;
  font-size: 0.95rem;
}
.drop-selected i { font-size: 1.3rem; }

.btn-fix {
  width: 100%;
  background: var(--green);
  color: #0a0c0f;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-fix:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.btn-fix:not(:disabled):hover {
  background: #00ffa8;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--green-glow);
}

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #0a0c0f;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.upload-note {
  margin-top: 1rem;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
}
.upload-note i { margin-right: 4px; }

/* ── Alert bar ── */
.alert-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}
.alert-bar-danger {
  background: var(--red-dim);
  border: 1px solid rgba(248,113,113,0.25);
  color: var(--red);
}

/* ── How It Works ── */
.how-it-works {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
}
.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  text-align: center;
}
.steps-row {
  display: flex; align-items: flex-start;
  gap: 0.5rem;
}
.step {
  flex: 1;
  text-align: center;
  padding: 0 0.5rem;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  opacity: 0.6;
}
.step-icon {
  font-size: 1.6rem;
  color: var(--green);
  margin-bottom: 0.6rem;
}
.step-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.step-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.step-arrow {
  flex-shrink: 0;
  color: var(--border-md);
  font-size: 1.2rem;
  margin-top: 2.5rem;
}

/* ── Result page ── */
.result-section {
  position: relative; z-index: 1;
  padding: 4rem 0 6rem;
}
.result-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(0,229,160,0.25);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.result-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 0.6rem;
}
.result-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Stat cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.2rem;
  text-align: center;
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.3rem;
}
.stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.stat-blue .stat-value { color: var(--blue); }
.stat-blue { border-color: rgba(59,130,246,0.2); background-color: var(--blue-dim); }
.stat-red  .stat-value { color: var(--red); }
.stat-red  { border-color: rgba(248,113,113,0.2); background-color: var(--red-dim); }
.stat-green .stat-value { color: var(--green); }
.stat-green { border-color: rgba(0,229,160,0.2); background-color: var(--green-dim); }
.stat-yellow .stat-value { color: var(--yellow); }
.stat-yellow { border-color: rgba(251,191,36,0.2); background-color: var(--yellow-dim); }

/* Meta strip */
.meta-strip {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  font-size: 0.82rem;
}
.meta-item {
  display: flex; align-items: center; gap: 7px;
  color: var(--text-muted);
}
.meta-item i { color: var(--green); font-size: 0.95rem; }
.meta-item strong { color: var(--text); }
.meta-confidence { color: var(--text-muted); font-size: 0.75rem; }
.meta-divider {
  width: 1px; height: 18px;
  background: var(--border);
  flex-shrink: 0;
}
.mono { font-family: var(--font-mono); }

/* Download button */
.btn-download {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--green);
  color: #0a0c0f;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.9rem 2rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  margin-right: 0.75rem;
}
.btn-download:hover {
  background: #00ffa8;
  color: #0a0c0f;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--green-glow);
}
.btn-again {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-again:hover {
  color: var(--text);
  border-color: var(--border-md);
  background: rgba(255,255,255,0.04);
}

/* Preview table */
.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card2);
}
.preview-title {
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
}
.preview-title i { color: var(--green); }
.preview-note { font-weight: 400; }
.preview-body {
  overflow-x: auto;
  padding: 0;
}
.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}
.preview-table thead tr {
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border-md);
}
.preview-table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}
.preview-table td {
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-table tbody tr:last-child td { border-bottom: none; }
.preview-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ── Footer ── */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}
.site-footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .steps-row { flex-direction: column; }
  .step-arrow { display: none; }
  .meta-strip { flex-direction: column; align-items: flex-start; }
  .meta-divider { width: 100%; height: 1px; }
  .btn-download, .btn-again { width: 100%; justify-content: center; margin-right: 0; }
  .btn-download { margin-bottom: 0.5rem; }
}
