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

:root {
  --blue:       #0066ff;
  --blue-dark:  #0052cc;
  --bg:         #f8fafc;
  --card:       #ffffff;
  --text:       #0f172a;
  --text-muted: #64748b;
  --border:     #e2e8f0;
  --green:      #059669;
  --header-bg:  #0f172a;
  --r:          12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  font-size: 15px;
}

.site-header {
  background: var(--header-bg);
  padding: 0.875rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.07);
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo img { display: block; height: 38px; }
.header-back {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.header-back:hover { color: #fff; }

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
}
.hero-inner { max-width: 600px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.hero p { color: rgba(255,255,255,0.72); font-size: 1rem; max-width: 480px; margin: 0 auto; }

/* ── Layout ── */
.tool-section {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.col-options { display: flex; flex-direction: column; gap: 1rem; }
.col-preview { position: sticky; top: 5rem; }

/* ── Card ── */
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.card-body { padding: 1.25rem; }

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.tab-btn {
  padding: 0.45rem 0.875rem;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  transition: all 0.15s;
}
.tab-btn:hover { border-color: var(--blue); color: var(--blue); }
.tab-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Tab panes ── */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Form ── */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.875rem;
}
.form-row:last-child { margin-bottom: 0; }
.form-row label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.form-row input[type="text"],
.form-row input[type="url"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="password"],
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus { border-color: var(--blue); background: #fff; }

/* ── Options row ── */
.options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ── Color pickers ── */
.color-row {
  display: flex;
  gap: 1rem;
}
.color-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.color-item label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.color-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s;
}
.color-wrap:focus-within { border-color: var(--blue); }
.color-wrap input[type="color"] {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  background: none;
}
.color-wrap span { font-size: 0.82rem; font-family: 'Courier New', monospace; color: var(--text); }

/* ── QR Preview ── */
.qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  min-height: 280px;
}
.qr-display canvas,
.qr-display img { border-radius: 8px; max-width: 100%; }
.qr-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.qr-placeholder i { font-size: 3rem; opacity: 0.18; display: block; margin-bottom: 0.75rem; }

.qr-actions {
  display: flex;
  gap: 0.75rem;
  padding: 0 1.25rem 1.25rem;
}
.btn-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  background: var(--card);
  color: var(--text);
  transition: all 0.15s;
}
.btn-action:hover { background: #f1f5f9; border-color: #cbd5e1; }
.btn-action.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-action.primary:hover { background: var(--blue-dark); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Footer ── */
.site-footer {
  background: var(--header-bg);
  color: rgba(255,255,255,0.75);
  padding: 1.25rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; font-size: 0.82rem; }
.footer-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s;
}
.footer-cta:hover { background: var(--blue-dark); }
.footer-home {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}
.footer-home:hover { color: #fff; }

@media (max-width: 720px) {
  .tool-section { grid-template-columns: 1fr; }
  .col-preview { position: static; }
  .options-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 2rem 1rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
