* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #f8fafc;
    background:
        radial-gradient(circle at 20% 20%, rgba(68, 97, 255, .22), transparent 35%),
        radial-gradient(circle at 85% 15%, rgba(168, 85, 247, .20), transparent 30%),
        #070a14;
}

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

.auth-card {
    width: min(100%, 460px);
    padding: 34px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 26px;
    background: rgba(14, 18, 34, .78);
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #5576ff, #a855f7);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 20px;
}

.brand small {
    margin-top: 2px;
    color: #94a3b8;
}

h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 38px);
}

.subtitle {
    margin: 0 0 28px;
    color: #aab4c6;
    line-height: 1.6;
}

form {
    display: grid;
    gap: 17px;
}

label {
    display: grid;
    gap: 8px;
    color: #dbe3f0;
    font-size: 14px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    outline: none;
    color: #fff;
    background: rgba(255,255,255,.055);
    font: inherit;
}

input:focus {
    border-color: #7289ff;
    box-shadow: 0 0 0 4px rgba(114,137,255,.12);
}

button,
.button-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #5576ff, #8b5cf6);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.alert,
.success-box {
    padding: 13px 14px;
    margin-bottom: 20px;
    border-radius: 12px;
    line-height: 1.5;
}

.alert {
    color: #fecaca;
    border: 1px solid rgba(239,68,68,.35);
    background: rgba(239,68,68,.10);
}

.success-box {
    color: #bbf7d0;
    border: 1px solid rgba(34,197,94,.30);
    background: rgba(34,197,94,.10);
}

.switch {
    margin: 22px 0 0;
    text-align: center;
    color: #9aa7ba;
}

a {
    color: #9aaeff;
}
.google-auth-button {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 18px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    cursor: pointer;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.045);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.google-auth-button:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.25);
    background: rgba(255, 255, 255, 0.075);
}

.google-auth-button svg {
    width: 21px;
    height: 21px;
}

.auth-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
    color: #718096;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background: rgba(255, 255, 255, 0.09);
}

.auth-divider span {
    padding: 0 14px;
}

.auth-alert {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
}

.auth-alert-error {
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.22);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 65px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    padding: 5px;
    border: 0;
    cursor: pointer;
    transform: translateY(-50%);
    color: #67d8ff;
    font-size: 11px;
    font-weight: 700;
    background: transparent;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.6;
}

.terms-checkbox input {
    margin-top: 3px;
    accent-color: #0ea5e9;
}

.terms-checkbox a,
.auth-switch a,
.otp-footer a,
.back-link {
    color: #67d8ff;
}

.otp-card {
    max-width: 510px;
}

.otp-inputs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.otp-box {
    width: 100%;
    height: 62px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    outline: none;
    text-align: center;
    color: #ffffff;
    font-size: 25px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.045);
}

.otp-box:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.otp-footer {
    margin-top: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

.otp-footer p {
    display: inline;
}

.otp-footer a {
    margin-left: 5px;
    font-weight: 700;
}

.back-link {
    display: block;
    margin-top: 22px;
    text-align: center;
    font-size: 12px;
}

@media (max-width: 520px) {
    .otp-inputs {
        gap: 6px;
    }

    .otp-box {
        height: 52px;
        border-radius: 10px;
        font-size: 20px;
    }
}
