:root {
  --primary: #6a5cff;
  --primary-dark: #5140e0;
  --bg: #0f1020;
  --surface: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --warning: #b45309;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #f7f7fb;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site-header {
  background: var(--bg);
  color: #fff;
  padding: 16px 0;
}

header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span.dot {
  color: var(--primary);
}

nav.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  margin-left: 24px;
  font-size: 14px;
  font-weight: 500;
}
nav.site-nav a:hover {
  color: #fff;
}

.hero {
  text-align: center;
  padding: 56px 0 32px;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

.hero p.subtitle {
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto;
}

.badge-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.badge {
  background: #eef0ff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.tool-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(20, 20, 50, 0.08);
  padding: 32px;
  margin: 24px auto 40px;
}

.drop-zone {
  border: 2px dashed #c9c6ff;
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafaff;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: #f1f0ff;
}
.drop-zone .icon {
  font-size: 42px;
}
.drop-zone .title {
  font-weight: 700;
  font-size: 17px;
  margin-top: 8px;
}
.drop-zone .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

input[type="file"] {
  display: none;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f5f5fb;
  border-radius: 10px;
  margin-bottom: 20px;
}
.file-row .file-name {
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-row .file-size {
  color: var(--muted);
  font-size: 13px;
}
.file-row button.remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.option-group label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
}

.mode-toggle {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.mode-toggle button {
  flex: 1;
  padding: 10px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}
.mode-toggle button.active {
  background: var(--primary);
  color: #fff;
}

select,
input[type="range"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}
.btn-primary:disabled {
  background: #cfcdf5;
  cursor: not-allowed;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.progress-wrap {
  margin-top: 20px;
}
.progress-bar-bg {
  background: #ece9ff;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}
.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary), #a78bfa);
  height: 100%;
  width: 0%;
  transition: width 0.2s;
}
.progress-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.result-box {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.result-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin: 16px 0;
}
.result-stats .stat-label {
  font-size: 12px;
  color: var(--muted);
}
.result-stats .stat-value {
  font-size: 20px;
  font-weight: 800;
}
.result-stats .stat-value.reduction {
  color: var(--success);
}

.paywall-box {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.paywall-box h3 {
  margin-top: 0;
  color: var(--warning);
}

.error-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 14px;
}

section.section {
  padding: 40px 0;
}
section.section h2 {
  font-size: 26px;
  margin-bottom: 16px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 720px) {
  .how-steps {
    grid-template-columns: 1fr;
  }
}
.how-step {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(20, 20, 50, 0.05);
}
.how-step .num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.faq-item p {
  margin: 0;
  color: var(--muted);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
}
.article-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(20, 20, 50, 0.05);
}
.article-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cta-banner {
  background: linear-gradient(135deg, #6a5cff, #8b5cf6);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin: 40px 0;
}
.cta-banner h2 {
  margin-top: 0;
}
.cta-banner .btn {
  background: #fff;
  color: var(--primary-dark);
  margin-top: 12px;
  display: inline-flex;
  width: auto;
  padding: 12px 28px;
}

footer.site-footer {
  background: var(--bg);
  color: rgba(255, 255, 255, 0.6);
  padding: 32px 0;
  margin-top: 60px;
  font-size: 13px;
}
footer.site-footer a {
  color: rgba(255, 255, 255, 0.75);
}
footer.site-footer .footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Article page */
.article-body {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 10px 40px rgba(20, 20, 50, 0.06);
  margin: 24px 0 40px;
}
.article-body h1 {
  font-size: 30px;
  margin-top: 0;
}
.article-body h2 {
  font-size: 21px;
  margin-top: 32px;
}
.article-body p,
.article-body li {
  color: #333;
  font-size: 16px;
}
.article-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0;
}
