:root {
    color-scheme: dark;
    --bg: #0b1220;
    --surface: rgba(17, 24, 39, 0.94);
    --surface-soft: rgba(255, 255, 255, 0.04);
    --ink: #eef2ff;
    --muted: #9aa5bd;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #8b5cf6;
    --accent-strong: #6d28d9;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.3);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Space Grotesk", "Segoe UI", sans-serif; color: var(--ink); background: radial-gradient(circle at top right, rgba(139,92,246,.18), transparent 18%), linear-gradient(180deg, #111827 0%, var(--bg) 100%); }
.shell { width: min(1380px, calc(100% - 40px)); margin: 28px auto 40px; }
.masthead, .panel, .result-card, .sidebar-card { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); border-radius: var(--radius-xl); }
.masthead { display: flex; justify-content: space-between; gap: 24px; align-items: start; padding: 32px; margin-bottom: 24px; }
.eyebrow { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: rgba(238,242,255,.6); }
h1, h2, strong { margin: 0; letter-spacing: -.04em; }
h1 { margin-top: 10px; font-size: 30px; line-height: .96; }
.lead { margin: 14px 0 0; max-width: 760px; color: var(--muted); line-height: 1.7; }
.masthead-chip { padding: 12px 18px; border-radius: 999px; background: rgba(139,92,246,.16); border: 1px solid rgba(139,92,246,.26); font-weight: 700; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) 340px; gap: 24px; align-items: start; }
.panel, .result-card, .sidebar-card { padding: 24px; }
.control-panel { display: grid; gap: 18px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 10px; }
.field > span { font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(238,242,255,.72); }
input, select { width: 100%; height: 56px; padding: 0 16px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-md); background: rgba(255,255,255,.04); color: var(--ink); font: inherit; }
select { appearance: none; padding-right: 52px; background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.82) 50%), linear-gradient(135deg, rgba(255,255,255,.82) 50%, transparent 50%); background-position: calc(100% - 24px) calc(50% - 3px), calc(100% - 16px) calc(50% - 3px); background-size: 8px 8px, 8px 8px; background-repeat: no-repeat; }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; }
button { min-height: 50px; padding: 0 20px; border: 0; border-radius: 999px; font: inherit; font-weight: 800; cursor: pointer; }
button:not(.ghost-button) { color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-strong)); }
.ghost-button { color: var(--ink); background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.preview-panel p { color: var(--muted); }
.preview-box { margin-top: 16px; padding: 28px; border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(139,92,246,.08), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.08); }
.preview-box h2 { font-size: clamp(1rem, 2.8vw, 3rem); line-height: 1; }
.rail { display: grid; gap: 18px; }
.result-card pre { margin: 12px 0 0; white-space: pre-wrap; word-break: break-word; font: inherit; color: #d7dcff; line-height: 1.7; }
.sidebar-card strong { display: block; margin: 10px 0 6px; font-size: 1.3rem; }
.ad-slot, .ad-placeholder { border: 1px solid var(--line); border-radius: var(--radius-lg); min-height: 320px; background: rgba(255,255,255,.03); overflow: hidden; }
.ad-placeholder { padding: 16px; }
.ad-mockup { position: relative; min-height: 286px; height: 100%; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); }
.ad-mockup::before { content: ""; position: absolute; inset: 14px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.12); }
.ad-mockup-top, .ad-mockup-media, .ad-mockup-badge, .ad-mockup-lines { position: absolute; }
.ad-mockup-top { top: 24px; left: 24px; width: 110px; height: 18px; border-radius: 999px; background: rgba(255,255,255,.08); }
.ad-mockup-media { inset: 78px 24px 106px; border-radius: 16px; background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(99,102,241,.08)); }
.ad-mockup-lines { left: 24px; right: 24px; bottom: 28px; display: grid; gap: 10px; }
.ad-mockup-lines span { display: block; height: 12px; border-radius: 999px; background: rgba(255,255,255,.08); }
.ad-mockup-lines span:last-child { width: 58%; }
.ad-mockup-badge { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 142px; height: 142px; border-radius: 50%; display: grid; place-content: center; background: linear-gradient(135deg, #8b5cf6, #22d3ee); color: #fff; }
.ad-mockup-badge span { font-size: 1.35rem; font-weight: 800; line-height: 1; text-align: center; letter-spacing: .08em; }
@media (max-width: 1180px) { .workspace { grid-template-columns: 1fr; } .field-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .shell { width: min(100% - 24px, 1380px); } .masthead, .panel, .result-card, .sidebar-card { padding: 20px; } .masthead { flex-direction: column; } .action-row { flex-direction: column; } }
