.yz-auth, .yz-captcha-modal {
    --yz-card-bg: #fff;
    --yz-input-focus-bg: #fff;
    --yz-indigo-500: #6366f1;
    --yz-indigo-600: #4f46e5;
    --yz-indigo-700: #4338ca;
    --yz-gray-50: #f9fafb;
    --yz-gray-100: #f3f4f6;
    --yz-gray-200: #e5e7eb;
    --yz-gray-400: #9ca3af;
    --yz-gray-500: #6b7280;
    --yz-gray-600: #4b5563;
    --yz-gray-800: #1f2937;
    --yz-red-50: #fef2f2;
    --yz-red-100: #fee2e2;
    --yz-red-300: #fca5a5;
    --yz-red-500: #ef4444;
    --yz-green-50: #ecfdf5;
    --yz-green-600: #10b981;
}

html.dark .yz-auth, html.dark .yz-captcha-modal {
    --yz-card-bg: #101a2e;
    --yz-input-focus-bg: #162136;
    --yz-indigo-500: #818cf8;
    --yz-gray-50: #162136;
    --yz-gray-100: #162136;
    --yz-gray-200: #24314e;
    --yz-gray-400: #71839d;
    --yz-gray-500: #8b9bb4;
    --yz-gray-600: #a8b6cc;
    --yz-gray-800: #e6edf9;
    --yz-red-50: rgba(239,68,68,.12);
    --yz-red-100: rgba(239,68,68,.25);
    --yz-red-300: #f87171;
    --yz-red-500: #f87171;
    --yz-green-50: rgba(34,197,94,.12);
    --yz-green-600: #4ade80;
}

.yz-auth {
    display: flex;
    justify-content: center;
    padding: 24px 0 40px;
}

.yz-auth-card {
    background: var(--yz-card-bg);
    border: 1px solid var(--yz-gray-200);
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    transition: box-shadow .3s ease;
}

.yz-auth-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
}

.yz-auth-title {
    text-align: center;
    color: var(--yz-gray-800);
    margin: 0 0 30px;
    font-size: 24px;
    font-weight: 700;
}

.yz-auth-group {
    margin-bottom: 24px;
}

.yz-auth-group label {
    display: block;
    color: var(--yz-gray-600);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.yz-auth-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--yz-gray-200);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s ease,background-color .2s ease,box-shadow .2s ease;
    background-color: var(--yz-gray-50);
    color: var(--yz-gray-800);
}

.yz-auth-group input:focus {
    outline: none;
    border-color: var(--yz-indigo-500);
    background-color: var(--yz-input-focus-bg);
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

.yz-auth-group input::placeholder {
    color: var(--yz-gray-400);
}

.yz-auth-group input.error {
    border-color: var(--yz-red-300);
    background-color: var(--yz-red-50);
}

.yz-auth-group input.error:focus {
    border-color: var(--yz-red-500);
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

.yz-auth-code-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.yz-auth-code-group input {
    flex: 1;
    min-width: 0;
    width: auto;
}

.yz-auth-code-btn {
    background-color: var(--yz-indigo-600);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    transition: background-color .2s ease,transform .2s ease,box-shadow .2s ease;
    box-shadow: 0 2px 4px -1px rgba(79,70,229,.2);
}

.yz-auth-code-btn:hover:not(:disabled) {
    background-color: var(--yz-indigo-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(79,70,229,.3);
}

.yz-auth-code-btn:disabled {
    background-color: var(--yz-gray-200);
    color: var(--yz-gray-500);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.yz-auth-submit {
    width: 100%;
    background-color: var(--yz-indigo-600);
    color: #fff;
}

.yz-auth-submit:hover:not(:disabled) {
    background-color: var(--yz-indigo-700);
}

.yz-auth-links {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--yz-gray-500);
}

.yz-auth-links a {
    color: var(--yz-indigo-600);
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
}

.yz-auth-links a:hover {
    color: var(--yz-indigo-700);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.yz-auth-msg {
    padding: 12px 16px;
    margin-bottom: 24px;
    border-radius: 12px;
    display: none;
    font-size: 14px;
    font-weight: 500;
    animation: yzAuthSlideDown .3s ease;
}

.yz-auth-msg.success {
    background: var(--yz-green-50);
    color: var(--yz-green-600);
    border: 1px solid #d1fae5;
}

.yz-auth-msg.error {
    background: var(--yz-red-50);
    color: var(--yz-red-500);
    border: 1px solid var(--yz-red-100);
}

.yz-auth-field-error {
    color: var(--yz-red-500);
    font-size: 12px;
    margin-top: 6px;
    display: none;
    animation: yzAuthSlideDown .2s ease;
}

.yz-auth-field-error.show {
    display: block;
}

.yz-auth-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid hsla(0,0%,100%,.3);
    border-top-color: #fff;
    animation: yzAuthSpin .8s linear infinite;
    margin-right: 8px;
    vertical-align: -4px;
}

.yz-auth-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.yz-captcha-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.yz-captcha-modal.show {
    display: flex;
}

.yz-captcha-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.55);
}

.yz-captcha-modal-box {
    position: relative;
    background: var(--yz-card-bg);
    border: 1px solid var(--yz-gray-200);
    border-radius: 20px;
    box-shadow: 0 20px 40px -8px rgba(0,0,0,.25);
    padding: 32px 26px 26px;
    width: 100%;
    max-width: 360px;
    animation: yzCaptchaModalIn .3s ease;
}

@keyframes yzCaptchaModalIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.yz-captcha-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--yz-gray-100);
    color: var(--yz-gray-500);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease,color .2s ease;
}

.yz-captcha-modal-close:hover {
    background: var(--yz-red-50);
    color: var(--yz-red-500);
}

.yz-captcha-modal-title {
    text-align: center;
    color: var(--yz-gray-800);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.yz-captcha-modal-desc {
    text-align: center;
    color: var(--yz-gray-500);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.yz-auth-logged {
    text-align: center;
    padding: 12px 0 4px;
    color: var(--yz-gray-600);
    font-size: 14px;
    line-height: 2;
}

.yz-auth-logged i {
    display: block;
    font-size: 48px;
    color: var(--yz-green-600);
    margin-bottom: 12px;
}

@keyframes yzAuthSpin {
    to {
        transform: rotate(1turn);
    }
}

@keyframes yzAuthSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width:1023px) {
    .yz-auth {
        padding: 20px 0 36px;
    }

    .yz-auth-card {
        max-width: 460px;
        padding: 36px 32px;
    }
}

@media (max-width:768px) {
    .yz-auth-card {
        padding: 30px 24px;
    }

    .yz-auth-group input {
        font-size: 16px;
    }
}

@media (max-width:640px) {
    .yz-auth {
        padding: 8px 0 28px;
    }

    .yz-auth-card {
        padding: 16px 18px;
        border-radius: 16px;
    }

    .yz-auth-title {
        font-size: 17px;
        margin-bottom: 14px;
    }

    .yz-auth-group {
        margin-bottom: 12px;
    }

    .yz-auth-group label {
        font-size: 13.5px;
        margin-bottom: 6px;
    }

    .yz-auth-group input {
        padding: 9px 13px;
        font-size: 14.5px;
    }

    .yz-auth-code-group {
        gap: 10px;
    }

    .yz-auth-code-btn {
        padding: 9px 14px;
        font-size: 13.5px;
    }

    .yz-auth-links {
        margin-top: 16px;
    }

    .yz-auth-msg {
        padding: 10px 13px;
        font-size: 13px;
        margin-bottom: 16px;
    }

    .yz-auth-field-error {
        font-size: 12.5px;
        margin-top: 5px;
    }

    .yz-captcha-modal {
        padding: 12px;
    }

    .yz-captcha-modal-box {
        padding: 24px 18px 20px;
        border-radius: 16px;
    }

    .yz-captcha-modal-title {
        font-size: 16px;
    }

    .yz-captcha-modal-desc {
        font-size: 12.5px;
        margin-bottom: 14px;
    }
}

@media (max-width:360px) {
    .yz-auth-code-group {
        flex-direction: column;
        align-items: stretch;
    }

    .yz-auth-code-btn {
        width: 100%;
    }
}

@media (max-height:760px) and (min-width:1024px) {
    .yz-auth {
        padding: 12px 0 28px;
    }

    .yz-auth-card {
        padding: 28px 32px;
    }

    .yz-auth-title {
        margin-bottom: 20px;
    }

    .yz-auth-group {
        margin-bottom: 16px;
    }
}

html.dark .yz-auth-card {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.4),0 2px 4px -1px rgba(0,0,0,.3);
}

html.dark .yz-auth-links a {
    color: #a5b4fc;
}

html.dark .yz-auth-links a:hover {
    color: #818cf8;
}

html.dark .yz-auth-msg.success {
    border-color: rgba(34,197,94,.25);
}

.yz-auth-tabs {
    display: flex;
    margin-bottom: 24px;
    background: var(--yz-gray-100);
    padding: 4px;
    border-radius: 12px;
}

.yz-auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--yz-gray-600);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all .3s ease;
}

.yz-auth-tab.active {
    background: var(--yz-card-bg);
    color: var(--yz-indigo-600);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.yz-auth-hidden {
    display: none!important;
}

html.dark .yz-auth-tab.active {
    background: #1c2942;
    color: #a5b4fc;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

@media (max-width:640px) {
    .yz-auth-tabs {
        margin-bottom: 14px;
        padding: 3px;
    }

    .yz-auth-tab {
        padding: 8px 6px;
        font-size: 13.5px;
    }
}

@media (max-height:760px) and (min-width:1024px) {
    .yz-auth-tabs {
        margin-bottom: 18px;
    }
}
