:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #fff7f7;
  --panel: #ffffff;
  --ink: #171717;
  --muted: #646464;
  --line: #ececec;
  --brand: #e5322d;
  --brand-dark: #b91c1c;
  --accent: #0f766e;
  --shadow: 0 22px 55px rgba(21, 21, 21, .08);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --bg-soft: #1a1212;
  --panel: #191919;
  --ink: #f7f7f7;
  --muted: #b6b6b6;
  --line: #2a2a2a;
  --brand: #ff4a44;
  --brand-dark: #ff6a66;
  --accent: #5eead4;
  --shadow: 0 22px 55px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.35rem; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 25px rgba(229, 50, 45, .25);
}
.nav-links { display: flex; align-items: center; gap: 22px; color: var(--muted); font-weight: 700; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn, .menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.menu-btn { display: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 14px 30px rgba(229, 50, 45, .24); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--panel); border-color: var(--line); color: var(--ink); }
.btn-ghost { color: var(--brand); background: transparent; }
.hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 54px;
  background:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 32%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 44px; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.hero h1, .page-hero h1 { font-size: clamp(2.35rem, 5vw, 5rem); line-height: 1.02; margin: 14px 0 18px; letter-spacing: 0; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; color: var(--muted); font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); padding: 8px 12px; border-radius: 999px; }
.hero-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.mini-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-tool { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--bg); }
.mini-tool strong { display: block; margin: 8px 0 4px; }
.mini-tool span { color: var(--muted); font-size: .9rem; }
.section { padding: 74px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.section-head h2, .content h2 { font-size: clamp(1.9rem, 3vw, 2.8rem); line-height: 1.12; margin: 0; }
.section-head p { color: var(--muted); max-width: 560px; margin: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tool-card, .feature-card, .post-card, .faq-item, .testimonial, .ad-slot, .content-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.035);
}
.tool-card {
  min-height: 170px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tool-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); box-shadow: var(--shadow); }
.tool-icon { width: 44px; height: 44px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 12%, var(--panel)); color: var(--brand); display: grid; place-items: center; }
.tool-card h3 { margin: 0; font-size: 1.05rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card, .testimonial, .content-card { padding: 24px; }
.feature-card h3, .testimonial strong, .content-card h3 { margin: 12px 0 8px; display: block; }
.feature-card p, .testimonial p, .content-card p { color: var(--muted); margin: 0; }
.privacy-band {
  background: #171717;
  color: #fff;
  border-radius: 8px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.privacy-band p { color: #d4d4d4; margin: 8px 0 0; }
.faq-list { display: grid; gap: 12px; }
.faq-item { padding: 18px 20px; }
.faq-item summary { cursor: pointer; font-weight: 850; }
.faq-item p { color: var(--muted); margin: 10px 0 0; }
.ad-slot {
  min-height: 110px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-style: dashed;
  background: color-mix(in srgb, var(--bg-soft) 58%, var(--panel));
  text-align: center;
  padding: 18px;
}
.newsletter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 560px;
}
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 13px 14px;
  min-height: 46px;
}
.footer { border-top: 1px solid var(--line); padding: 52px 0 28px; background: var(--panel); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.footer h3 { margin: 0 0 12px; font-size: .95rem; }
.footer a, .footer p { color: var(--muted); display: block; margin: 8px 0; }
.copyright { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.page-hero { padding: 58px 0 36px; background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.tool-shell { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.uploader {
  border: 2px dashed color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 8px;
  padding: 36px;
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--panel);
}
.uploader.dragover { background: color-mix(in srgb, var(--brand) 8%, var(--panel)); }
.uploader h2 { margin: 14px 0 8px; font-size: clamp(1.5rem, 3vw, 2.3rem); }
.uploader p { color: var(--muted); margin: 0 0 18px; }
.file-input { display: none; }
.workspace {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.file-list { display: grid; gap: 10px; }
.file-item {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}
.file-name { font-weight: 800; overflow-wrap: anywhere; }
.file-meta { color: var(--muted); font-size: .88rem; }
.options { display: grid; gap: 12px; }
.option-row { display: grid; gap: 7px; }
.side-panel { position: sticky; top: 92px; display: grid; gap: 16px; }
.progress {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress span { display: block; width: 0%; height: 100%; background: var(--brand); transition: width .2s ease; }
.status { color: var(--muted); min-height: 24px; }
.result-list { display: grid; gap: 10px; }
.result-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
  font-weight: 800;
}
.content { max-width: 920px; }
.content p, .content li { color: var(--muted); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { overflow: hidden; }
.post-card .post-body { padding: 20px; }
.post-thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #e5322d, #171717); }
.tools-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 0 0 16px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}
.chip.active { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 36%, var(--line)); }
.recent-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tool-card .meta { color: var(--muted); font-size: .82rem; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal { width: min(520px, 100%); background: var(--panel); color: var(--ink); border-radius: 8px; border: 1px solid var(--line); padding: 26px; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 10px; }
.modal p { color: var(--muted); }

@media (max-width: 980px) {
  .hero-grid, .tool-shell, .privacy-band { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid, .post-grid, .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-panel { position: static; }
  .tools-control { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .menu-btn { display: inline-grid; }
  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .hero { padding-top: 54px; }
  .hero-grid { gap: 28px; }
  .tool-grid, .feature-grid, .post-grid, .footer-grid, .mini-tools { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .newsletter { grid-template-columns: 1fr; }
  .uploader { padding: 24px 16px; }
  .file-item { grid-template-columns: 42px 1fr; }
  .file-item .btn { grid-column: 1 / -1; }
  .tool-card { min-height: auto; }
}
