:root {
    color-scheme: dark;
    --bg: #070a12;
    --panel: rgba(18, 24, 39, .88);
    --panel-2: #101727;
    --line: rgba(148, 163, 184, .17);
    --text: #f8fafc;
    --muted: #98a2b3;
    --accent: #7c3aed;
    --accent-2: #22d3ee;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 18px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(124,58,237,.18), transparent 30%),
        radial-gradient(circle at 90% 5%, rgba(34,211,238,.12), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(1600px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 28px; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.eyebrow { color: var(--accent-2); font-size: 12px; letter-spacing: .16em; font-weight: 800; }
h1 { font-size: clamp(34px, 5vw, 62px); line-height: 1; margin: 12px 0; letter-spacing: -.045em; }
h1 span { background: linear-gradient(90deg, #a78bfa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 790px; line-height: 1.65; margin: 0; }
.hero-badge { min-width: 135px; height: 135px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, rgba(124,58,237,.22), rgba(34,211,238,.08)); display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow: 0 20px 60px rgba(0,0,0,.28); }
.hero-badge strong { font-size: 42px; }
.hero-badge span { color: var(--muted); font-size: 13px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(16px); box-shadow: 0 20px 70px rgba(0,0,0,.22); }
.input-panel { padding: 22px; }
.panel-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:16px; }
.panel-heading h2 { margin:0 0 5px; font-size:20px; }
.panel-heading p { margin:0; color:var(--muted); font-size:13px; }
textarea { width:100%; min-height:210px; resize:vertical; border:1px solid var(--line); border-radius:14px; background:#090e1a; color:var(--text); padding:18px; line-height:1.65; outline:none; transition:.2s; }
textarea:focus, input:focus, select:focus { border-color:rgba(34,211,238,.6); box-shadow:0 0 0 3px rgba(34,211,238,.08); }
.options-row { display:flex; align-items:center; flex-wrap:wrap; gap:18px; margin:16px 0; }
.toggle-line { display:flex; align-items:center; gap:9px; color:#d7dce5; font-size:13px; cursor:pointer; }
.toggle-line input { display:none; }
.toggle { width:38px; height:22px; border-radius:999px; background:#293043; position:relative; transition:.2s; }
.toggle::after { content:""; position:absolute; width:16px; height:16px; border-radius:50%; background:white; top:3px; left:3px; transition:.2s; }
.toggle-line input:checked + .toggle { background:linear-gradient(90deg,var(--accent),#2563eb); }
.toggle-line input:checked + .toggle::after { transform:translateX(16px); }
.domain-counter { margin-left:auto; color:var(--muted); font-size:13px; }
.domain-counter strong { color:var(--text); }
.action-row, .result-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.primary-button, .secondary-button, .danger-button, .ghost-button { border:0; border-radius:11px; padding:11px 16px; color:white; font-weight:700; transition:.18s; }
.primary-button { background:linear-gradient(90deg,var(--accent),#2563eb); min-width:170px; box-shadow:0 10px 30px rgba(124,58,237,.25); }
.secondary-button, .ghost-button { background:#20283a; border:1px solid var(--line); }
.danger-button { background:rgba(239,68,68,.16); color:#fecaca; border:1px solid rgba(239,68,68,.28); }
button:hover:not(:disabled) { transform:translateY(-1px); filter:brightness(1.08); }
button:disabled { opacity:.45; cursor:not-allowed; }
.stats-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin:16px 0; }
.stat-card { border:1px solid var(--line); border-radius:15px; padding:15px 17px; background:rgba(16,23,39,.76); }
.stat-card span { color:var(--muted); font-size:12px; }
.stat-card strong { display:block; font-size:28px; margin-top:4px; }
.result-panel { overflow:hidden; }
.result-heading { padding:20px 20px 0; }
.result-actions input, .result-actions select { height:40px; border-radius:10px; border:1px solid var(--line); background:#0b1120; color:var(--text); padding:0 12px; outline:none; }
.result-actions input { width:190px; }
.progress-track { height:3px; background:#172033; margin-top:17px; }
.progress-track div { width:0; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); transition:width .25s; }
.table-wrap { overflow:auto; max-height:620px; }
table { width:100%; min-width:1700px; border-collapse:collapse; }
th, td { padding:13px 14px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; font-size:12px; }
th { position:sticky; top:0; z-index:2; background:#111827; color:#cbd5e1; letter-spacing:.02em; }
tbody tr:hover { background:rgba(124,58,237,.055); }
.domain-cell strong { display:block; color:#fff; font-size:13px; }
.domain-cell a { color:var(--accent-2); text-decoration:none; font-size:11px; }
.title-cell { max-width:280px; white-space:normal; line-height:1.45; }
.note-cell { max-width:350px; white-space:normal; line-height:1.45; color:var(--muted); }
.keyword-list { display:flex; flex-wrap:wrap; gap:5px; max-width:300px; }
.keyword-list span { padding:3px 7px; border-radius:999px; background:#20283a; color:#cbd5e1; }
.badge { display:inline-flex; align-items:center; gap:6px; padding:5px 8px; border-radius:999px; white-space:nowrap; font-weight:700; font-size:11px; }
.badge::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge-active, .badge-high { background:rgba(34,197,94,.12); color:#86efac; }
.badge-archived, .badge-medium { background:rgba(245,158,11,.12); color:#fcd34d; }
.badge-unreachable, .badge-invalid, .badge-error, .badge-low { background:rgba(239,68,68,.12); color:#fca5a5; }
.niche-name { font-weight:800; color:#f5f3ff; }
.sub-niche { color:#c4b5fd; }
.slug { color:#67e8f9; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.empty-row td { text-align:center; color:var(--muted); padding:48px; }
footer { color:#6b7280; text-align:center; font-size:12px; padding:24px 0 0; }
.toast { position:fixed; right:22px; bottom:22px; z-index:20; background:#111827; border:1px solid var(--line); color:white; padding:12px 15px; border-radius:11px; box-shadow:0 16px 50px rgba(0,0,0,.4); animation:toastIn .2s ease; }
@keyframes toastIn { from { opacity:0; transform:translateY(8px); } }
@media (max-width:900px) {
    .app-shell { width:min(100% - 20px, 1600px); padding-top:22px; }
    .hero { align-items:flex-start; }
    .hero-badge { display:none; }
    .stats-grid { grid-template-columns:repeat(2,1fr); }
    .panel-heading, .result-heading { align-items:flex-start; flex-direction:column; }
    .result-actions { width:100%; }
    .result-actions input, .result-actions select { flex:1; min-width:150px; }
    .domain-counter { width:100%; margin-left:0; }
}
