:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a202c;
  --text-muted: #5a6472;
  --border: #e2e6eb;
  --accent: #e5484d;
  --accent-hover: #d63940;
  --accent-soft: #fdecec;
  --success: #16a34a;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .10);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101318;
    --surface: #181d24;
    --text: #e8ebef;
    --text-muted: #9aa4b0;
    --border: #2a323d;
    --accent: #f05b60;
    --accent-hover: #ff7075;
    --accent-soft: #35201f;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo:hover { text-decoration: none; }
.logo .logo-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: .95rem;
}

nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
}
nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
nav a.active { color: var(--accent); font-weight: 700; }

/* Hero */
.hero { text-align: center; padding: 56px 0 40px; }
.hero h1 { font-size: 2.4rem; line-height: 1.2; margin-bottom: 14px; }
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; margin: 0 auto; }
.hero .privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  padding: 8px 16px;
  border-radius: 999px;
}

/* Tool cards grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 20px 0 60px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  color: var(--text);
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.tool-card .icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.tool-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.tool-card p { color: var(--text-muted); font-size: .92rem; }

/* Tool page */
.tool-header { text-align: center; padding: 44px 0 10px; }
.tool-header h1 { font-size: 2rem; margin-bottom: 10px; }
.tool-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.tool-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin: 30px auto;
  max-width: 760px;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon { font-size: 2.6rem; display: block; margin-bottom: 10px; }
.dropzone strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.dropzone span { color: var(--text-muted); font-size: .9rem; }
.dropzone input[type="file"] { display: none; }

/* File list */
.file-list { list-style: none; margin: 18px 0 0; }
.file-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: .92rem;
}
.file-list .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list .fsize { color: var(--text-muted); white-space: nowrap; }
.file-list button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 9px;
  font-size: .85rem;
}
.file-list button:hover { color: var(--accent); border-color: var(--accent); }

/* Options */
.options {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  margin: 20px 0 0;
  padding: 16px;
  background: var(--bg);
  border-radius: 10px;
  font-size: .95rem;
}
.options label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.options select, .options input[type="number"] {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: .95rem;
}
.options input[type="number"] { width: 84px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 34px;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
  margin-top: 22px;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Status / result */
.status { margin-top: 16px; text-align: center; color: var(--text-muted); font-size: .95rem; min-height: 1.4em; }
.status.error { color: var(--accent); font-weight: 600; }
.status.success { color: var(--success); font-weight: 600; }

.progress-bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 16px; display: none; }
.progress-bar .fill { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.result-box { text-align: center; margin-top: 20px; display: none; }
.result-box .btn { background: var(--success); max-width: 340px; }
.result-box .btn:hover { filter: brightness(1.1); }

/* Content sections */
.content-section { max-width: 760px; margin: 0 auto; padding: 30px 20px 10px; }
.content-section h2 { font-size: 1.45rem; margin: 28px 0 12px; }
.content-section h3 { font-size: 1.12rem; margin: 20px 0 8px; }
.content-section p, .content-section li { color: var(--text-muted); }
.content-section ol, .content-section ul { padding-left: 24px; margin: 10px 0; }
.content-section li { margin-bottom: 6px; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { font-weight: 600; cursor: pointer; color: var(--text); }
.faq details p { margin-top: 10px; }

/* Ad slots */
.ad-slot {
  max-width: 760px;
  margin: 26px auto;
  padding: 0 20px;
  text-align: center;
}
.ad-slot .ad-placeholder {
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .8rem;
  padding: 30px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 34px 0;
  background: var(--surface);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: .9rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.7rem; }
  .tool-header h1 { font-size: 1.5rem; }
  .tool-box { padding: 20px; }
  .header-inner { justify-content: center; }
}
