/**
 * 用户认证页面样式
 * 适用于登录、注册、找回密码页面
 * 暗色系风格
 */

/* 认证页面容器 */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: #0d0d1a;
}

/* 认证盒子 */
.auth-box {
    width: 480px;
    background: #1a1a2e;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    padding: 28px;
    border: 1px solid #2a2a4a;
}

.auth-box__title {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
    font-style: italic;
}

/* 切换选项卡 */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #252540;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #999;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    background: #2f2f50;
    color: #c9b8d9;
}

.auth-tab.active {
    background: #9c7cb5;
    color: #fff;
}

/* 表单样式 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form__label {
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
}

.auth-form__input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    background: #252540;
    color: #fff;
}

.auth-form__input:focus {
    outline: none;
    border-color: #9c7cb5;
    box-shadow: 0 0 0 3px rgba(156, 124, 181, 0.2);
}

.auth-form__input::placeholder {
    color: #666;
}

/* 手机号输入 */
.auth-form__phone-wrapper {
    display: flex;
    gap: 10px;
}

.auth-form__country-code {
    width: 120px;
    padding: 14px 12px;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    font-size: 14px;
    background: #252540;
    color: #fff;
    cursor: pointer;
}

.auth-form__country-code:focus {
    outline: none;
    border-color: #9c7cb5;
}

.auth-form__country-code option {
    background: #252540;
    color: #fff;
}

.auth-form__input--phone {
    flex: 1;
}

/* 验证码输入 */
.auth-form__code-wrapper {
    display: flex;
    gap: 10px;
}

.auth-form__input--code {
    flex: 1;
}

.auth-form__send-code {
    min-width: 120px;
    padding: 14px 16px;
    background: transparent;
    border: 1px solid #9c7cb5;
    border-radius: 8px;
    color: #9c7cb5;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.auth-form__send-code:hover:not(:disabled) {
    background: #9c7cb5;
    color: #fff;
}

.auth-form__send-code:disabled {
    background: #2a2a4a;
    border-color: #3a3a5a;
    color: #666;
    cursor: not-allowed;
}

/* 提交按钮 */
.auth-form__submit {
    width: 100%;
    padding: 16px;
    background: #9c7cb5;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-form__submit:hover:not(:disabled) {
    background: #b08fc7;
}

.auth-form__submit:disabled {
    background: #5a4a6a;
    cursor: not-allowed;
}

/* 操作链接区域 */
.auth-form__actions {
    text-align: right;
    margin-top: -10px;
}

.auth-form__link {
    color: #9c7cb5;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-form__link:hover {
    color: #b08fc7;
    text-decoration: underline;
}

/* 分隔线 */
.auth-box__divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.auth-box__divider::before,
.auth-box__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #3a3a5a;
}

.auth-box__divider span {
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

/* Google登录区域 */
.auth-box__google {
    margin-bottom: 0;
}

/* Google登录按钮 */
.btn-google {
    width: 100%;
    padding: 14px;
    background: #252540;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #e0e0e0;
}

.btn-google:hover:not(:disabled) {
    background: #2f2f50;
    border-color: #4a4a6a;
}

.btn-google:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-google__icon {
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="%23FFC107" d="M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"/><path fill="%23FF3D00" d="M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"/><path fill="%2300D054" d="M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"/><path fill="%231976D2" d="M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"/></svg>') no-repeat center;
    background-size: contain;
}

/* 页脚链接 */
.auth-box__footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #999;
}

.auth-box__footer a {
    color: #9c7cb5;
    text-decoration: none;
    margin-left: 5px;
    font-weight: 500;
}

.auth-box__footer a:hover {
    color: #b08fc7;
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 560px) {
    .auth-page {
        padding: 20px;
    }

    .auth-box {
        width: 100%;
        padding: 30px 20px;
    }

    .auth-box__title {
        font-size: 24px;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .auth-form__phone-wrapper {
        flex-direction: column;
    }

    .auth-form__country-code {
        width: 100%;
    }

    .auth-form__code-wrapper {
        flex-direction: column;
    }

    .auth-form__send-code {
        width: 100%;
    }
}

/* RTL支持 */
[dir="rtl"] .auth-form__actions {
    text-align: left;
}

[dir="rtl"] .auth-box__footer a {
    margin-left: 0;
    margin-right: 5px;
}
