:root {
  --bg: #111;
  --surface: #1a1a1a;
  --border: #222;
  --border-hover: #333;
  --text: #ccc;
  --text-muted: #555;
  --text-dim: #444;
  --accent: #fff;
  --success: #4ade80;
  --error: #f87171;
  --radius: 6px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(17,17,17,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}
.nav-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
}
.nav-brand {
  font-size: 16px; font-weight: 700; color: #fff;
  text-decoration: none; letter-spacing: -0.3px;
}
.nav-tagline {
  font-size: 11px; color: var(--text-muted);
}

.status-strip {
  max-width: 900px;
  margin: 10px auto 0;
  padding: 0 24px;
  font-size: 11px;
  color: var(--text-dim);
}

/* Index page */
.index-page {
  max-width: 900px; margin: 0 auto; padding: 24px;
}

/* Filter tabs */
.filter-tabs {
  display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap;
  justify-content: center;
}
.filter-tab {
  background: transparent; border: 1px solid var(--border);
  border-radius: 4px; padding: 5px 12px;
  font-size: 12px; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
}
.filter-tab:hover { border-color: var(--border-hover); color: var(--text); }
.filter-tab.active {
  background: var(--surface); color: #fff; border-color: var(--border-hover);
}

/* Tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
@media (max-width: 700px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
  cursor: pointer;
}
.tool-card:hover {
  border-color: var(--border-hover);
  background: #1f1f1f;
}
.tool-card .icon { font-size: 24px; margin-bottom: 4px; }
.tool-card .name { font-size: 12px; color: #aaa; font-weight: 500; }

.index-footer {
  text-align: center; margin-top: 24px;
  font-size: 11px; color: var(--text-dim);
}

/* Tool page */
.tool-page {
  max-width: 600px; margin: 0 auto; padding: 24px;
}
.back-link {
  color: var(--text-muted); font-size: 12px;
  text-decoration: none; display: inline-block; margin-bottom: 16px;
}
.back-link:hover { color: var(--text); }

.tool-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.tool-header .icon { font-size: 32px; }
.tool-header h1 { font-size: 20px; font-weight: 600; color: #fff; margin: 0; }
.tool-header p { font-size: 12px; color: var(--text-muted); margin: 0; }

/* Step labels */
.step-label {
  font-size: 10px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 600; margin-bottom: 8px;
}

/* Form sections */
.form-section { margin-bottom: 16px; }
.form-section h2 {
  font-size: 10px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 600; margin-bottom: 8px;
}
.form-group { margin-bottom: 10px; }
.form-group label {
  display: block; font-size: 11px; color: var(--text-muted);
  margin-bottom: 4px; font-weight: 500;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-row.full { grid-template-columns: 1fr; }

input[type="text"], input[type="number"], input[type="password"],
input[type="email"], select, textarea {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 10px; color: var(--text); font-size: 13px;
  font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: #444; }
textarea { min-height: 80px; resize: vertical; }
small { font-size: 11px; color: var(--text-dim); }

/* Drop zone */
.drop-zone {
  border: 1px dashed #333; border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer;
  transition: all 0.15s; position: relative;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: #555; background: rgba(255,255,255,0.02); }
.drop-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.drop-zone .dz-icon { font-size: 24px; margin-bottom: 4px; }
.drop-zone p { font-size: 12px; color: #666; margin: 0; }
.drop-zone .dz-hint { font-size: 11px; color: #444; margin-top: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.15s; font-family: inherit;
}
.btn-primary {
  background: #fff; color: #111; width: 100%;
}
.btn-primary:hover { background: #e5e5e5; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text); }

.actions { margin-bottom: 16px; display: flex; gap: 8px; }

/* Spinner */
.spinner {
  display: none; width: 14px; height: 14px;
  border: 2px solid #333; border-top-color: #111;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Result area */
.result-area {
  display: none; border: 1px solid #1a3a1a;
  border-radius: var(--radius); padding: 12px;
  align-items: center; gap: 10px; margin-bottom: 16px;
}
.result-area.show { display: flex; }
.result-icon { color: var(--success); font-size: 18px; }
.result-text h3 { font-size: 13px; color: var(--success); font-weight: 500; margin: 0; }
.result-text p { font-size: 11px; color: var(--text-muted); margin: 0; }
.btn-download {
  margin-left: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 12px; font-size: 11px; color: #aaa;
  text-decoration: none; white-space: nowrap;
  transition: all 0.15s;
}
.btn-download:hover { border-color: var(--border-hover); color: #fff; }

/* Error */
.error-area {
  display: none; background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 12px; color: var(--error); margin-bottom: 16px;
}
.error-area.show { display: block; }

/* Disclaimer */
.disclaimer-box {
  font-size: 11px; padding: 8px 12px;
  border-radius: var(--radius); margin-bottom: 16px;
  border: 1px solid var(--border); color: var(--text-muted);
}
