/* ============================================
   登录页面CSS - 苹果系统风格
   ============================================ */

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* 登录框固定在画面右侧（骑士插画右边的空地），小屏自动回中 */
    justify-content: flex-end;
    padding: 20px 9vw 20px 20px;
    overflow: hidden;
}

/* 维语 RTL 界面登录框位置与中文完全一致：都靠画面右侧、右边距 9vw（rtl 下 flex-start 即右侧） */
html[dir="rtl"] .login-page {
    justify-content: flex-start;
    padding: 20px 9vw 20px 20px;
}

/* 小屏幕：右侧空间不足，登录框回中 */
@media (max-width: 900px) {
    .login-page {
        justify-content: center;
        padding: 20px;
    }
    html[dir="rtl"] .login-page {
        justify-content: center;
        padding: 20px;
    }
}

.login-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0,113,227,0.38) 0%, rgba(94,92,230,0.26) 50%, rgba(255,149,0,0.22) 100%),
        url('/public/img/0102.jpeg') center/cover no-repeat;
    z-index: 0;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    /* 切换语言重载页面时登录框固定不动，无浮入动画 */
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

html[dir="rtl"] .login-card {
    text-align: right;
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

html[dir="rtl"] .login-logo {
    text-align: center;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: logoBounce 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes logoBounce {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: #6e6e73;
    margin: 0;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-label {
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
    display: block;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #86868b;
    left: 14px;
    z-index: 1;
}

html[dir="rtl"] .input-icon {
    left: auto;
    right: 14px;
}

.input-with-icon {
    padding-left: 44px;
    padding-right: 44px;
}

html[dir="rtl"] .input-with-icon {
    padding-left: 44px;
    padding-right: 44px;
}

.input-icon-wrapper .form-control {
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    height: 48px;
    font-size: 15px;
    transition: all 0.25s ease;
}

.input-icon-wrapper .form-control:hover {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.15);
}

.input-icon-wrapper .form-control:focus {
    background: #fff;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86868b;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 1;
}

html[dir="rtl"] .password-toggle {
    right: auto;
    left: 12px;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.login-lang {
    background: rgba(255, 255, 255, 0.6);
}

.login-btn {
    height: 50px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #0071e3, #0077ed);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.3);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(0, 113, 227, 0.4);
    background: linear-gradient(135deg, #0077ed, #0080f0);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media screen and (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-logo-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
        border-radius: 16px;
    }

    .login-logo {
        margin-bottom: 28px;
    }

    .input-icon-wrapper .form-control {
        height: 46px;
    }

    .login-btn {
        height: 48px;
    }
}
