:root {
    --page-width: 1500px;

    --bg-page-top: #040b11;
    --bg-page-middle: #08131c;
    --bg-page-bottom: #061017;

    --bg-shell: rgba(4, 10, 16, 0.78);
    --bg-nav: #08131c;
    --bg-input: #07131c;

    --bg-panel-top: rgba(11, 24, 34, 0.98);
    --bg-panel-bottom: rgba(7, 16, 24, 0.98);

    --bg-card-top: rgba(16, 36, 51, 0.95);
    --bg-card-bottom: rgba(8, 19, 28, 0.95);

    --line: #1d4a5f;
    --line-soft: #15384a;
    --line-strong: #24546a;
    --line-bright: #33d6ff;

    --text-main: #d8f7ff;
    --text-bright: #ffffff;
    --text-soft: #8dc8d8;
    --text-dim: #6792a0;
    --text-muted: #6792a0;

    --accent: #19d9ff;
    --accent-2: #00ffa8;

    --accent-glow: rgba(25, 217, 255, 0.45);
    --accent-glow-soft: rgba(0, 255, 168, 0.18);

    --transition-speed: 0.25s;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg-page-top);
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;

    background:
        linear-gradient(to bottom,
            var(--bg-page-top) 0%,
            var(--bg-page-middle) 45%,
            var(--bg-page-bottom) 100%);

    color: var(--text-main);
    font-family: Arial, Helvetica, sans-serif;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: 0;

    content: "";

    background-image: url("/images/bgdot1.png");
    background-repeat: repeat;

    opacity: 0.05;
    pointer-events: none;
}

img {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;

    transition:
        color var(--transition-speed) ease,
        text-shadow var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease,
        background var(--transition-speed) ease,
        border-color var(--transition-speed) ease;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px var(--accent);
}


/*
 * Main site wrapper
 */

.site-shell {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: var(--page-width);
    min-height: 100vh;

    margin: 0 auto;

    border-left: 1px solid #0d2735;
    border-right: 1px solid #0d2735;

    background: var(--bg-shell);
}


/*
 * Branding
 */

.top-brand {
    position: relative;
    overflow: hidden;

    padding: 10px;

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

    background:
        linear-gradient(180deg,
            rgba(14, 35, 49, 0.95),
            rgba(6, 16, 23, 0.95));
}

.top-brand::before {
    position: absolute;
    inset: 0;
    z-index: 0;

    content: "";

    background-image: url("/images/bgdot1.png");
    background-repeat: repeat;

    opacity: 0.05;
    pointer-events: none;
}

.top-brand>* {
    position: relative;
    z-index: 1;
}

.brand-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;
}

.logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 78px;
    height: 78px;

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

    background:
        linear-gradient(135deg,
            rgba(18, 48, 66, 0.95),
            rgba(5, 18, 26, 0.95));

    color: var(--accent);

    font-size: 2rem;
    font-weight: bold;

    box-shadow:
        0 0 10px rgba(25, 217, 255, 0.25),
        inset 0 0 18px rgba(0, 255, 168, 0.08);

    text-shadow:
        0 0 10px var(--accent-glow);
}

.brand-text {
    min-width: 250px;
    flex: 1;
}

.site-title {
    margin: 0;

    color: #f0fdff;

    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;

    text-shadow:
        0 0 14px rgba(25, 217, 255, 0.35);
}

.site-subtitle {
    margin: 8px 0 0;

    color: var(--text-soft);

    font-size: 0.98rem;
    letter-spacing: 0.05em;
}


/*
 * Main navigation
 */

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;

    border-top: 1px solid #102c3b;
    border-bottom: 1px solid #102c3b;

    background: var(--bg-nav);
}

.nav-inner {
    display: flex;
    flex-wrap: wrap;
}

.nav-link {
    display: block;

    padding: 12px;

    border-right: 1px solid #123445;

    color: var(--text-main);
    background: transparent;

    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: #ffffff;

    background:
        linear-gradient(180deg,
            rgba(18, 46, 61, 0.95),
            rgba(8, 19, 28, 0.95));

    box-shadow:
        inset 0 -3px 0 var(--accent),
        0 0 16px rgba(25, 217, 255, 0.18);

    text-shadow:
        0 0 10px rgba(25, 217, 255, 0.55);
}


/*
 * Status strip
 */

.hero-strip {
    padding: 18px 20px;

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

    background:
        linear-gradient(90deg,
            rgba(8, 21, 29, 0.95),
            rgba(14, 39, 52, 0.85),
            rgba(8, 21, 29, 0.95));
}

.hero-strip strong {
    color: var(--accent-2);

    text-shadow:
        0 0 10px rgba(0, 255, 168, 0.35);
}


/*
 * Main page layout
 */

.main-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 2.2fr) minmax(280px, 0.9fr);

    gap: 10px;
    padding: 10px;
}

.content-column,
.side-column {
    min-width: 0;
}


/*
 * Panels
 */

.panel {
    padding: 18px;

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

    background:
        linear-gradient(180deg,
            var(--bg-panel-top),
            var(--bg-panel-bottom));

    box-shadow:
        0 0 12px rgba(0, 0, 0, 0.28),
        inset 0 0 20px rgba(0, 255, 168, 0.03);
}

.side-column .panel+.panel {
    margin-top: 20px;
}

.side-column {
    position: sticky;
    top: 54px;

    align-self: start;
    height: fit-content;
}

@media (max-width: 900px) {
    .side-column {
        position: static;
        top: auto;
    }
}

.panel-title {
    margin: 0 0 16px;
    padding-bottom: 10px;

    border-bottom: 1px solid var(--line-soft);

    color: var(--accent);

    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/*
 * Article cards
 */

.post-list {
    display: grid;
    gap: 18px;
}

.post-card {
    padding: 18px;

    border: 1px solid #1b475c;

    background:
        linear-gradient(180deg,
            var(--bg-card-top),
            var(--bg-card-bottom));

    transition:
        border-color var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease,
        transform var(--transition-speed) ease;
}

.post-card:hover {
    border-color: var(--line-bright);

    box-shadow:
        0 0 18px rgba(25, 217, 255, 0.16),
        inset 0 0 18px rgba(0, 255, 168, 0.05);

    transform: translateY(-2px);
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;
    margin-bottom: 10px;

    color: var(--text-dim);

    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.post-tag {
    display: inline-block;

    padding: 4px 8px;

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

    color: var(--accent);
    background: rgba(25, 217, 255, 0.05);
}

.post-title {
    margin: 0 0 10px;

    color: #f2feff;

    font-size: 1.35rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.post-body {
    margin: 0;

    color: var(--text-soft);

    line-height: 1.7;
}


/*
 * Sidebar
 */

.side-list {
    display: grid;
    gap: 10px;
}

.side-link {
    display: flex;
    align-items: center;

    gap: 10px;
    padding: 8px;

    border: 1px solid #173c4d;

    color: var(--text-main);
    background: rgba(14, 31, 44, 0.9);
}

.side-link:hover {
    border-color: var(--line-bright);

    background: rgba(14, 43, 56, 0.98);

    box-shadow:
        0 0 14px rgba(25, 217, 255, 0.18);
}

.side-link-icon {
    display: block;
    flex: 0 0 auto;

    width: 24px;
    height: 24px;

    object-fit: contain;

    transform: translateY(1px);
}

.status-box {
    padding: 14px;

    border: 1px solid #19485a;

    color: var(--text-soft);
    background: rgba(8, 26, 36, 0.92);

    line-height: 1.6;
}

.status-box p {
    margin: 0 0 10px;
}

.status-box p:last-child {
    margin-bottom: 0;
}

.status-box strong {
    color: var(--accent-2);
}


/*
 * Footer
 */

.footer {
    margin-top: 20px;
    padding: 20px;

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

    color: var(--text-dim);
    background: #071018;

    text-align: center;
    font-size: 0.92rem;
}


/*
 * Responsive layout
 */

@media (max-width: 960px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .nav-link {
        flex: 1 1 auto;

        min-width: 120px;

        text-align: center;
    }
}

@media (max-width: 640px) {
    .top-brand {
        padding: 16px;
    }

    .brand-row {
        align-items: flex-start;
    }

    .logo-box {
        width: 64px;
        height: 64px;

        font-size: 1.5rem;
    }

    .site-title {
        font-size: 1.6rem;
    }

    .hero-strip,
    .main-layout,
    .footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .nav-link {
        padding: 14px 12px;

        font-size: 0.84rem;
    }

    .post-title {
        font-size: 1.15rem;
    }
}


/*
 * Homepage article links and buttons
 */

.post-title-link {
    color: inherit;
}

.post-title-link:hover {
    color: var(--accent);
}

.post-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 10px;
    margin-top: 18px;
}

.read-article-button,
.article-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 10px 16px;

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

    color: #eaffff;
    background:
        linear-gradient(180deg,
            rgba(13, 57, 72, 0.96),
            rgba(7, 27, 37, 0.96));

    font-size: 0.86rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.read-article-button:hover,
.article-back-link:hover {
    border-color: var(--accent-2);

    color: #ffffff;
    background:
        linear-gradient(180deg,
            rgba(14, 77, 83, 0.98),
            rgba(7, 38, 44, 0.98));

    box-shadow:
        0 0 16px rgba(25, 217, 255, 0.2),
        inset 0 0 14px rgba(0, 255, 168, 0.07);
}


/*
 * Full public article page
 */

.article-view-panel {
    overflow: hidden;
}

.full-article {
    min-width: 0;
}

.full-article-header {
    padding-bottom: 22px;

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

.full-article-title {
    margin: 0;

    color: #f2feff;

    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.04em;
    line-height: 1.12;
    text-transform: uppercase;

    text-shadow:
        0 0 14px rgba(25, 217, 255, 0.24);
}

.full-article-summary {
    margin-top: 18px;
    padding: 16px 18px;

    border-left: 3px solid var(--accent);

    color: var(--text-soft);
    background: rgba(10, 31, 42, 0.72);

    font-size: 1.04rem;
    line-height: 1.75;
}

.article-block-list {
    display: grid;

    gap: 22px;
    margin-top: 26px;
}

.article-block {
    width: min(100%, 920px);
    margin-right: auto;
    margin-left: auto;

    color: var(--text-main);
}

.article-block--style-wide {
    width: 100%;
}

.article-block--style-centered {
    text-align: center;
}

.article-block--style-accent {
    padding: 18px;

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

    background:
        linear-gradient(180deg,
            rgba(14, 48, 61, 0.76),
            rgba(7, 24, 33, 0.76));

    box-shadow:
        0 0 15px rgba(25, 217, 255, 0.12),
        inset 0 0 16px rgba(0, 255, 168, 0.035);
}

.article-block--style-muted {
    padding: 18px;

    border: 1px solid #173848;

    color: var(--text-soft);
    background: rgba(7, 18, 26, 0.76);
}

.article-block-heading {
    margin: 0;
    padding-bottom: 10px;

    border-bottom: 1px solid var(--line-soft);

    color: var(--accent);

    font-size: clamp(1.35rem, 3vw, 2rem);
    letter-spacing: 0.055em;
    line-height: 1.2;
    text-transform: uppercase;
}

.article-block-title {
    margin: 0 0 10px;

    color: #edfdff;

    font-size: 1.15rem;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.article-block-text {
    margin: 0;

    color: var(--text-soft);

    font-size: 1rem;
    line-height: 1.8;
}

.article-block--heading .article-block-text {
    margin-top: 12px;
}

.article-block--info_box,
.article-block--warning_box {
    padding: 18px;

    border: 1px solid var(--line-bright);
    border-left-width: 5px;

    background: rgba(8, 31, 41, 0.9);
}

.article-block--info_box {
    border-left-color: var(--accent);
}

.article-block--info_box .article-block-title {
    color: var(--accent);
}

.article-block--warning_box {
    border-color: #d08a38;
    border-left-color: #ffad42;

    background: rgba(54, 31, 11, 0.65);
}

.article-block--warning_box .article-block-title {
    color: #ffc36e;
}

.article-block--quote {
    position: relative;

    margin-top: 0;
    margin-bottom: 0;
    padding: 20px 24px 20px 34px;

    border-left: 4px solid var(--accent-2);

    color: var(--text-main);
    background: rgba(7, 27, 34, 0.78);
}

.article-block--quote::before {
    position: absolute;
    top: 2px;
    left: 10px;

    content: "“";

    color: var(--accent-2);

    font-size: 3.3rem;
    line-height: 1;
    opacity: 0.55;
}

.article-block--quote p {
    margin: 0;

    font-size: 1.12rem;
    font-style: italic;
    line-height: 1.75;
}

.article-block--quote cite {
    display: block;

    margin-top: 12px;

    color: var(--text-dim);

    font-style: normal;
    letter-spacing: 0.05em;
}

.article-code-title {
    margin: 0;
    padding: 9px 12px;

    border: 1px solid #21495a;
    border-bottom: 0;

    color: var(--accent);
    background: #0b202b;

    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.article-code {
    overflow-x: auto;

    margin: 0;
    padding: 18px;

    border: 1px solid #21495a;

    color: #c9ffe7;
    background: #030b0f;

    font-family:
        "DejaVu Sans Mono",
        Consolas,
        monospace;
    font-size: 0.92rem;
    line-height: 1.65;
    tab-size: 4;
    white-space: pre;
}

.article-block--image {
    margin-top: 0;
    margin-bottom: 0;
}

.article-image {
    display: block;

    width: auto;
    max-width: 100%;
    height: auto;

    margin: 0 auto;

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

    background: #02070a;

    box-shadow:
        0 0 18px rgba(0, 0, 0, 0.35);
}

.article-block--image figcaption {
    margin-top: 8px;

    color: var(--text-dim);

    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}

.article-divider {
    width: min(100%, 920px);
    height: 1px;

    margin: 4px auto;

    border: 0;

    background:
        linear-gradient(90deg,
            transparent,
            var(--line-bright),
            transparent);

    box-shadow:
        0 0 8px rgba(25, 217, 255, 0.24);
}

.article-divider.article-block--style-wide {
    width: 100%;
}

.article-divider.article-block--style-muted {
    opacity: 0.45;
}

.article-divider.article-block--style-accent {
    height: 2px;

    background:
        linear-gradient(90deg,
            transparent,
            var(--accent-2),
            var(--accent),
            transparent);
}

.article-empty-blocks {
    margin-top: 24px;
}

.full-article-footer {
    display: flex;

    margin-top: 30px;
    padding-top: 20px;

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

.article-error-state .article-back-link {
    margin-top: 18px;
}

@media (max-width: 640px) {
    .full-article-title {
        font-size: 1.55rem;
    }

    .full-article-summary,
    .article-block--style-accent,
    .article-block--style-muted,
    .article-block--info_box,
    .article-block--warning_box {
        padding: 14px;
    }

    .article-block--quote {
        padding: 18px 16px 18px 29px;
    }

    .article-code {
        padding: 14px;

        font-size: 0.82rem;
    }

    .post-actions {
        justify-content: stretch;
    }

    .read-article-button,
    .article-back-link {
        width: 100%;
    }
}


/* Safe article BBCode-style formatting */
.article-block-text strong,
.article-quote-text strong {
    color: var(--text-bright, #ffffff);
}

.article-text-underline {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.article-text-mark {
    padding: 0 0.18em;
    background: rgba(0, 216, 255, 0.2);
    color: inherit;
}

.article-inline-code {
    padding: 0.08em 0.32em;
    border: 1px solid var(--line-strong, #24546a);
    background: rgba(0, 0, 0, 0.32);
    font-family: monospace;
    font-size: 0.94em;
}

.article-text-small {
    font-size: 0.82em;
}

.article-text-big {
    font-size: 1.28em;
    line-height: 1.35;
}

.article-rich-list {
    margin: 12px 0 12px 1.5rem;
    padding: 0;
}

.article-rich-list li {
    margin: 6px 0;
    padding-left: 4px;
}

.article-rich-list li::marker {
    color: var(--accent, #00d8ff);
    font-weight: 700;
}

.article-quote-text {
    margin: 0;
}

/* Safe article links and inline images */
.article-rich-link {
    color: var(--accent, #19d9ff);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    overflow-wrap: anywhere;
}

.article-rich-link:hover,
.article-rich-link:focus-visible {
    color: var(--accent-2, #00ffa8);
}

.article-inline-image {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line, #1d4a5f);
    background: rgba(0, 0, 0, 0.18);
    box-shadow: 0 0 18px rgba(25, 217, 255, 0.12);
}

.article-inline-image--center {
    display: block;
    margin: 16px auto;
}

.article-inline-image--left:not(.article-inline-image--wrap) {
    display: block;
    margin: 16px auto 16px 0;
}

.article-inline-image--right:not(.article-inline-image--wrap) {
    display: block;
    margin: 16px 0 16px auto;
}

.article-inline-image--inline {
    display: inline-block;
    margin: 4px 8px;
}

.article-inline-image--top {
    vertical-align: top;
}

.article-inline-image--bottom {
    vertical-align: bottom;
}

.article-inline-image--wrap.article-inline-image--left {
    float: left;
    max-width: min(46%, 420px);
    margin: 5px 18px 12px 0;
}

.article-inline-image--wrap.article-inline-image--right {
    float: right;
    max-width: min(46%, 420px);
    margin: 5px 0 12px 18px;
}

.article-block-text::after,
.article-quote-text::after {
    display: block;
    clear: both;
    content: "";
}

@media (max-width: 700px) {

    .article-inline-image--wrap.article-inline-image--left,
    .article-inline-image--wrap.article-inline-image--right {
        float: none;
        display: block;
        max-width: 100%;
        margin: 16px auto;
    }
}


/* Public article comments */
.article-comments {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    scroll-margin-top: 24px;
}

.article-comments-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.article-comments-title {
    margin: 0;
    color: var(--accent);
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.article-comments-count {
    display: inline-grid;
    min-width: 1.8em;
    min-height: 1.8em;
    place-items: center;
    margin-left: 7px;
    padding: 0.15em 0.45em;
    border: 1px solid var(--line-bright);
    color: var(--accent-2);
    font-size: 0.72em;
}

.article-comments-header p {
    margin: 8px 0 0;
    color: var(--text-dim);
    line-height: 1.5;
}

.article-comment-message,
.article-comments-empty {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    background: rgba(6, 22, 31, 0.9);
    color: var(--text-soft);
}

.article-comment-message.success {
    border-color: rgba(0, 255, 168, 0.45);
    color: #70efbf;
}

.article-comment-message.error {
    border-color: rgba(255, 95, 119, 0.55);
    color: #ff9aaa;
}

.article-comment-list {
    display: grid;
    gap: 14px;
}

.article-comment {
    padding: 16px;
    border: 1px solid #173f52;
    background: linear-gradient(180deg, var(--bg-card-top), var(--bg-card-bottom));
}

.article-comment-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line-soft);
}

.article-comment-header strong {
    color: var(--accent-2);
}

.article-comment-header time {
    color: var(--text-dim);
    font-size: 0.84rem;
}

.article-comment-body {
    color: var(--text-main);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.article-comment-form-panel {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid #1b4b60;
    background: rgba(5, 20, 29, 0.94);
}

.article-comment-form-panel h3 {
    margin: 0 0 16px;
    color: var(--accent-2);
}

.article-comment-form {
    display: grid;
    gap: 15px;
}

.article-comment-field {
    display: grid;
    gap: 7px;
}

.article-comment-field label {
    color: var(--text-soft);
    font-weight: 700;
}

.article-comment-field input,
.article-comment-field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #1b4b60;
    border-radius: 0;
    outline: none;
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
}

.article-comment-field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.55;
}

.article-comment-field input:focus,
.article-comment-field textarea:focus {
    border-color: var(--line-bright);
    box-shadow: 0 0 0 2px rgba(25, 217, 255, 0.12);
}

.article-comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.article-comment-form-footer span {
    color: var(--text-dim);
    font-size: 0.84rem;
}

.article-comment-form-footer button {
    padding: 10px 16px;
    border: 1px solid var(--line-bright);
    border-radius: 0;
    background: rgba(8, 45, 57, 0.96);
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.article-comment-form-footer button:hover,
.article-comment-form-footer button:focus-visible {
    color: var(--accent-2);
    border-color: var(--accent-2);
}

.article-comment-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 640px) {
    .article-comment-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .article-comment-form-footer button {
        width: 100%;
    }
}

/*
 * Shared public forms and messages
 *
 * These classes are used by the newsletter now and can also be reused
 * by the Contact page later. Admin pages load /css/admin.css afterwards,
 * so their existing admin-specific form appearance remains unchanged.
 */

.form-field {
    display: grid;
    gap: 8px;
}

.form-label {
    color: var(--text-main);
    font-weight: bold;
    letter-spacing: 0.05em;
    line-height: 1.4;
    text-transform: uppercase;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;

    border: 1px solid var(--line);
    border-radius: 0;
    outline: none;

    color: var(--text-main);
    background: var(--bg-input);

    font: inherit;

    transition:
        border-color var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease,
        background var(--transition-speed) ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--line-bright);
    background: #081925;

    box-shadow:
        0 0 0 2px rgba(25, 217, 255, 0.1),
        0 0 14px rgba(25, 217, 255, 0.14);
}

.form-input[type="email"],
.form-input[type="date"],
.form-input[type="datetime-local"] {
    color-scheme: dark;
}

.form-textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.6;
}

.form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 10px 16px;

    border: 1px solid var(--line-bright);
    border-radius: 0;

    color: #eaffff;
    background:
        linear-gradient(180deg,
            rgba(13, 57, 72, 0.96),
            rgba(7, 27, 37, 0.96));

    font: inherit;
    font-size: 0.86rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        color var(--transition-speed) ease,
        background var(--transition-speed) ease,
        border-color var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease,
        opacity var(--transition-speed) ease;
}

.form-button:hover,
.form-button:focus-visible {
    border-color: var(--accent-2);

    color: #ffffff;
    background:
        linear-gradient(180deg,
            rgba(14, 77, 83, 0.98),
            rgba(7, 38, 44, 0.98));

    box-shadow:
        0 0 16px rgba(25, 217, 255, 0.2),
        inset 0 0 14px rgba(0, 255, 168, 0.07);
}

.form-button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.form-button-secondary {
    border-color: #526c78;
    color: var(--text-soft);
    background: #101d24;
}

.form-button-danger {
    border-color: #ff5770;
    color: #ffd7dd;
    background: #35121a;
}

.form-button-danger:hover,
.form-button-danger:focus-visible {
    border-color: #ff7186;
    color: #ffffff;
    background: #5a1724;
    box-shadow: 0 0 16px rgba(255, 87, 112, 0.3);
}

.form-message {
    margin: 16px 0;
    padding: 14px 16px;

    border: 1px solid var(--line);
    border-left-width: 4px;

    color: var(--text-soft);
    background: rgba(6, 22, 31, 0.94);

    line-height: 1.6;
    overflow-wrap: anywhere;
}

.form-message.success {
    border-color: rgba(0, 255, 168, 0.55);
    color: #70efbf;
    background: rgba(4, 42, 34, 0.72);
}

.form-message.error {
    border-color: rgba(255, 95, 119, 0.65);
    color: #ff9aaa;
    background: rgba(51, 14, 23, 0.72);
}

.form-message.notice {
    border-color: rgba(255, 193, 92, 0.58);
    color: #ffd38a;
    background: rgba(50, 34, 9, 0.72);
}

@media (max-width: 640px) {
    .form-button {
        width: 100%;
    }
}
