:root {
    --bg: #07111f;
    --bg2: #0d1b2f;
    --card: rgba(10, 20, 36, .74);
    --line: rgba(255,255,255,.09);
    --text: #ecf3ff;
    --muted: #9db0cf;
    --primary: #6ea8ff;
    --primary-2: #8e7cff;
    --success: #5ed1a7;
    --danger: #ff7c97;
    --shadow: 0 24px 60px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(91, 136, 255, .18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(142, 124, 255, .14), transparent 30%),
        linear-gradient(135deg, var(--bg), var(--bg2));
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { display:flex; justify-content:space-between; align-items:center; padding: 24px 0 10px; gap:18px; }
.brand { display:flex; align-items:center; gap:14px; }
.brand-mark {
    width: 48px; height: 48px; border-radius: 16px;
    display:grid; place-items:center; font-weight:800; font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: var(--shadow);
}
.brand h1 { margin:0; font-size:1.1rem; }
.brand p { margin:4px 0 0; color: var(--muted); font-size:.92rem; }
.nav-pills { display:flex; gap:10px; flex-wrap:wrap; }
.nav-pills a, .back-link {
    padding: 10px 14px; border:1px solid var(--line); border-radius:999px;
    background: rgba(255,255,255,.03); color: var(--muted);
}
.card {
    background: var(--card); border:1px solid var(--line); border-radius: 28px;
    backdrop-filter: blur(18px); box-shadow: var(--shadow);
}
.hero { padding: 34px; display:grid; grid-template-columns: 1.35fr .9fr; gap: 28px; margin-top: 14px; }
.eyebrow {
    display:inline-flex; padding: 8px 12px; border-radius:999px; border:1px solid rgba(255,255,255,.12);
    color:#c9d8f5; background: rgba(255,255,255,.05); font-size:.85rem; margin-bottom:14px;
}
.hero h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height:1.06; margin:0 0 14px; }
.hero p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 60ch; }
.hero-actions, .form-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top: 22px; }
.btn {
    appearance:none; border:0; cursor:pointer; border-radius:16px; padding: 13px 18px;
    font-weight:700; color: white; transition: transform .16s ease, opacity .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.btn-soft { background: rgba(255,255,255,.08); border:1px solid var(--line); color: var(--text); }
.btn.small { padding: 9px 12px; font-size: .88rem; border-radius: 12px; }
.stats-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.stats-grid div { padding: 18px; border:1px solid var(--line); border-radius:18px; background: rgba(255,255,255,.03); }
.stats-grid strong { display:block; margin-bottom:6px; font-size:1.05rem; }
.stats-grid span { color: var(--muted); font-size: .92rem; }
.hero-panel { display:flex; align-items:center; justify-content:center; }
.mini-window { width: 100%; max-width: 420px; border-radius: 26px; overflow:hidden; border:1px solid var(--line); background:#08111d; }
.mini-top { display:flex; gap:8px; padding: 14px 16px; border-bottom:1px solid var(--line); }
.mini-top span { width: 10px; height:10px; border-radius:50%; background: rgba(255,255,255,.22); }
.mini-content { padding: 24px; }
.mini-chip { display:inline-block; padding:6px 10px; border-radius:999px; background: rgba(110,168,255,.16); color:#dbe7ff; margin-bottom:12px; }
.mini-content code { display:block; padding:14px; background: rgba(255,255,255,.04); border-radius:16px; color:#cde1ff; word-break: break-all; }
.mini-content ul { margin: 18px 0 0; padding-left: 18px; color: var(--muted); }
.features-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.feature-card { padding: 24px; }
.feature-card h3 { margin:0 0 8px; }
.feature-card p { margin:0; color: var(--muted); line-height:1.6; }
.builder-layout { display:grid; grid-template-columns: 1.35fr .85fr; gap: 20px; margin: 22px 0 30px; }
.form-card, .result-card, .viewer-card { padding: 28px; }
.section-head h3, .viewer-head h1 { margin:0; }
.section-head p { margin:8px 0 0; color: var(--muted); }
.section-head.compact { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.grid-2 { display:grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { margin-top: 18px; }
.field label { display:block; margin-bottom: 10px; font-weight: 700; }
.field input[type=text], .field textarea, .field select, .copy-row input {
    width:100%; background: rgba(255,255,255,.04); border:1px solid var(--line); color: var(--text);
    border-radius: 16px; padding: 14px 15px; font: inherit; outline: none;
}

.field select {
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    background-color: #0f1b31;
    color: #ecf3ff;
    color-scheme: dark;
}

.field select option {
    background-color: #ffffff;
    color: #101828;
}

.field select option:checked,
.field select option:hover,
.field select option:focus {
    background: #2563eb;
    color: #ffffff;
}
.field textarea { resize: vertical; min-height: 220px; }
.help-row { display:flex; justify-content:space-between; gap:12px; color: var(--muted); font-size:.9rem; margin-top: 8px; }
.dropzone {
    position:relative; border: 1.5px dashed rgba(255,255,255,.2); border-radius:22px; padding: 30px 18px; text-align:center;
    background: rgba(255,255,255,.03); overflow:hidden;
}
.dropzone.dragging { border-color: var(--primary); background: rgba(110,168,255,.08); }
.dropzone input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; }
.dropzone p { margin: 8px 0 0; color: var(--muted); }
.file-list { display:grid; gap:10px; margin-top: 12px; }
.file-pill {
    display:flex; justify-content:space-between; gap:10px; align-items:center; padding: 12px 14px;
    border-radius:16px; border:1px solid var(--line); background: rgba(255,255,255,.04);
}
.toggle-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px; }
.toggle-card {
    padding: 14px 16px; border:1px solid var(--line); border-radius:18px; display:flex; gap:10px; align-items:center;
    background: rgba(255,255,255,.03); cursor:pointer;
}
.copy-row { display:flex; gap: 12px; margin-top: 8px; }
.copy-row input { flex:1; }
.result-box.hidden { display:none; }
.empty-state, .note-box {
    padding: 18px; border-radius:18px; border:1px dashed var(--line); color: var(--muted); background: rgba(255,255,255,.03);
}
.result-meta { display:grid; gap:10px; margin: 16px 0; }
.meta-chip { padding: 10px 12px; border-radius:14px; background: rgba(255,255,255,.04); border:1px solid var(--line); color:#d7e5ff; }
.footer { padding: 8px 0 28px; color: var(--muted); }
.view-wrap { padding: 28px 0; }
.viewer-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; flex-wrap:wrap; }
.viewer-badges { display:flex; gap:10px; flex-wrap:wrap; }
.badge { padding: 8px 12px; border-radius:999px; background: rgba(255,255,255,.06); border:1px solid var(--line); color:#dfeaff; }
.badge.danger { background: rgba(255,124,151,.12); color:#ffd7e0; border-color: rgba(255,124,151,.18); }
.content-block { margin-top: 24px; }
.shared-text {
    white-space: pre-wrap; word-break: break-word; padding: 18px; border-radius:22px;
    background: rgba(255,255,255,.04); border:1px solid var(--line); overflow:auto; line-height:1.65;
}
.download-list { display:grid; gap: 12px; }
.download-item {
    display:flex; justify-content:space-between; gap:12px; align-items:center; padding: 16px 18px;
    border-radius:18px; border:1px solid var(--line); background: rgba(255,255,255,.04);
}
.download-item strong { display:block; }
.download-item span { color: var(--muted); }
.meta-bar { display:flex; gap:16px; flex-wrap:wrap; margin-top: 22px; color: var(--muted); }
.bg-orb { position:fixed; width: 420px; height:420px; border-radius:50%; filter: blur(60px); opacity:.14; pointer-events:none; }
.orb-a { top:-120px; left:-80px; background:#6ea8ff; }
.orb-b { bottom:-140px; right:-80px; background:#8e7cff; }
@media (max-width: 980px) {
    .hero, .builder-layout { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .wrap { width: min(100% - 20px, 1180px); }
    .topbar { flex-direction:column; align-items:flex-start; }
    .stats-grid, .grid-2, .toggle-grid, .features-grid { grid-template-columns: 1fr; }
    .hero, .form-card, .result-card, .viewer-card { padding: 20px; border-radius: 22px; }
    .copy-row { flex-direction: column; }
}
