:root {
    --bg: #0b0e13;
    --card: #121720;
    --card2: #171d28;
    --border: #252d3a;
    --text: #f3f6fa;
    --muted: #8f9aaa;
    --primary: #3ea6ff;
    --primary-dark: #168de0;
    --danger: #ff5f6d;
    --success: #40d98b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(
            circle at top,
            #162231 0,
            var(--bg) 45%
        );

    color: var(--text);

    font-family:
        Inter,
        Arial,
        sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    width: min(
        1100px,
        calc(100% - 28px)
    );

    margin: auto;
}

.hero {
    text-align: center;

    padding:
        55px
        10px
        30px;
}

.logo {
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin:
        0
        auto
        18px;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            #3ea6ff,
            #7567ff
        );

    font-size: 34px;

    box-shadow:
        0 20px 60px
        rgba(62,166,255,.2);
}

.hero h1 {
    margin: 0;

    font-size:
        clamp(
            28px,
            5vw,
            48px
        );

    letter-spacing: -1px;
}

.hero p {
    color: var(--muted);

    margin-top: 12px;

    font-size: 16px;
}

.card {
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.035),
            rgba(255,255,255,.015)
        ),
        var(--card);

    border:
        1px solid
        var(--border);

    border-radius: 22px;

    padding: 24px;

    margin-bottom: 18px;

    box-shadow:
        0 15px 45px
        rgba(0,0,0,.15);
}

.section-title {
    display: flex;

    gap: 14px;

    align-items: center;

    margin-bottom: 20px;
}

.section-title > span {
    width: 45px;
    height: 45px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: var(--card2);

    font-size: 21px;
}

.section-title h2 {
    margin: 0 0 4px;

    font-size: 18px;
}

.section-title p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
}

.search-row {
    display: flex;

    gap: 10px;
}

input,
textarea,
select {
    width: 100%;

    background: #0c1118;

    border:
        1px solid
        var(--border);

    color: var(--text);

    border-radius: 13px;

    outline: none;

    transition:
        border .2s,
        box-shadow .2s;
}

input {
    height: 48px;

    padding:
        0
        15px;
}

textarea {
    min-height: 115px;

    padding: 14px;

    resize: vertical;

    line-height: 1.7;
}

select {
    height: 48px;

    padding:
        0
        12px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(62,166,255,.12);
}

button {
    border: 0;

    border-radius: 13px;

    padding:
        0
        20px;

    min-height: 48px;

    transition:
        transform .15s,
        opacity .15s;
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    opacity: .5;

    cursor: not-allowed;

    transform: none;
}

.primary {
    background: var(--primary);

    color: #fff;
}

.primary:hover {
    background: var(--primary-dark);
}

.secondary {
    background: var(--card2);

    color: var(--text);

    border:
        1px solid
        var(--border);
}

.dataset-results {
    display: grid;

    gap: 8px;

    margin-top: 16px;

    max-height: 420px;

    overflow-y: auto;
}

.dataset-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 13px;

    border-radius: 14px;

    background: #0d131c;

    border:
        1px solid
        var(--border);

    cursor: pointer;
}

.dataset-item:hover {
    border-color:
        rgba(62,166,255,.5);
}

.dataset-item input {
    width: 18px;
    height: 18px;
}

.dataset-info {
    min-width: 0;
}

.dataset-name {
    font-weight: 700;

    direction: ltr;

    text-align: left;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.dataset-meta {
    color: var(--muted);

    font-size: 12px;

    margin-top: 4px;

    direction: ltr;

    text-align: left;
}

.status {
    margin-top: 10px;

    color: var(--muted);

    font-size: 13px;
}

.selected-box {
    margin-top: 18px;

    padding: 15px;

    background: #0d131c;

    border:
        1px solid
        var(--border);

    border-radius: 15px;
}

.mini-title {
    color: var(--muted);

    font-size: 13px;

    margin-bottom: 10px;
}

.chips {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}

.chip {
    direction: ltr;

    background:
        rgba(62,166,255,.12);

    border:
        1px solid
        rgba(62,166,255,.25);

    color:
        #9dd5ff;

    padding:
        7px
        10px;

    border-radius: 10px;

    font-size: 12px;
}

.muted {
    color: var(--muted);
}

.upload-box {
    min-height: 150px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 8px;

    border:
        1px dashed
        #3b4656;

    border-radius: 18px;

    cursor: pointer;

    background: #0d131b;

    transition: .2s;
}

.upload-box:hover {
    border-color:
        var(--primary);

    background:
        rgba(62,166,255,.04);
}

.upload-icon {
    font-size: 30px;
}

.upload-box span {
    color: var(--muted);

    font-size: 13px;
}

.file-list {
    margin-top: 12px;

    display: grid;

    gap: 7px;
}

.file-item {
    display: flex;

    justify-content: space-between;

    padding: 10px 12px;

    background: #0d131b;

    border-radius: 11px;

    color: var(--muted);

    direction: ltr;
}

.warning {
    margin-top: 12px;

    padding: 12px;

    border-radius: 12px;

    background:
        rgba(255,193,7,.07);

    border:
        1px solid
        rgba(255,193,7,.15);

    color: #d9c47c;

    font-size: 12px;
}

.settings-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap: 10px;
}

.toggle {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 13px;

    background: #0d131b;

    border:
        1px solid
        var(--border);

    border-radius: 13px;

    cursor: pointer;
}

.toggle input {
    width: 18px;
    height: 18px;
}

.fields {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap: 13px;

    margin-top: 15px;
}

.fields label {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;

    color: var(--muted);
}

.fields small {
    display: block;

    margin-top: 6px;

    color: #687384;

    font-size: 11px;
}

.wide {
    grid-column: span 2;
}

.build {
    width: 100%;

    min-height: 62px;

    margin:
        5px
        0
        18px;

    background:
        linear-gradient(
            135deg,
            #3ea6ff,
            #5568ff
        );

    color: white;

    font-size: 17px;

    font-weight: 700;

    box-shadow:
        0 15px 45px
        rgba(62,166,255,.16);
}

.progress-card {
    overflow: hidden;
}

.progress-header {
    display: flex;

    justify-content: space-between;

    margin-bottom: 12px;
}

.progress-bar {
    height: 9px;

    background: #0b1017;

    border-radius: 20px;

    overflow: hidden;
}

.progress-value {
    height: 100%;

    width: 0%;

    background:
        linear-gradient(
            90deg,
            #3ea6ff,
            #7567ff
        );

    transition:
        width .25s;
}

.progress-text {
    color: var(--muted);

    font-size: 12px;

    margin-top: 10px;
}

.log {
    margin: 0;

    min-height: 190px;

    max-height: 500px;

    overflow: auto;

    background: #090d13;

    border:
        1px solid
        var(--border);

    border-radius: 14px;

    padding: 15px;

    direction: ltr;

    text-align: left;

    white-space: pre-wrap;

    color: #b9c5d4;

    font-size: 12px;

    line-height: 1.7;
}

.result {
    text-align: center;

    padding: 35px 20px;

    margin-bottom: 30px;

    border-radius: 22px;

    background:
        rgba(64,217,139,.07);

    border:
        1px solid
        rgba(64,217,139,.2);
}

.result-icon {
    font-size: 45px;
}

.result h2 {
    margin:
        10px
        0;
}

.result p {
    color: var(--muted);
}

.result-buttons {
    display: flex;

    justify-content: center;

    gap: 10px;

    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;

    padding:
        25px
        0
        45px;

    color: #596474;

    font-size: 12px;
}

@media (max-width: 750px) {

    .search-row {
        flex-direction: column;
    }

    .settings-grid,
    .fields {
        grid-template-columns: 1fr;
    }

    .wide {
        grid-column: span 1;
    }

    .card {
        padding: 17px;
    }

    .hero {
        padding-top: 35px;
    }
}