:root {
    color-scheme: dark;
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #050911;
    color: #f5f8fc;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(
            circle at 15% 5%,
            rgba(28, 116, 255, 0.2),
            transparent 30%
        ),
        #050911;
}

button,
select {
    font: inherit;
}

button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #31445f;
    border-radius: 9px;
    background: #142033;
    color: #f4f7fb;
    cursor: pointer;
}

button:hover:not(:disabled) {
    border-color: #5799ff;
    background: #1a2b45;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

button.primary {
    border-color: #237af1;
    background: #176ce0;
}

.topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
    border-bottom: 1px solid #1d2a3d;
    background: rgba(5, 9, 17, 0.95);
}

.novanet {
    margin-right: 12px;
    color: #68a8ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.service-state {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b9c7da;
    font-size: 14px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f0ad4e;
}

.indicator.ready {
    background: #47df8b;
    box-shadow: 0 0 14px rgba(71, 223, 139, 0.75);
}

.indicator.error {
    background: #ff5d68;
}

.workspace {
    width: min(1500px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 20px;
    padding: 20px;
}

.preview-column {
    min-width: 0;
}

.stage {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #273750;
    border-radius: 14px;
    background:
        linear-gradient(45deg, #0c1421 25%, transparent 25%),
        linear-gradient(-45deg, #0c1421 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #0c1421 75%),
        linear-gradient(-45deg, transparent 75%, #0c1421 75%),
        #08101c;
    background-size: 30px 30px;
    background-position:
        0 0,
        0 15px,
        15px -15px,
        -15px 0;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.stage.landscape {
    aspect-ratio: 16 / 9;
}

.stage.portrait {
    width: min(440px, 100%);
    aspect-ratio: 9 / 16;
    margin: 0 auto;
}

#preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.empty-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    padding: 30px;
    text-align: center;
    color: #9fb0c7;
}

.empty-state.hidden {
    display: none;
}

.camera-icon {
    font-size: 42px;
    color: #367edb;
}

.empty-state h1 {
    margin: 12px 0 0;
    color: #eef4fc;
    font-size: clamp(34px, 6vw, 66px);
}

.preview-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 9px;
    border-radius: 6px;
    background: rgba(10, 18, 30, 0.84);
    color: #8bbcff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.transport {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.download {
    display: inline-block;
    margin-top: 14px;
    color: #79b1ff;
    font-weight: 700;
}

.hidden {
    display: none;
}

.control-column {
    display: grid;
    align-content: start;
    gap: 14px;
}

.panel {
    padding: 18px;
    border: 1px solid #23334a;
    border-radius: 12px;
    background: rgba(13, 21, 34, 0.92);
}

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

.panel label {
    display: block;
    margin: 14px 0 7px;
    color: #9eb0c8;
    font-size: 13px;
    font-weight: 700;
}

.panel select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #31445f;
    border-radius: 8px;
    background: #0b1422;
    color: #eef4fc;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 9px;
    border-bottom: 1px solid #1f2d41;
}

dt {
    color: #8fa3bd;
}

dd {
    margin: 0;
    text-align: right;
}

.release-panel code {
    overflow-wrap: anywhere;
}

.small {
    color: #99abc2;
    font-size: 13px;
    line-height: 1.55;
}

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

    .control-column {
        grid-template-columns:
            repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 0 14px;
    }

    .workspace {
        padding: 12px;
    }

    .transport {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .transport button {
        width: 100%;
    }
}
