/* ── Theme Variables ─────────────────────────────────────────────────── */

:root {
  --bg-primary: #0b1929;
  --bg-card: #111d2e;
  --accent-blue: #3b82f6;
  --accent-blue-dim: #1e3a5f;
  --success-green: #10b981;
  --warning-amber: #f59e0b;
  --text-primary: #e2e8f0;
  --text-muted: #64748b;
  --text-secondary: #94a3b8;
  --border-color: #1e293b;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ────────────────────────────────────────────────────── */

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Header ──────────────────────────────────────────────────────────── */

.header {
  width: 100%;
  max-width: 560px;
}

.header-accent {
  height: 4px;
  background: var(--accent-blue);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 8px;
}

.header-right {
  display: flex;
  align-items: center;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.header-title:hover {
  color: var(--accent-blue);
}

.header-version {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
}

.header-github {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.header-github:hover {
  color: var(--accent-blue);
}

.header-byline {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.header-byline:hover {
  color: var(--accent-blue);
}

.header-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 24px;
}

/* ── Privacy banner ──────────────────────────────────────────────────── */

.privacy-banner {
  width: 100%;
  max-width: 560px;
  padding: 6px 24px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.privacy-icon {
  font-size: 11px;
}

/* ── Content ─────────────────────────────────────────────────────────── */

.content {
  width: 100%;
  max-width: 560px;
  padding: 0 24px 24px;
}

/* ── Screen states ───────────────────────────────────────────────────── */

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

.screen-title {
  font-size: 16px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 6px;
}

.screen-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── Drop Zone ───────────────────────────────────────────────────────── */

.drop-zone {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.dragover {
  border-color: var(--accent-blue);
  background: #0d2240;
}

.drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px;
}

.drop-icon {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.drop-text {
  font-size: 14px;
  color: var(--text-muted);
}

.drop-hint {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: 6px;
}

/* ── Progress ────────────────────────────────────────────────────────── */

.progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-fill.indeterminate {
  width: 30%;
  animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(440%); }
}

.progress-percent {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
}

.filename-label {
  font-size: 13px;
  color: var(--accent-blue);
  margin-top: 8px;
  word-break: break-all;
}

/* ── Action buttons ──────────────────────────────────────────────────── */

.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 12px;
}

.btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: var(--accent-blue-dim);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #253d5c;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn:focus-visible,
.tool-nav-card:focus-visible,
.drop-zone:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* ── Done Screen ─────────────────────────────────────────────────────── */

.done-icon {
  font-size: 48px;
  color: var(--success-green);
  text-align: center;
  margin-top: 28px;
  margin-bottom: 4px;
}

.done-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--success-green);
  text-align: center;
  margin-bottom: 4px;
}

.done-filename {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
  word-break: break-all;
}

.done-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 16px 20px;
}

.done-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}

.done-label {
  font-size: 14px;
  color: var(--text-muted);
}

.done-value {
  font-size: 14px;
  font-weight: 700;
}

.done-value-highlight {
  color: var(--text-primary);
}

.done-value-success {
  color: var(--success-green);
}

.done-value-warning {
  color: var(--warning-amber);
}

/* ── Tool Navigation Strip ───────────────────────────────────────────── */

.tool-nav {
  width: 100%;
  max-width: 860px;
  padding: 0 24px;
  margin: 0 auto;
}

.tool-nav-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 16px;
}

.tool-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tool-nav-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
  min-width: 140px;
  justify-content: center;
}

.tool-nav-card:hover {
  border-color: var(--accent-blue);
  background: #0d2240;
}

.tool-nav-card.active {
  border-color: var(--accent-blue);
  background: var(--accent-blue-dim);
}

.tool-nav-card.coming-soon {
  opacity: 0.4;
  pointer-events: none;
}

.tool-nav-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Marketing sections ──────────────────────────────────────────────── */

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

.marketing-section {
  margin-top: 48px;
}

.marketing-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
}

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

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

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

.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.step-card {
  flex: 1;
  max-width: 220px;
  text-align: center;
  padding: 0 12px;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: white;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.step-connector {
  width: 32px;
  height: 2px;
  background: var(--border-color);
  flex-shrink: 0;
  margin-top: 18px;
}

.marketing-section-support {
  text-align: center;
  padding: 24px 0;
}

.support-text {
  font-size: 14px;
  color: var(--text-muted);
}

.kofi-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.kofi-link:hover {
  text-decoration: underline;
}

/* ── Utility ─────────────────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer {
  max-width: 600px;
  margin: 40px auto 20px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
  line-height: 1.5;
  margin-bottom: 10px;
}

.footer-links {
  font-size: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-sep {
  color: var(--text-muted);
  opacity: 0.4;
  margin: 0 6px;
}

.footer-byline {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.6;
}

.footer-byline a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 580px) {
  .tool-nav-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-nav-card {
    min-width: 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .steps-row {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    width: 2px;
    height: 20px;
    margin: 0;
  }
}
