/* ── IP Tools – common.css ──────────────────────────────── */
:root {
  --primary: #10b981;   /* emerald green */
  --primary-dark: #059669;
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; font-size: .9em; background: rgba(255,255,255,.06); padding: .1em .35em; border-radius: 3px; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 56px; }
.logo { font-size: 1.1rem; font-weight: 700; color: var(--fg); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.main-nav { display: flex; gap: .25rem; overflow-x: auto; }
.main-nav a { padding: .4rem .75rem; border-radius: 6px; font-size: .875rem; color: var(--muted); white-space: nowrap; transition: all .2s; }
.main-nav a:hover { color: var(--fg); background: rgba(255,255,255,.06); text-decoration: none; }
.main-nav a.active { color: var(--primary); background: rgba(16,185,129,.12); }

/* Tool card */
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.tool-header { margin-bottom: 1.5rem; }
.tool-header h1 { font-size: 1.75rem; margin-bottom: .4rem; }
.tool-desc { color: var(--muted); font-size: .95rem; }

/* Inputs */
.input-group { margin-bottom: 1rem; }
.input-group label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; font-weight: 500; }
input[type="text"], textarea, select {
  background: var(--bg); color: var(--fg); border: 1px solid var(--border);
  border-radius: 6px; padding: .55rem .85rem; font-size: .9rem; width: 100%;
  transition: border-color .2s; outline: none;
}
input[type="text"]:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { resize: vertical; font-family: monospace; min-height: 80px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 6px; border: none; cursor: pointer; font-size: .875rem; font-weight: 500; transition: all .2s; white-space: nowrap; }
.btn { background: var(--primary); color: #fff; }
.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--border); color: var(--fg); }
.btn-secondary:hover { background: #475569; }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }

/* Output / result */
.output-box { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: .75rem 1rem; font-family: monospace; font-size: .875rem; white-space: pre-wrap; word-break: break-all; min-height: 48px; }
.output-label { font-size: .75rem; color: var(--muted); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .04em; }

/* Result table */
.result-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.result-table th, .result-table td { padding: .55rem .85rem; text-align: left; border: 1px solid var(--border); }
.result-table th { background: var(--bg); font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.result-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.result-table td:first-child { color: var(--muted); }
.result-table td:last-child { font-family: monospace; color: var(--fg); }

/* Copy badge */
.copy-badge { cursor: pointer; color: var(--primary); font-size: .75rem; padding: .1rem .4rem; border: 1px solid var(--primary); border-radius: 4px; transition: all .2s; user-select: none; }
.copy-badge:hover { background: var(--primary); color: #fff; }

/* Ads */
.ad-slot { background: rgba(255,255,255,.02); border: 1px dashed var(--border); border-radius: 6px; min-height: 90px; display: flex; align-items: center; justify-content: center; overflow: hidden; }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; z-index: 999; box-shadow: 0 4px 24px rgba(0,0,0,.4); max-width: 560px; width: calc(100% - 2rem); display: none; }
.cookie-banner p { font-size: .85rem; color: var(--muted); flex: 1; }
.cookie-banner.show { display: flex; }

/* Copy toast */
.copy-toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--primary); color: #fff; padding: .5rem 1rem; border-radius: 6px; font-size: .85rem; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 9999; }
.copy-toast.show { opacity: 1; }

/* FAQ */
.faq-section h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-question { width: 100%; background: none; border: none; color: var(--fg); text-align: left; padding: .75rem 0; font-size: .9rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: '+'; color: var(--primary); font-size: 1.2rem; flex-shrink: 0; }
.faq-question.open::after { content: '−'; }
.faq-answer { display: none; padding: 0 0 .75rem; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.faq-answer.open { display: block; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 1.25rem 0; margin-top: auto; font-size: .85rem; color: var(--muted); text-align: center; }

/* Responsive */
@media (max-width: 600px) {
  .tool-header h1 { font-size: 1.3rem; }
  .result-table th, .result-table td { padding: .4rem .55rem; font-size: .8rem; }
}
