﻿@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800&family=Rajdhani:wght@500;600;700&display=swap');

* {
    box-sizing: border-box;
}

:root {
    --bg: #0b0920;
    --bg-soft: #141133;
    --panel: rgba(24, 19, 58, 0.8);
    --panel-strong: rgba(14, 11, 38, 0.92);
    --line: rgba(132, 114, 236, 0.34);
    --line-strong: #8f7bff;
    --text: #ece7ff;
    --muted: #b7aeea;
    --ok: #9b8dff;
    --bad: #ff7272;
    --warn: #ffd37d;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

body.zx-theme {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    background:
        radial-gradient(75% 60% at 16% 14%, rgba(137, 111, 255, 0.20), transparent 62%),
        radial-gradient(50% 45% at 92% 15%, rgba(104, 86, 214, 0.22), transparent 58%),
        linear-gradient(130deg, #0b0920 0%, #151137 50%, #0b0920 100%);
    overflow-x: hidden;
}

body.zx-theme::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        180deg,
        rgba(138, 116, 255, 0.06) 0,
        rgba(138, 116, 255, 0.06) 1px,
        transparent 1px,
        transparent 4px
    );
    opacity: 0.35;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(143, 123, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 123, 255, 0.12) 1px, transparent 1px);
    background-size: 62px 62px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 88%);
}

.bg-glow {
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    filter: blur(86px);
}

.bg-glow-a {
    width: 560px;
    height: 560px;
    top: -220px;
    left: -100px;
    background: rgba(143, 123, 255, 0.24);
}

.bg-glow-b {
    width: 440px;
    height: 440px;
    right: -140px;
    bottom: -180px;
    background: rgba(109, 90, 224, 0.26);
}

.install-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 26px;
}

.install-layout,
.update-layout {
    position: relative;
    width: min(1240px, 100%);
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 12, 42, 0.84), rgba(15, 12, 38, 0.95));
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(143, 123, 255, 0.12);
    overflow: hidden;
}

.install-layout::before,
.update-layout::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(95deg, rgba(143, 123, 255, 0.12), transparent 24%),
        linear-gradient(180deg, transparent 72%, rgba(143, 123, 255, 0.12) 100%);
}

.install-aside {
    position: relative;
    border-right: 1px solid var(--line);
    padding: 20px 18px;
    background:
        linear-gradient(180deg, rgba(35, 26, 96, 0.80), rgba(19, 14, 54, 0.92)),
        radial-gradient(circle at 45% 0%, rgba(143, 123, 255, 0.24), transparent 55%);
}

.install-aside::before {
    content: '';
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 10px;
    width: 2px;
    background: linear-gradient(180deg, rgba(143, 123, 255, 0), rgba(143, 123, 255, 0.78), rgba(143, 123, 255, 0));
    box-shadow: 0 0 18px rgba(143, 123, 255, 0.50);
}

.chrome-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
    opacity: 0.58;
}

.chrome-top {
    top: 0;
}

.chrome-bottom {
    bottom: 0;
}

.brand-block {
    position: relative;
    border: 1px solid rgba(143, 123, 255, 0.34);
    background: rgba(25, 20, 68, 0.72);
    margin: 0 0 18px 14px;
    padding: 14px 12px;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.brand-block::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 10px;
    width: 22px;
    height: 22px;
    border-top: 1px solid rgba(143, 123, 255, 0.64);
    border-right: 1px solid rgba(143, 123, 255, 0.64);
}

.brand-kicker {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 10px;
    color: #c5bcff;
}

.brand-title {
    margin: 6px 0 7px;
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    line-height: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f0ebff;
    text-shadow: 0 0 16px rgba(143, 123, 255, 0.34);
}

.brand-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.35;
    font-size: 13px;
}

.steps {
    margin-left: 14px;
    display: grid;
    gap: 8px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 12px;
    border: 1px solid rgba(143, 123, 255, 0.32);
    background: linear-gradient(92deg, rgba(33, 25, 88, 0.62), rgba(30, 23, 78, 0.40));
    color: #c7bcff;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 12px;
    font-weight: 700;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.step-index {
    width: 30px;
    height: 24px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(143, 123, 255, 0.40);
    color: #c9beff;
    background: rgba(20, 16, 52, 0.66);
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.step.active {
    color: #151033;
    border-color: #9e8cff;
    background: linear-gradient(90deg, rgba(153, 134, 255, 0.96), rgba(108, 90, 221, 0.90));
    box-shadow: 0 0 22px rgba(143, 123, 255, 0.45);
}

.step.active .step-index {
    background: rgba(236, 230, 255, 0.5);
    color: #1a1440;
    border-color: rgba(32, 25, 78, 0.35);
}

.install-card {
    position: relative;
    padding: 26px 24px;
    background:
        linear-gradient(180deg, rgba(16, 13, 46, 0.82), rgba(13, 11, 35, 0.95)),
        radial-gradient(circle at 100% 0, rgba(143, 123, 255, 0.18), transparent 52%);
}

.install-card::before {
    content: '';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 60px;
    height: 8px;
    border-top: 1px solid rgba(143, 123, 255, 0.38);
    border-right: 1px solid rgba(143, 123, 255, 0.38);
}

.page-head {
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(143, 123, 255, 0.30);
}

.page-head h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1;
    font-size: clamp(22px, 3vw, 38px);
    color: #efebff;
}

.section-title {
    margin: 14px 0 8px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.1;
    font-size: 20px;
    color: #d4cbff;
}

.panel {
    border: 1px solid rgba(143, 123, 255, 0.32);
    background: var(--panel);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    margin: 8px 0;
    padding: 10px 12px;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(164, 146, 255, 0.28);
    color: #cdc5ff;
}

.row-between:last-child {
    border-bottom: 0;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.env-form {
    gap: 10px;
    max-width: 880px;
}

.env-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}

.env-tab {
    min-width: 120px;
}

.env-tab.is-active {
    border-color: #9f8dff;
    color: #130f33;
    background: linear-gradient(90deg, rgba(155, 137, 255, 1), rgba(100, 82, 211, 0.95));
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.env-tab-panels {
    display: grid;
    gap: 10px;
}

.env-section {
    border: 1px solid rgba(143, 123, 255, 0.28);
    background: rgba(19, 15, 49, 0.62);
    padding: 10px 11px 9px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.env-title {
    margin: 0 0 8px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 13px;
    color: #d9cfff;
}

.env-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 10px;
}

.env-span-2 {
    grid-column: span 2;
}

.env-form label {
    gap: 4px;
    font-size: 11px;
}

.env-form .input {
    padding: 8px 10px;
}

.env-form .error {
    min-height: 14px;
    font-size: 11px;
}

.env-actions {
    margin-top: 6px;
}

.form-grid label {
    display: grid;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 12px;
    font-weight: 700;
    color: #b9b0f0;
}

.input {
    width: 100%;
    padding: 10px 11px;
    color: #ece8ff;
    font: inherit;
    border: 1px solid rgba(143, 123, 255, 0.42);
    background: rgba(21, 16, 56, 0.92);
    clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
}

select.input {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #bfb4ff 50%),
        linear-gradient(135deg, #bfb4ff 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.input:focus-visible,
.button:focus-visible {
    outline: 2px solid rgba(143, 123, 255, 0.76);
    outline-offset: 2px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 17px;
    border: 1px solid rgba(143, 123, 255, 0.40);
    color: #efeaff;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    background: rgba(20, 16, 52, 0.88);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.button:hover {
    border-color: rgba(166, 147, 255, 0.82);
    box-shadow: 0 0 18px rgba(143, 123, 255, 0.30);
    transform: translateY(-1px);
}

.button.primary {
    border-color: #9f8dff;
    color: #130f33;
    background: linear-gradient(90deg, rgba(155, 137, 255, 1), rgba(100, 82, 211, 0.95));
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.button.primary:hover {
    box-shadow: 0 0 24px rgba(155, 137, 255, 0.52);
}

.button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.alert {
    border: 1px solid;
    padding: 11px 13px;
    margin: 12px 0;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    backdrop-filter: blur(2px);
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

.alert-error {
    border-color: rgba(255, 114, 114, 0.5);
    background: rgba(74, 14, 14, 0.66);
    color: #ffc2c2;
}

.alert-success {
    border-color: rgba(159, 141, 255, 0.55);
    background: rgba(33, 24, 82, 0.68);
    color: #dfd6ff;
}

.alert-warning {
    border-color: rgba(255, 211, 125, 0.52);
    background: rgba(70, 47, 14, 0.66);
    color: #ffe9b7;
}

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

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

.error {
    min-height: 18px;
    color: #ff9f9f;
    text-transform: none;
    letter-spacing: 0.02em;
}

.log {
    margin-top: 8px;
    max-height: 270px;
    overflow: auto;
    white-space: pre-wrap;
    padding: 10px;
    color: #ddd5ff;
    border: 1px solid rgba(143, 123, 255, 0.24);
    background: rgba(0, 0, 0, 0.32);
}

@media (max-width: 1040px) {
    .install-layout,
    .update-layout {
        grid-template-columns: 1fr;
    }

    .install-aside {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-bottom: 16px;
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .install-shell {
        padding: 14px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .install-card {
        padding: 18px 16px;
    }

    .env-grid {
        grid-template-columns: 1fr;
    }

    .env-span-2 {
        grid-column: auto;
    }
}

