:root {
    color-scheme: dark;
    --surface: #151521;
    --surface-2: #1c1c2b;
    --border: #303045;
    --text: #f3f3fa;
    --muted: #9999b2;
    --accent: #7866ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0d0d16;
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
}

.topbar {
    min-height: 76px;
    padding: 16px 5%;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-icon {
    color: var(--accent);
    font-size: 35px;
}

.brand strong {
    display: block;
    letter-spacing: 2px;
    font-size: 17px;
}

.brand small {
    color: var(--muted);
    letter-spacing: 3px;
    font-size: 10px;
}

.version,
.eyebrow {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.workspace {
    width: min(1400px, 94%);
    margin: 36px auto;
    display: grid;
    grid-template-columns: minmax(290px, 390px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.settings,
.preview-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    min-width: 0;
}

h1 {
    margin: 12px 0;
    font-size: 26px;
}

h2 {
    margin: 0 0 16px;
    font-size: 17px;
}

p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 13px;
}

.section-heading {
    margin-bottom: 28px;
}

.field,
.field-group {
    margin-bottom: 25px;
}

.field label,
.color-row label {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 600;
}

select,
textarea {
    width: 100%;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 13px;
    font: inherit;
}

select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
}

.field-group {
    border-top: 1px solid var(--border);
    padding-top: 22px;
}

.color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0;
    gap: 12px;
}

.color-row label {
    margin: 0;
}

input[type=color] {
    width: 58px;
    height: 38px;
    padding: 3px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 7px;
    cursor: pointer;
}

button {
    width: 100%;
    border: 0;
    border-radius: 9px;
    padding: 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

button.secondary {
    background: #29293d;
    color: #dedeee;
}

button.primary {
    background: var(--accent);
    color: white;
}

button:hover {
    filter: brightness(1.12);
}

.preview-header,
.embed-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.preview-header h2 {
    margin: 8px 0 18px;
    font-size: 21px;
}

.live-indicator {
    font-size: 10px;
    color: #7ad9a6;
    letter-spacing: 1px;
}

.preview-frame {
    overflow: hidden;
    background: #101018;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.preview-frame iframe {
    display: block;
    width: 100%;
    height: 440px;
    border: 0;
}

.embed-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.embed-heading {
    display: block;
}

.embed-heading h2 {
    margin-bottom: 5px;
}

textarea {
    height: 112px;
    resize: vertical;
    font-family: monospace;
    font-size: 12px;
    margin: 14px 0;
}

.status {
    min-height: 18px;
    color: #7ad9a6;
}

footer {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    padding: 30px;
}

@media (max-width: 850px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .settings,
    .preview-section {
        padding: 20px;
    }

    .preview-frame iframe {
        height: 400px;
    }

    .version {
        display: none;
    }
}

@media (max-width: 480px) {
    .workspace {
        width: 96%;
        margin: 16px auto;
        gap: 16px;
    }

    .preview-frame iframe {
        height: 350px;
    }

    h1 {
        font-size: 23px;
    }
}
