/*
  loltools shared styles. Same tokens as findmyip.lol so the family matches.
  System fonts only: no webfonts, no extra requests for typography.
*/
:root {
  --bg:        #0b0f17;
  --bg-card:   #121a29;
  --bg-input:  #0f1522;
  --fg:        #ffffff;
  --fg-muted:  #93a1b6;
  --fg-dim:    #56627a;
  --border:    #1c2638;
  --accent:    #9a8cff;
  --accent-dim:#9a8cff26;
  --mint:      #9ef0a1;
  --danger:    #ff7b7b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --max-width: 720px;
  --radius:    10px;
  --radius-sm: 6px;
}
[data-theme="light"] {
  --bg:#ffffff; --bg-card:#ffffff; --bg-input:#f8fafc; --fg:#1e293b; --fg-muted:#64748b;
  --fg-dim:#94a3b8; --border:#e2e8f0; --accent:#7c4dff; --accent-dim:#7c4dff1f; --mint:#16a34a; --danger:#dc2626;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:#ffffff; --bg-card:#ffffff; --bg-input:#f8fafc; --fg:#1e293b; --fg-muted:#64748b;
    --fg-dim:#94a3b8; --border:#e2e8f0; --accent:#7c4dff; --accent-dim:#7c4dff1f; --mint:#16a34a; --danger:#dc2626;
  }
}

*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute always wins, even over components that set display. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 2rem 1.25rem 4rem;
  transition: background-color .2s ease, color .2s ease;
}
.container { max-width: var(--max-width); margin: 0 auto; }
a { color: var(--accent); }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-input);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

/* ---------- Header (same as findmyip.lol) ---------- */
header.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 3rem;
  font-family: var(--font-mono); font-size: 0.875rem; color: var(--fg-muted);
}
header.site-header .brand {
  color: var(--fg); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
header.site-header .brand:hover { color: var(--accent); }
header.site-header .brand .domain { font-family: var(--font-mono); font-size: 0.875rem; color: var(--fg-muted); }
header.site-header .brand:hover .domain { color: var(--accent); }
.amplifi-mark { height: 22px; width: auto; display: block; }
.amplifi-mark .am-wordmark { fill: currentColor; }
.amplifi-mark .am-accent { fill: var(--mint); }
.header-actions { display: inline-flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: transparent; border: 1px solid var(--border); color: var(--fg-muted);
  border-radius: var(--radius-sm); cursor: pointer; transition: all .15s ease; text-decoration: none;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
#themeToggle .icon-sun, #themeToggle .icon-moon { display: none; }
#themeToggle .icon-sun { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #themeToggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) #themeToggle .icon-moon { display: block; }
}
[data-theme="light"] #themeToggle .icon-sun { display: none; }
[data-theme="light"] #themeToggle .icon-moon { display: block; }
[data-theme="dark"] #themeToggle .icon-sun { display: block; }
[data-theme="dark"] #themeToggle .icon-moon { display: none; }

/* ---------- Hero ---------- */
section.hero { text-align: center; margin-bottom: 2.5rem; }
.hero h1 {
  font-size: clamp(2rem, 6.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 0.9rem;
}
.hero .lede {
  color: var(--fg-muted);
  font-size: 1.05rem;
  max-width: 34rem;
  margin: 0 auto;
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.card h2 {
  font-size: 0.85rem; font-family: var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-muted); margin: 0 0 1rem; font-weight: 500;
}

/* ---------- Drop zone ---------- */
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  text-align: center;
  min-height: 190px;
  padding: 2rem 1.25rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone:hover, .dropzone:focus-within, .dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.dropzone input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.dropzone .dz-icon { width: 34px; height: 34px; color: var(--accent); }
.dropzone .dz-title { font-weight: 600; font-size: 1.05rem; }
.dropzone .dz-sub { color: var(--fg-muted); font-size: 0.875rem; font-family: var(--font-mono); }
.dropzone.compact { min-height: 0; padding: 1rem; flex-direction: row; }
.dropzone.compact .dz-icon { width: 22px; height: 22px; }

/* ---------- File list ---------- */
.file-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.file-list:empty { display: none; }
.file-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.file-row .fr-thumb {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 4px;
  background: var(--bg-card); border: 1px solid var(--border);
  object-fit: cover; display: block;
}
.file-row .fr-main { min-width: 0; flex: 1; }
.file-row .fr-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.file-row .fr-meta { display: block; color: var(--fg-muted); font-family: var(--font-mono); font-size: 0.78rem; }
.file-row .fr-meta.ok { color: var(--mint); }
.file-row .fr-meta.err { color: var(--danger); }
.file-row .fr-actions { display: inline-flex; gap: 0.35rem; flex-shrink: 0; }
.mini-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 0.5rem;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--fg-muted); cursor: pointer; font-family: var(--font-mono); font-size: 0.8rem;
  text-decoration: none; transition: all .15s ease;
}
.mini-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.mini-btn:disabled { opacity: 0.35; cursor: default; }
.mini-btn svg { width: 15px; height: 15px; }

/* ---------- Controls ---------- */
.controls { display: grid; gap: 1rem; margin-top: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field > label, .field > .label {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--fg-muted);
}
.field input[type="text"], .field input[type="url"], .field input[type="email"],
.field input[type="tel"], .field textarea, .field select {
  width: 100%;
  font: inherit; font-size: 1rem;
  color: var(--fg);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
}
.field textarea { min-height: 96px; resize: vertical; font-family: var(--font-mono); font-size: 0.9rem; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.row-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 540px) { .row-2 { grid-template-columns: 1fr 1fr; } }

.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 0.35rem; justify-self: start;
  padding: 0.25rem; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg-muted);
  padding: 0.4rem 0.75rem; border-radius: 4px; cursor: pointer; transition: all .15s ease;
}
.segmented input:checked + label { background: var(--accent); color: #fff; }
.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { color: var(--fg-muted); font-size: 0.85rem; margin: 0; }

input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="color"] {
  width: 100%; height: 44px; padding: 0.25rem;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; align-items: center; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; cursor: pointer;
  text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--fg-muted); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--fg); border-color: var(--fg-muted); }
.btn-ghost:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary svg, .btn-ghost svg { width: 18px; height: 18px; }
@media (max-width: 480px) { .actions .btn-primary, .actions .btn-ghost { flex: 1 1 100%; } }

.status { margin-top: 1rem; font-size: 0.9rem; min-height: 1.4em; color: var(--fg-muted); font-family: var(--font-mono); }
.status.ok { color: var(--mint); }
.status.err { color: var(--danger); }

.progress {
  height: 4px; border-radius: 4px; background: var(--bg-input); overflow: hidden; margin-top: 1rem;
}
.progress[hidden] { display: none; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }

/* ---------- Privacy card ---------- */
.privacy-card { border-color: var(--accent-dim); }
.privacy-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 540px) { .privacy-grid { grid-template-columns: 1fr 1fr; } }
.privacy-grid li {
  display: flex; gap: 0.85rem; padding: 0.9rem 1rem;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.privacy-grid .pg-icon { flex-shrink: 0; width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.privacy-grid .pg-title { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; line-height: 1.3; }
.privacy-grid .pg-desc { display: block; font-size: 0.8rem; color: var(--fg-muted); line-height: 1.5; }
.privacy-grid code { background: var(--bg-card); }
.privacy-cta {
  margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-size: 0.95rem; color: var(--fg-muted);
}
.privacy-cta a { text-decoration: none; border-bottom: 1px dashed var(--accent-dim); }
.privacy-cta a:hover { border-bottom-style: solid; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--border); padding: 0.85rem 0; }
.faq details:first-of-type { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--fg-muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--fg-muted); margin: 0.6rem 0 0; font-size: 0.95rem; }

/* ---------- More tools ---------- */
.tools-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: 1fr; }
@media (min-width: 540px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
.tools-grid a {
  display: block; padding: 0.85rem 1rem; text-decoration: none; color: var(--fg);
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .15s ease;
}
.tools-grid a:hover { border-color: var(--accent); }
.tools-grid .t-name { display: block; font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem; }
.tools-grid .t-desc { display: block; color: var(--fg-muted); font-size: 0.85rem; }
.tools-grid a[aria-current="page"] { border-color: var(--accent-dim); opacity: 0.6; pointer-events: none; }

/* ---------- Footer ---------- */
footer.site-footer {
  margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border);
  text-align: center; font-size: 0.875rem; color: var(--fg-muted); font-family: var(--font-mono);
}
footer.site-footer a { color: var(--fg); text-decoration: none; border-bottom: 1px dotted var(--fg-muted); }
footer.site-footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.noscript-msg {
  padding: 1rem; margin-bottom: 1.5rem; border: 1px solid var(--danger);
  border-radius: var(--radius-sm); color: var(--fg); background: var(--bg-input); font-size: 0.9rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
