/* FileTranslator — plain, utilitarian styling */

:root {
  --text: #1f2328;
  --text-muted: #57606a;
  --border: #d0d7de;
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --accent: #0a5dc2;
  --accent-dark: #084b9d;
  --green: #1a7f37;
  --red: #cf222e;
  --radius: 6px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 22px;
}
.site-nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 48px 0 8px; text-align: center; }
.hero h1 { font-size: 2rem; }
.hero-sub {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* Converter */
.converter-section { padding: 24px 0 40px; }

.pref-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: 0.92rem;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); }
.dropzone.dragover { border-color: var(--accent); background: #f0f6ff; }
.dz-title { font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 12px 0 2px; }
.dz-or { margin: 2px 0 12px; }
.dz-note { font-size: 0.85rem; margin: 14px 0 0; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-lg { padding: 10px 28px; font-size: 1.05rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #8cb2dd; cursor: default; }
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-alt); }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* File list */
.file-list {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.file-row:last-child { border-bottom: none; }
.file-row:nth-child(even) { background: var(--bg-alt); }
.file-meta { flex: 1 1 240px; min-width: 0; }
.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size { font-size: 0.82rem; color: var(--text-muted); }
.file-target { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.file-target select {
  font: inherit;
  font-size: 0.9rem;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.file-status { font-size: 0.88rem; min-width: 110px; color: var(--text-muted); }
.file-status.done { color: var(--green); }
.file-status.error { color: var(--red); }
.file-row .dl-btn {
  font-size: 0.88rem;
  padding: 5px 14px;
}
.remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.remove-btn:hover { color: var(--red); }

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

/* Ad slots — hidden until ad code is added inside */
.ad-slot { margin: 12px 0; text-align: center; }
.ad-slot:empty { display: none; }

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-sub { color: var(--text-muted); margin-top: -6px; }

/* Popular grid */
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.popular-grid a {
  display: block;
  text-align: center;
  font-size: 0.95rem;
  padding: 12px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.popular-grid a span { color: var(--text-muted); padding: 0 2px; }
.popular-grid a:hover { border-color: var(--accent); color: var(--accent); }

/* All tools section */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px;
  margin-top: 10px;
}
.tools-group h3 { margin-bottom: 8px; }
.tools-group a {
  display: block;
  font-size: 0.93rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 0;
}
.tools-group a:hover { color: var(--accent); text-decoration: underline; }

/* Conversion landing pages */
.crumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.note-box {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 12px 16px;
  font-size: 0.93rem;
  color: var(--text-muted);
}
.howto-list { color: var(--text-muted); padding-left: 22px; margin: 0 0 1em; }
.howto-list li { margin-bottom: 6px; }
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.related-links a {
  font-size: 0.93rem;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  text-align: center;
}
.related-links a:hover { border-color: var(--accent); color: var(--accent); }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-top: 10px;
}
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.step p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  margin-top: 10px;
}
.feature p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Formats table */
.table-wrap { overflow-x: auto; }
.formats-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.93rem;
}
.formats-table th, .formats-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.formats-table th { background: var(--bg-alt); font-weight: 600; }
.formats-table tr:last-child td { border-bottom: none; }
.formats-table td:first-child { font-weight: 500; white-space: nowrap; }

/* FAQ */
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 0 16px;
  background: var(--bg);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 500;
  padding: 12px 0;
  list-style-position: inside;
}
.faq-list details p { color: var(--text-muted); margin: 0 0 14px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-inner p { margin: 0; }
.site-footer a { color: var(--text-muted); margin-left: 18px; }

/* Static pages (privacy/terms) */
.page { padding: 40px 0 60px; max-width: 760px; }
.page h1 { font-size: 1.7rem; }
.page h2 { font-size: 1.15rem; margin-top: 1.6em; }
.page p, .page li { color: var(--text-muted); }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.5rem; }
  .file-row { gap: 8px; }
  .file-status { min-width: 0; }
  .site-nav a { margin-left: 12px; font-size: 0.88rem; }
}
