/* Toolnest shared styles — privacy-first browser tools */
:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f232c;
  --border: #2a2f3a;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --accent: #4f8cff;
  --accent-2: #34d399;
  --danger: #f87171;
  --radius: 12px;
  --maxw: 900px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f0f2f5; --border: #e2e6ec;
    --text: #14181f; --muted: #5a6472;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.nav a { color: var(--muted); margin-left: 18px; font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { text-align: center; padding: 56px 0 32px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0 0 12px; letter-spacing: -0.03em; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0 auto; }
.badge { display: inline-block; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--accent-2); font-size: 0.8rem; font-weight: 600; padding: 5px 12px;
  border-radius: 999px; margin-bottom: 18px; }

/* Tool grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 24px 0 40px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.card .icon { font-size: 1.6rem; }
.card h3 { margin: 10px 0 6px; color: var(--text); font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Tool page */
.tool-main { padding: 32px 0 60px; }
.tool-header { margin-bottom: 24px; }
.tool-header h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 8px; letter-spacing: -0.02em; }
.tool-header p { color: var(--muted); margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.breadcrumb { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }

/* Controls */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 0.92rem; }
input[type=text], input[type=number], input[type=password], textarea, select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 12px 14px; font-size: 1rem; font-family: inherit;
}
textarea { resize: vertical; min-height: 140px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; min-width: 120px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 12px 20px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: filter .12s;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.result { margin-top: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
.stat .num { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat .lbl { font-size: 0.8rem; color: var(--muted); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone.drag { border-color: var(--accent); background: var(--surface-2); }

/* Ad + affiliate slots */
.ad-slot { margin: 24px 0; text-align: center; min-height: 90px; }
.ad-slot .placeholder { border: 1px dashed var(--border); border-radius: 8px; padding: 24px; color: var(--muted); font-size: 0.85rem; }
.support-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Article / SEO content */
.article { padding: 8px 0 20px; }
.article h2 { margin-top: 28px; font-size: 1.4rem; letter-spacing: -0.01em; }
.article h3 { margin-top: 20px; font-size: 1.1rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq p { margin: 0 0 14px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 30px 0; margin-top: 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--muted); margin-right: 16px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--accent-2); color: #06281c; padding: 12px 20px; border-radius: 8px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; }
