:root {
    --ink: #1a1d24;
    --muted: #6b7280;
    --paper: #ffffff;
    --surface: #f2f4f7;
    --line: #e1e5eb;
    --accent: #d9480f;
    --accent-soft: #eceef2;
    --accent-ink: #ffffff;
    --danger: #c0392b;
    --success: #1e8e5a;
    --info: #2f6fd6;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(20, 22, 30, 0.08);
    --font-sans: 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono: Consolas, 'SFMono-Regular', 'Liberation Mono', Menlo, monospace;
    --container-width: 1280px;
    /* inner content column (forms, race, vocabularies, admin) — narrower than the
       container for readability; scales up on large/4K displays alongside it */
    --content-width: 1040px;
}

/* Widen the centred content + its inner column on large and 4K displays so pages
   don't sit in a narrow strip with big side margins (the header spans full width). */
@media (min-width: 1800px) {
    :root { --container-width: 1600px; --content-width: 1220px; }
}

@media (min-width: 2400px) {
    :root { --container-width: 1920px; --content-width: 1400px; }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background-color: var(--paper);
    font-family: var(--font-sans);
    line-height: 1.55;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

/* Nickname → profile links: keep the nickname's own look (incl. rank colour set
   inline), just add a pointer + hover underline so it reads as clickable. */
.profile-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.profile-link:hover {
    text-decoration: underline;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 30px;
    margin: 0 0 40px;
    color: var(--ink);
}

/* Buttons */

.btn {
    display: inline-block;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn--primary:hover {
    background: #b93b09;
    transform: translateY(-2px);
}

.btn--primary:disabled,
.btn--primary:disabled:hover {
    background: var(--muted);
    color: var(--paper);
    cursor: not-allowed;
    transform: none;
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--danger {
    background: var(--danger);
    color: #fff;
}

.btn--danger:hover {
    background: #a5301f;
    transform: translateY(-2px);
}

/* account-banned lockout card (banned.html) */

.banned-card {
    text-align: center;
}

.banned-card__icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 8px;
}

.banned-card__lead {
    font-size: 17px;
    margin: 0 0 12px;
}

.banned-card__reason {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--surface);
    margin: 0 0 20px;
}

.banned-card__reason span {
    font-weight: 700;
}

.btn--small {
    padding: 9px 18px;
    font-size: 14px;
}

/* Local list search box (friends / blocked / conversations) */
.list-search {
    display: block;
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    margin: 0 0 14px;
    padding: 8px 12px;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.list-search:focus {
    outline: none;
    border-color: var(--info);
}

/* Online/offline presence indicator (dot + optional label) */
.presence {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
}

.presence.is-online {
    color: var(--success);
}

.presence__dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c3c9d2;
    flex-shrink: 0;
    vertical-align: middle;
}

.presence.is-online .presence__dot,
.presence__dot.is-online {
    background: var(--success);
}

/* Hero */

.hero {
    padding: 72px 0;
    background: radial-gradient(circle at 15% 20%, var(--surface) 0%, var(--paper) 55%);
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 56px;
}

.hero__text h1 {
    font-size: 44px;
    line-height: 1.2;
    margin: 0 0 20px;
    color: var(--ink);
}

.hero__subtitle {
    font-size: 17px;
    color: var(--muted);
    margin: 0 0 28px;
    max-width: 480px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__image {
    padding: 20px;
    background: var(--surface);
    border-radius: 32px;
}

.hero__image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Features */

.features {
    padding: 72px 0;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px 28px;
    text-align: left;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.feature-card:nth-child(odd) {
    transform: rotate(-1deg);
}

.feature-card:nth-child(even) {
    transform: rotate(1deg);
}

.feature-card:hover {
    transform: rotate(0deg) translateY(-4px);
}

.feature-card__icon-wrap {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-card__icon {
    width: 56px;
    height: 56px;
}

.feature-card h3 {
    font-size: 19px;
    margin: 0 0 10px;
    color: var(--ink);
}

.feature-card p {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
}

/* How it works */

.how-it-works {
    padding: 72px 0;
    background-color: var(--surface);
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.step {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
}

.step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    margin-bottom: 16px;
}

.step h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--ink);
}

.step p {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
}

/* CTA */

.cta {
    padding: 64px 0;
}

.cta__inner {
    background: var(--accent);
    color: var(--accent-ink);
    text-align: center;
    padding: 56px 32px;
    border-radius: 28px;
}

.cta__inner h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.cta__inner p {
    margin: 0 0 24px;
    color: var(--accent-soft);
}

.cta .btn--primary {
    background: var(--ink);
    color: var(--paper);
}

.cta .btn--primary:hover {
    background: #2b2f3a;
}

/* Not found */

.not-found {
    padding: 96px 0;
    background: var(--paper);
}

.not-found__inner {
    text-align: center;
    max-width: 560px;
}

.not-found__code {
    font-size: 96px;
    font-weight: 700;
    line-height: 1;
    margin: 0 0 8px;
    color: var(--accent);
}

.not-found__inner h1 {
    font-size: 32px;
    margin: 0 0 16px;
    color: var(--ink);
}

.not-found__subtitle {
    font-size: 17px;
    color: var(--muted);
    margin: 0 0 32px;
}

/* Auth pages */

.auth {
    padding: 72px 0;
    background: radial-gradient(circle at 15% 20%, var(--surface) 0%, var(--paper) 55%);
}

/* the banned / lockout page reuses .auth but without the gradient */
.auth--flat {
    background: var(--paper);
}

.auth__inner {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 36px;
}

.auth-card h1 {
    margin: 0 0 12px;
    font-size: 28px;
    color: var(--ink);
}

.auth-card__subtitle {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 15px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form--secondary {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.field input {
    font: inherit;
    font-weight: 400;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid var(--line);
    background: var(--paper);
    color: var(--ink);
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
}

.field-status {
    margin: -10px 0 0;
    font-size: 13px;
    color: var(--success);
}

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

.auth-form__submit {
    margin-top: 4px;
    width: 100%;
    text-align: center;
}

.form-error {
    margin: 0;
    font-size: 14px;
    color: var(--danger);
}

.form-success {
    margin: 0;
    font-size: 14px;
    color: var(--success);
}

.auth-switch {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    font-weight: 600;
    text-decoration: none;
    color: var(--accent);
}

.auth-result {
    text-align: center;
}

.auth-secret {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px dashed var(--accent);
    font-family: var(--font-mono);
    font-size: 16px;
    word-break: break-all;
    user-select: all;
}

.auth-hint {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 20px;
}

/* Footer */

.site-footer {
    padding: 32px 0;
    border-top: 1px solid var(--line);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer__logo {
    height: 64px;
    width: auto;
    opacity: 0.8;
}

/* Responsive */

@media (max-width: 860px) {
    .hero__inner {
        grid-template-columns: 1fr;
    }

    .hero__text {
        text-align: center;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .section-title {
        text-align: center;
    }

    .feature-card {
        text-align: center;
    }

    .feature-card__icon-wrap {
        margin-left: auto;
        margin-right: auto;
    }
}
