/* =========================
   THEME TOKENS (3 themes)
   Default = Blue (#2563EB)
   ========================= */

:root{
  --pad: 16px;
  --radius: 14px;

  /* Brand */
  --brand: #2563EB;          /* main logo/theme color */
  --brand-600: #1D4ED8;
  --ring: rgba(37, 99, 235, 0.25);

  /* Surfaces */
  --bg: #ffffff;
  --surface: #ffffff;
  --card: #f8fafc;           /* subtle cool tint */
  --border: #e5e7eb;

  /* Text */
  --text: #0f172a;
  --muted: #64748b;

  /* Buttons/links */
  --btn-primary-bg: var(--brand);
  --btn-primary-text: #ffffff;
  --btn-primary-border: var(--brand);
  --link: var(--brand);
}

/* Theme 2: Emerald */
:root[data-theme="emerald"]{
  --brand: #10B981;
  --brand-600: #059669;
  --ring: rgba(16, 185, 129, 0.25);

  --bg: #ffffff;
  --surface: #ffffff;
  --card: #f6fbf9;
  --border: #e5e7eb;

  --text: #0f172a;
  --muted: #64748b;

  --btn-primary-bg: var(--brand);
  --btn-primary-text: #ffffff;
  --btn-primary-border: var(--brand);
  --link: var(--brand);
}

/* Theme 3: Violet */
:root[data-theme="violet"]{
  --brand: #7C3AED;
  --brand-600: #6D28D9;
  --ring: rgba(124, 58, 237, 0.25);

  --bg: #ffffff;
  --surface: #ffffff;
  --card: #faf7ff;
  --border: #e5e7eb;

  --text: #0f172a;
  --muted: #64748b;

  --btn-primary-bg: var(--brand);
  --btn-primary-text: #ffffff;
  --btn-primary-border: var(--brand);
  --link: var(--brand);
}

/* =========================
   BASE
   ========================= */

* { box-sizing: border-box; }
body {
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1050px; margin: 0 auto; padding: 0 var(--pad); }

/* =========================
   HEADER
   ========================= */

.header { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top:0; z-index: 10; }
.header-row { display:flex; align-items:center; justify-content:space-between; height:64px; gap: 12px; }
.logo { font-weight: 900; letter-spacing: .2px; font-size: 1.5em; color: var(--brand); }
.nav { display:flex; align-items:center; gap: 14px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }

/* Theme switch UI */
.header-right { display:flex; align-items:center; gap: 12px; }
.theme-label { font-size: 12px; color: var(--muted); }
.theme-select {
  border:1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.theme-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* =========================
   HERO / BUTTONS
   ========================= */

.hero { padding: 34px 0 18px; }
.hero h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.15; }
.hero p { margin: 0 0 14px; color: var(--muted); font-size: 16px; max-width: 720px; }

.actions { display:flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 12px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.btn.primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-border);
}
.btn:hover { transform: translateY(-1px); }

/* Make primary button feel clickable */
.btn.primary:hover { box-shadow: 0 8px 20px rgba(2, 6, 23, 0.12); }

/* =========================
   GRID / CARDS
   ========================= */

.grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 28px; }
@media (max-width: 900px){ .grid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 600px){ .grid{ grid-template-columns: 1fr;} }

.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-1px); border-color: rgba(2,6,23,0.15); box-shadow: 0 10px 25px rgba(2, 6, 23, 0.06); }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.badge {
  display:inline-block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 4px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* =========================
   SECTIONS / FORMS
   ========================= */

.section-title { display:flex; align-items:flex-end; justify-content:space-between; margin-top: 28px; }
.section-title h2 { margin:0; font-size: 18px; }
.section-title .small { color: var(--muted); }

.searchbar { margin: 14px 0 10px; display:flex; gap:10px; flex-wrap:wrap; }

.input, .select {
  border:1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 240px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.select { min-width: 220px; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* =========================
   TOOL PAGE
   ========================= */

.tool-header { margin: 22px 0 12px; }
.tool-header h1 { margin:0 0 6px; font-size: 26px; }
.tool-header p { margin:0; color: var(--muted); }

.content {
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
}

/* =========================
   FOOTER
   ========================= */

.footer { border-top:1px solid var(--border); margin-top: 40px; padding: 18px 0; color: var(--muted); background: var(--surface); }
.footer-row { display:flex; justify-content:space-between; gap: 16px; flex-wrap:wrap; }
.small { font-size: 13px; }
.tiny { font-size: 12px; color: var(--muted); }
