:root {
    color-scheme: dark;
    --bg: #101010;
    --panel: #1f1f1f;
    --panel-strong: #262626;
    --line: rgba(255, 255, 255, 0.12);
    --text: #f5f5f5;
    --muted: #b8b8b8;
    --soft: #858585;
    --gold: #d8b35a;
    --gold-strong: #f0ca74;
    --blue: #2f8cff;
    --green: #79d69f;
    --danger: #ff7a7a;
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 12% 12%, rgba(216, 179, 90, 0.14), transparent 34rem),
        radial-gradient(circle at 82% 22%, rgba(121, 214, 159, 0.08), transparent 24rem),
        linear-gradient(180deg, #111111 0%, #0d0d0d 100%);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 88px 88px;
    -webkit-mask-image: radial-gradient(circle at 52% 38%, black, transparent 68%);
    mask-image: radial-gradient(circle at 52% 38%, black, transparent 68%);
}

a {
    color: inherit;
    text-decoration: none;
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
    align-items: center;
    gap: 64px;
    width: min(1120px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 84px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.94);
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(216, 179, 90, 0.18);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 0 0 18px;
    border: 1px solid rgba(216, 179, 90, 0.28);
    border-radius: 999px;
    background: rgba(216, 179, 90, 0.08);
    color: var(--gold-strong);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 14px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 720px;
    margin-bottom: 22px;
    font-size: clamp(3.1rem, 6.5vw, 5.9rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.login-copy p {
    max-width: 650px;
    color: var(--muted);
    font-size: 1.12rem;
}

.login-points {
    display: grid;
    gap: 12px;
    margin-top: 34px;
    color: var(--muted);
}

.login-points div {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.login-points span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(216, 179, 90, 0.12);
    flex: 0 0 auto;
    margin-top: 0.42rem;
}

.login-orientation {
    max-width: 660px;
    margin-top: 34px;
    border: 1px solid rgba(216, 179, 90, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(216, 179, 90, 0.12), rgba(47, 140, 255, 0.07)),
        rgba(255, 255, 255, 0.035);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
    padding: 20px;
}

.login-orientation span,
.account-badge {
    color: var(--gold-strong);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-orientation strong {
    display: block;
    margin-top: 7px;
    color: var(--text);
    font-size: 1.12rem;
}

.login-orientation p {
    margin: 8px 0 0;
    font-size: 0.98rem;
    line-height: 1.55;
}

.login-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 42%),
        linear-gradient(145deg, rgba(32, 32, 32, 0.98), rgba(13, 13, 13, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
    padding: 32px;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--blue), rgba(121, 214, 159, 0.9));
}

.account-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin-bottom: 18px;
    border: 1px solid rgba(216, 179, 90, 0.22);
    border-radius: 999px;
    background: rgba(216, 179, 90, 0.08);
    padding: 0 12px;
}

.account-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 18px rgba(121, 214, 159, 0.72);
}

.login-card-head {
    margin-bottom: 24px;
}

.login-card h2 {
    margin-bottom: 8px;
    font-size: 1.85rem;
    letter-spacing: 0;
}

.login-card p,
.login-message,
.login-links {
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 10px;
}

label {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    outline: none;
    padding: 0 14px;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input:focus {
    border-color: rgba(216, 179, 90, 0.58);
    box-shadow: 0 0 0 3px rgba(216, 179, 90, 0.12);
}

.password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.password-row button,
.login-submit,
.create-account {
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.password-row button {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 0 12px;
}

.login-submit {
    margin-top: 10px;
    background: linear-gradient(135deg, #ffffff, #d9e8ff);
    color: #111111;
    box-shadow: 0 14px 34px rgba(47, 140, 255, 0.18);
}

.create-account {
    width: 100%;
    background: rgba(216, 179, 90, 0.1);
    border-color: rgba(216, 179, 90, 0.3);
    color: var(--text);
}

.password-row button:hover,
.login-submit:hover,
.create-account:hover {
    transform: translateY(-1px);
}

.password-row button,
.login-submit,
.create-account {
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.new-user-guide {
    margin-top: 18px;
    border: 1px solid rgba(47, 140, 255, 0.24);
    border-radius: 8px;
    background: rgba(47, 140, 255, 0.07);
    padding: 16px;
}

.new-user-guide strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 1rem;
}

.new-user-guide p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.guide-steps span {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    padding: 8px 6px;
}

button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--soft);
    font-size: 0.86rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.login-message {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 13px 14px;
    font-size: 0.92rem;
}

.login-message.success {
    border-color: rgba(121, 214, 159, 0.34);
    color: var(--green);
}

.login-message.error {
    border-color: rgba(255, 122, 122, 0.34);
    color: var(--danger);
}

.login-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    font-size: 0.92rem;
}

.login-links a:hover {
    color: var(--text);
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 28px 0;
    }

    .brand {
        margin-bottom: 40px;
    }

    .login-orientation {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .login-shell {
        width: min(100% - 28px, 1120px);
    }

    h1 {
        font-size: clamp(2.55rem, 14vw, 4rem);
    }

    .login-card {
        padding: 22px;
    }

    .password-row {
        grid-template-columns: 1fr;
    }

    .guide-steps {
        grid-template-columns: 1fr;
    }
}
