:root {
    --bg: #070914;
    --panel: rgba(11, 15, 32, 0.82);
    --panel-border: rgba(255, 255, 255, 0.12);
    --text: #f3f6ff;
    --muted: #aeb7d4;
    --accent: #80b7ff;
    --accent-strong: #4b8dff;
    --danger: #ff7b7b;
    --success: #74e6a2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 15%, rgba(66, 104, 255, 0.35), transparent 28rem),
        radial-gradient(circle at 80% 20%, rgba(155, 71, 255, 0.28), transparent 24rem),
        linear-gradient(135deg, #050714 0%, #10182e 45%, #070914 100%);
}

.background-media {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-image, none);
    background-size: cover;
    background-position: center;
    opacity: 0.35;
}

.background-vignette {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(3, 5, 13, 0.96), rgba(3, 5, 13, 0.62), rgba(3, 5, 13, 0.92));
}

.topbar {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.toplink {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.toplink:hover {
    color: var(--text);
}

.hero {
    width: min(1180px, calc(100% - 32px));
    min-height: calc(100vh - 84px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
    gap: 48px;
    align-items: center;
    padding: 24px 0 72px;
}

.hero-copy h1 {
    font-size: clamp(3rem, 9vw, 7.8rem);
    line-height: 0.88;
    margin: 0 0 22px;
    letter-spacing: -0.07em;
}

.hero-copy p {
    max-width: 620px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.65;
}

.card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    border-radius: 24px;
    padding: 28px;
    backdrop-filter: blur(18px);
}

.card h2 {
    margin: 0 0 8px;
    font-size: 1.55rem;
}

.card .sub {
    color: var(--muted);
    margin: 0 0 22px;
    line-height: 1.45;
}

.form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.9rem;
}

input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 1rem;
    outline: none;
}

input:focus {
    border-color: rgba(128, 183, 255, 0.85);
    box-shadow: 0 0 0 4px rgba(128, 183, 255, 0.12);
}

button {
    cursor: pointer;
    border: 0;
    border-radius: 12px;
    padding: 13px 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #061127;
    font-weight: 800;
    font-size: 1rem;
}

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

.status {
    min-height: 1.3rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.status.error {
    color: var(--danger);
}

.status.success {
    color: var(--success);
}

.small-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.small-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.92rem;
}

.page {
    width: min(680px, calc(100% - 32px));
    min-height: calc(100vh - 84px);
    margin: 0 auto;
    display: grid;
    align-items: center;
    padding: 24px 0 72px;
}

.note {
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 28px;
        align-items: start;
    }

    .hero-copy {
        padding-top: 32px;
    }
}

.field-feedback {
    min-height: 1.15rem;
    margin-top: -8px;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: pre-line;
    line-height: 1.35;
}

.field-feedback.error {
    color: var(--danger);
}

/* Landing layout: signup left, title copy right. */
.hero .card {
    order: 1;
}

.hero .hero-copy {
    order: 2;
}

/* Godot-style live validation feedback. */
.field-feedback {
    min-height: 1.15rem;
    margin-top: -8px;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: pre-line;
    line-height: 1.35;
}

.field-feedback.error {
    color: var(--danger);
}

#register-card > .form + .form {
    margin-top: 0.65rem;
}
