:root {
    color-scheme: dark;
    --page: #111315;
    --surface: #1b1e20;
    --surface-raised: #222628;
    --line: #373c40;
    --line-strong: #555c61;
    --text: #eef0f1;
    --text-soft: #aab1b6;
    --text-muted: #7d858a;
    --accent: #c79555;
    --bad: #df7b81;
    --good: #68bc8a;
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
            radial-gradient(circle at 50% -20%, rgba(199, 149, 85, 0.12), transparent 34rem),
            linear-gradient(180deg, #151719 0%, var(--page) 68%);
    color: var(--text);
    font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
            linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 32px 32px;
    content: "";
    mask-image: linear-gradient(to bottom, black, transparent 76%);
}

[hidden] {
    display: none !important;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.auth-card {
    width: min(100%, 430px);
    padding: 38px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: 8px;
    background: rgba(27, 30, 32, 0.96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.auth-brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface-raised);
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 0.03em;
}

.auth-copy {
    margin: 38px 0 28px;
}

.auth-kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: #f7f8f8;
    font-size: clamp(28px, 7vw, 36px);
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.auth-subtitle {
    max-width: 34rem;
    margin: 14px 0 0;
    color: var(--text-soft);
    font-size: 14px;
}

.auth-alert {
    margin: -4px 0 20px;
    padding: 11px 12px;
    border: 1px solid rgba(223, 123, 129, 0.42);
    border-radius: 5px;
    background: rgba(223, 123, 129, 0.08);
    color: #f0a6aa;
    font-size: 13px;
}

.google-button {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 0 20px;
    border: 1px solid #d8dadd;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    color: #202124;
    font-size: 15px;
    font-weight: 650;
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

.google-button:hover {
    border-color: #c7c9cc;
    background: #f8f9fa;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.3);
}

.google-button:active {
    background: #f1f3f4;
    transform: translateY(1px);
}

.google-button:focus-visible {
    outline: 3px solid rgba(199, 149, 85, 0.55);
    outline-offset: 3px;
}

.google-mark {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.auth-boundary {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 12px;
}

.auth-boundary p {
    margin: 0;
}

.boundary-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 3px rgba(104, 188, 138, 0.11);
}

@media (max-width: 520px) {
    .auth-shell {
        align-items: start;
        padding: 18px 12px;
    }

    .auth-card {
        margin-top: max(4vh, 16px);
        padding: 28px 22px;
    }

    .auth-copy {
        margin: 30px 0 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .google-button {
        transition: none;
    }
}
