:root {
    --background: #07090d;
    --surface: #0d1117;
    --text: #e8edf2;
    --muted: #768390;
    --cyan: #31e6ff;
    --purple: #9e6cff;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family:
        "Courier New",
        monospace;
}

.site-container {
    min-height: 100vh;

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

    padding: 24px;
}

.terminal {
    width: min(720px, 100%);
    padding: 32px;

    background: var(--surface);

    border: 1px solid rgba(49, 230, 255, 0.25);
}

.terminal-label {
    margin-top: 0;

    color: var(--purple);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
}

.terminal h1 {
    margin-bottom: 12px;

    color: var(--cyan);
    font-size: clamp(2rem, 8vw, 4rem);
}

.terminal p {
    line-height: 1.6;
}

.status {
    margin-top: 32px;

    color: var(--cyan);
}

.auth-terminal {
    max-width: 620px;
}

.terminal-description {
    margin-bottom: 32px;

    color: var(--muted);
}

.auth-form {
    display: flex;
    flex-direction: column;

    gap: 20px;

    margin-top: 32px;
}

.form-field {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.form-field label {
    color: var(--cyan);

    font-size: 0.85rem;
    text-transform: uppercase;

    letter-spacing: 0.08em;
}

.form-field input {
    width: 100%;

    padding: 14px 16px;

    border: 1px solid rgba(
        49,
        230,
        255,
        0.25
    );

    outline: none;

    background: #07090d;

    color: var(--text);

    font-family: inherit;
    font-size: 1rem;
}

.form-field input:focus {
    border-color: var(--cyan);
}

.terminal-button {
    margin-top: 12px;

    padding: 14px 18px;

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

    background: transparent;

    color: var(--cyan);

    font-family: inherit;
    font-size: 0.9rem;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.terminal-button:hover {
    background: var(--cyan);

    color: var(--background);
}

.form-error {
    margin: 4px 0 0;

    color: #ff657a;

    font-size: 0.85rem;
}

.auth-link {
    margin-top: 28px;

    color: var(--muted);
}

.auth-link a {
    color: var(--purple);
}

.network-message {
    margin-top: 32px;

    padding: 20px;

    border-left: 2px solid var(--purple);

    background: rgba(
        158,
        108,
        255,
        0.06
    );

    color: var(--muted);
}

.home-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 16px;

    margin-top: 32px;
}

.terminal-link {
    display: inline-block;

    padding: 12px 16px;

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

    color: var(--cyan);

    text-decoration: none;
}

.terminal-link:hover {
    background: var(--cyan);

    color: var(--background);
}

.terminal-link.secondary {
    border-color: var(--purple);

    color: var(--purple);
}

.terminal-link.secondary:hover {
    background: var(--purple);

    color: var(--background);
}

.logout-form {
    margin-top: 18px;
}

.text-button {
    padding: 0;

    border: 0;

    background: none;

    color: var(--muted);

    font-family: inherit;

    cursor: pointer;
}

.identity-screen {
    width: min(1180px, 100%);
}

.identity-header {
    margin-bottom: 36px;
}

.identity-header h1 {
    margin: 12px 0 18px;

    color: var(--cyan);

    font-size: clamp(
        2.3rem,
        6vw,
        4rem
    );
}

.operator-identification {
    display: flex;
    flex-wrap: wrap;

    gap: 12px 28px;

    margin-bottom: 28px;

    color: var(--muted);
}

.operator-identification strong {
    color: var(--text);
}

.identity-intro {
    max-width: 760px;

    line-height: 1.7;
}

.identity-warning {
    max-width: 760px;

    color: var(--purple);

    line-height: 1.6;
}


.faction-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 1fr)
        );

    gap: 18px;
}


.faction-card {
    position: relative;

    min-height: 330px;

    padding: 24px;

    display: flex;
    flex-direction: column;

    border: 1px solid
        color-mix(
            in srgb,
            var(--faction-color) 40%,
            transparent
        );

    background: #0d1117;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease;
}

.faction-card:hover {
    transform: translateY(-3px);

    border-color:
        var(--faction-color);
}

.faction-symbol {
    width: 52px;
    height: 52px;

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

    margin-bottom: 18px;

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

    color:
        var(--faction-color);

    font-size: 1rem;
    font-weight: bold;
}

.faction-symbol.large {
    width: 72px;
    height: 72px;

    margin-top: 24px;

    font-size: 1.2rem;
}

.faction-code {
    margin-bottom: 8px;

    color:
        var(--faction-color);

    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.faction-card h2 {
    margin:
        0
        0
        16px;

    color: var(--text);
}

.faction-card p {
    flex-grow: 1;

    color: var(--muted);

    line-height: 1.6;
}

.faction-select {
    display: block;

    margin-top: 20px;

    padding: 12px;

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

    color:
        var(--faction-color);

    text-align: center;
    text-decoration: none;
}

.faction-select:hover {
    background:
        var(--faction-color);

    color: var(--background);
}


.faction-confirm {
    border-color:
        var(--faction-color);
}

.faction-confirm h1 {
    color:
        var(--faction-color);
}

.faction-description {
    max-width: 620px;

    color: var(--muted);

    line-height: 1.7;
}

.permanent-choice-warning {
    margin-top: 32px;

    padding: 20px;

    border-left: 2px solid
        var(--faction-color);

    background:
        rgba(255, 255, 255, 0.025);
}

.permanent-choice-warning strong {
    color:
        var(--faction-color);
}

.permanent-choice-warning p {
    margin-bottom: 0;

    color: var(--muted);
}

.confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 16px;

    margin-top: 30px;
}

.confirmation-actions form {
    margin: 0;
}

.faction-confirm-button {
    margin: 0;

    border-color:
        var(--faction-color);

    color:
        var(--faction-color);
}

.faction-confirm-button:hover {
    background:
        var(--faction-color);

    color: var(--background);
}


@media (max-width: 640px) {

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

    .faction-card {
        min-height: auto;
    }

}

.avatar-screen {
    width: min(900px, 100%);
}

.avatar-form {
    display: flex;
    flex-direction: column;

    gap: 36px;
}

.avatar-section {
    padding-top: 26px;

    border-top: 1px solid
        rgba(49, 230, 255, 0.18);
}

.avatar-section h2 {
    margin:
        0
        0
        20px;

    color: var(--cyan);

    font-size: 0.9rem;

    letter-spacing: 0.1em;
}

.avatar-options {
    display: grid;

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

    gap: 16px;
}

.avatar-option {
    cursor: pointer;
}

.avatar-option input {
    position: absolute;

    opacity: 0;
}

.avatar-option-content {
    display: flex;
    align-items: center;

    gap: 18px;

    padding: 20px;

    border: 1px solid
        rgba(49, 230, 255, 0.25);

    background: #0d1117;
}

.avatar-option input:checked
+ .avatar-option-content {
    border-color: var(--cyan);

    box-shadow:
        inset 0 0 0 1px
        var(--cyan);
}

.avatar-preview {
    width: 60px;
    height: 70px;

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

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

    color: var(--cyan);

    font-size: 1.4rem;
}

.shirt-colors {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(130px, 1fr)
        );

    gap: 12px;
}

.shirt-color-option {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 14px;

    border: 1px solid
        rgba(255, 255, 255, 0.12);

    cursor: pointer;
}

.shirt-color-option input {
    display: none;
}

.shirt-color-option:has(input:checked) {
    border-color: var(--cyan);

    background:
        rgba(49, 230, 255, 0.04);
}

.shirt-color-swatch {
    width: 26px;
    height: 26px;

    border: 1px solid
        rgba(255, 255, 255, 0.35);
}


.shirt-cyan
.shirt-color-swatch {
    background: #31e6ff;
}

.shirt-purple
.shirt-color-swatch {
    background: #9e6cff;
}

.shirt-green
.shirt-color-swatch {
    background: #55e39f;
}

.shirt-red
.shirt-color-swatch {
    background: #ff657a;
}

.shirt-yellow
.shirt-color-swatch {
    background: #ffd76a;
}

.shirt-white
.shirt-color-swatch {
    background: #e8edf2;
}


.avatar-confirm-button {
    align-self: flex-start;

    padding-left: 28px;
    padding-right: 28px;
}


@media (max-width: 640px) {

    .avatar-options {
        grid-template-columns: 1fr;
    }

}