:root {
    --bg: #090b10;
    --surface: #10131a;
    --surface-2: #151923;
    --border: #242936;
    --text: #f4f6f8;
    --muted: #8991a1;
    --accent: #7c6cff;
    --accent-hover: #9588ff;
    --success: #49d17d;
    --radius: 16px;
    --sidebar: 250px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: 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 {
    min-height: 100vh;
    display: flex;
}

/* SIDEBAR */

.sidebar {
    width: var(--sidebar);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid var(--border);
    background: #0b0d12;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent), #4c3dd8);
    display: grid;
    place-items: center;
    font-weight: 800;
}

.brand strong,
.brand span {
    display: block;
}

.brand strong {
    font-size: 14px;
}

.brand span {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.sidebar-nav {
    margin-top: 45px;
}

.nav-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 5px;
}

.nav-item span {
    width: 20px;
    text-align: center;
}

.nav-item:hover,
.nav-item.active {
    color: white;
    background: var(--surface-2);
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px 10px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

.sidebar-footer small {
    display: block;
    margin-top: 4px;
    opacity: .6;
}

/* MAIN */

.main {
    width: calc(100% - var(--sidebar));
    margin-left: var(--sidebar);
}

.topbar {
    padding: 42px 42px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.eyebrow {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

h1 {
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -.04em;
    margin-top: 7px;
}

.subtitle {
    color: var(--muted);
    margin-top: 9px;
    font-size: 14px;
}

.status {
    align-self: center;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    margin-right: 7px;
    box-shadow: 0 0 12px var(--success);
}

/* WORKSPACE */

.workspace {
    padding: 30px 42px 60px;
    display: grid;
    grid-template-columns: minmax(500px, 1.5fr) minmax(360px, .9fr);
    gap: 25px;
    align-items: start;
}

.form-column {
    display: grid;
    gap: 18px;
}

.card,
.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card {
    padding: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.card-header > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-number {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}

.card h2 {
    font-size: 16px;
}

.card-header p {
    color: var(--muted);
    font-size: 11px;
    align-self: center;
}

/* FORM */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    color: #b8beca;
    font-size: 12px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    color: var(--text);
    background: #0c0f15;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    transition: .2s ease;
}

input,
select {
    height: 43px;
    padding: 0 13px;
}

textarea {
    min-height: 95px;
    padding: 12px 13px;
    resize: vertical;
    line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 108, 255, .09);
}

::placeholder {
    color: #555d6d;
}

.color-input {
    display: flex;
    gap: 8px;
}

.color-input input[type="color"] {
    width: 43px;
    padding: 4px;
    cursor: pointer;
}

.color-input input[type="text"] {
    flex: 1;
}

/* CHECKBOXES */

.checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.check {
    display: flex;
    gap: 12px;
    padding: 13px;
    background: #0c0f15;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
}

.check:hover {
    border-color: #363c4a;
}

.check input {
    display: none;
}

.check > span {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 5px;
    border: 1px solid #3a4150;
}

.check input:checked + span {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 4px #0c0f15;
}

.check strong,
.check small {
    display: block;
}

.check strong {
    font-size: 12px;
}

.check small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    margin-top: 3px;
}

/* BUTTON */

.generate-btn {
    height: 54px;
    border: 0;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--accent), #5748dd);
    font-weight: 700;
    letter-spacing: -.01em;
    box-shadow: 0 12px 35px rgba(82, 66, 220, .18);
    transition: .2s ease;
}

.generate-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--accent-hover), #6658e8);
}

.generate-btn span {
    margin-right: 7px;
}

/* RESULT */

.result-column {
    position: sticky;
    top: 25px;
}

.result-card {
    overflow: hidden;
}

.result-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.result-header h2 {
    font-size: 17px;
    margin-top: 5px;
}

.copy-btn {
    background: #1b202b;
    color: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 13px;
    font-size: 11px;
}

.copy-btn:hover {
    background: #252b38;
}

.prompt-meta {
    padding: 10px 20px;
    color: var(--muted);
    font-size: 10px;
    border-bottom: 1px solid var(--border);
}

#promptOutput {
    border: 0;
    border-radius: 0;
    min-height: 650px;
    background: #080a0e;
    padding: 20px;
    resize: vertical;
    color: #cbd1dc;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    line-height: 1.7;
}

.result-footer {
    padding: 11px 20px;
    display: flex;
    justify-content: space-between;
    color: #626a79;
    font-size: 10px;
    border-top: 1px solid var(--border);
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .result-column {
        position: static;
    }
}

@media (max-width: 750px) {
    :root {
        --sidebar: 0px;
    }

    .sidebar {
        display: none;
    }

    .topbar,
    .workspace {
        padding-left: 18px;
        padding-right: 18px;
    }

    .topbar {
        flex-direction: column;
    }

    .form-grid,
    .checks {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    .card {
        padding: 18px;
    }

    .card-header {
        flex-direction: column;
    }
}