/* paranoia — стиль title-menu / HUD / серверного меню в DLL.
   палитра взята из kTheme и nvgRGBA в paranoia_title_menu.cpp. */

:root {
    --bg-deep: #0a0a0a;
    --bg-panel: #161616;
    --bg-panel-hover: #24262c;
    --bg-input: #18181b;
    --border-soft: #202022;
    --border-strong: #303032;
    --border-bright: #404044;
    --text-primary: #dedede;
    --text-second: #a8a8a9;
    --text-mute: #5a5a5c;
    --accent: #767a8a;
    --accent-hi: #a5aabc;
    --ok: #4ade80;
    --warn: #fbbf24;
    --err: #ff3b3b;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.03) inset;

    --font: -apple-system, BlinkMacSystemFont, "Inter", "Manrope", "SF Pro Display",
            "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body {
    /* тонкий шум как у HUD-панелей */
    background-image:
        radial-gradient(1200px 600px at 50% -10%, rgba(118, 122, 138, 0.08), transparent 60%),
        radial-gradient(800px 400px at 100% 100%, rgba(118, 122, 138, 0.04), transparent 60%);
    background-attachment: fixed;
}

a {
    color: var(--text-second);
    text-decoration: none;
    transition: color 120ms ease;
}

a:hover {
    color: var(--text-primary);
}

button {
    font-family: var(--font);
    cursor: pointer;
    user-select: none;
}

input,
button,
select,
textarea {
    font-family: var(--font);
    font-size: 14px;
}

::placeholder {
    color: var(--text-mute);
}

/* ---------- header (title-bar) ---------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 28px;
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(6px);
    background: rgba(10, 10, 10, 0.85);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-primary);
    font-size: 13px;
}

.brand img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(165, 170, 188, 0.3));
}

.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ---------- кнопки в стиле serverMenu ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 16px;
    background: var(--bg-panel);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.btn:hover {
    background: var(--bg-panel-hover);
    border-color: var(--border-bright);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(180deg, #2f3340 0%, #1c1f29 100%);
    border-color: #767a8a;
    color: #f0f0f0;
}

.btn-primary:hover {
    border-color: var(--accent-hi);
    background: linear-gradient(180deg, #3a3f4f 0%, #1c1f29 100%);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border-soft);
    color: var(--text-second);
}

.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn .ico {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.85;
}

/* ---------- центральные карточки ---------- */
.layout {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.hero {
    text-align: center;
    padding: 92px 16px 64px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 0.18em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.hero p.sub {
    color: var(--text-mute);
    margin: 0 0 36px;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero .cta {
    display: inline-flex;
    gap: 12px;
}

.hero .cta .btn {
    height: 42px;
    padding: 0 26px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.foot-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 28px;
    color: var(--text-mute);
    font-size: 12px;
}

/* ---------- panel ---------- */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 22px 24px;
}

.panel + .panel {
    margin-top: 16px;
}

.panel-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin: 0 0 14px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-2 > .panel {
    margin: 0;
}

.field {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(48, 48, 50, 0.55);
    gap: 12px;
}

.field:last-child {
    border-bottom: none;
}

.field .k {
    color: var(--text-mute);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.field .v {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: right;
    word-break: break-all;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 10px;
    border-radius: 11px;
    border: 1px solid var(--border-strong);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tag.ok {
    color: var(--ok);
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.06);
}

.tag.warn {
    color: var(--warn);
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.06);
}

.tag.err {
    color: var(--err);
    border-color: rgba(255, 59, 59, 0.45);
    background: rgba(255, 59, 59, 0.08);
}

.tag.muted {
    color: var(--text-mute);
}

.uid-display {
    font-family: var(--font-mono);
    font-size: 36px;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

.uid-display::before {
    content: "▌ ";
    color: var(--accent);
}

/* ---------- forms ---------- */
.form-card {
    max-width: 480px;
    margin: 64px auto;
}

.form-card h2 {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-primary);
    margin: 0 0 22px;
    text-align: center;
}

.form-row {
    margin-bottom: 14px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-mute);
}

.input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: 4px;
    outline: none;
    transition: border-color 120ms ease;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.input:focus {
    border-color: var(--accent-hi);
}

.input.full-mono {
    font-family: var(--font-mono);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-second);
    font-size: 13px;
    margin: 14px 0 18px;
}

.form-row .err-line {
    margin-top: 8px;
    font-size: 12px;
    color: var(--err);
    min-height: 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.form-actions .btn {
    flex: 1;
    height: 40px;
    justify-content: center;
}

.aux-link {
    text-align: center;
    margin-top: 18px;
    color: var(--text-mute);
    font-size: 13px;
}

.aux-link a {
    color: var(--text-second);
}

/* ---------- download card ---------- */
.dl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(118, 122, 138, 0.04) 0%, transparent 100%);
}

.dl-info {
    display: flex;
    flex-direction: column;
}

.dl-info .t {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dl-info .s {
    color: var(--text-mute);
    font-family: var(--font-mono);
    font-size: 12px;
}

.dl-cta {
    height: 44px;
    padding: 0 22px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ---------- toast ---------- */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    padding: 12px 18px;
    background: var(--bg-panel);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 200ms ease, transform 200ms ease;
    z-index: 50;
    font-size: 13px;
    max-width: 360px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.err {
    border-color: rgba(255, 59, 59, 0.5);
}

/* ---------- footer ---------- */
.app-foot {
    padding: 24px 0 12px;
    text-align: center;
    color: var(--text-mute);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- mobile ---------- */
@media (max-width: 720px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 36px;
    }
    .layout {
        padding: 24px 12px 60px;
    }
    .dl {
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
    }
}
