/* =========================================================
   健走南充激励赛活动 · 后台登录页（居中卡片式 · 加宽版 · 动效）
   ========================================================= */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.login-v2 {
    background: linear-gradient(135deg, #5b6fd6 0%, #7d4cb5 40%, #8e44ad 70%, #5b6fd6 100%);
    background-size: 300% 300%;
    animation: bgShift 14s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    overflow: hidden;
}

/* 背景柔光浮球 */
body.login-v2::before,
body.login-v2::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

body.login-v2::before {
    width: 440px;
    height: 440px;
    top: -140px;
    left: -120px;
    animation: floatA 16s ease-in-out infinite;
}

body.login-v2::after {
    width: 380px;
    height: 380px;
    bottom: -140px;
    right: -100px;
    animation: floatB 19s ease-in-out infinite;
}

.login-card {
    width: 480px;
    max-width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    padding: 50px 46px 46px;
    position: relative;
    z-index: 1;
    text-align: center;
    animation: cardIn .7s cubic-bezier(.22, .61, .36, 1) both;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 46px;
    right: 46px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 0 4px 4px;
}

.login-avatar {
    width: 84px;
    height: 84px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(118, 75, 162, .38);
    animation: avatarBob 3.4s ease-in-out infinite;
}

.login-avatar i {
    color: #fff;
    font-size: 36px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    letter-spacing: 1px;
    animation: fadeUp .7s ease .15s both;
}

.login-subtitle {
    font-size: 14px;
    color: #999;
    margin: 0 0 34px;
    animation: fadeUp .7s ease .25s both;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    animation: fadeUp .7s ease .35s both;
}

.input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrap:focus-within {
    border-color: #8e44ad;
    box-shadow: 0 0 0 4px rgba(142, 68, 173, .10);
}

.input-wrap.input-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, .12);
    animation: shakeX .4s ease;
}

.input-wrap .input-icon {
    width: 50px;
    text-align: center;
    color: #aaa;
    font-size: 18px;
    transition: color .2s;
}

.input-wrap:focus-within .input-icon {
    color: #8e44ad;
}

.input-wrap .form-control {
    flex: 1;
    border: none;
    background: transparent;
    padding: 16px 16px 16px 0;
    font-size: 15px;
    color: #333;
    outline: none;
    box-shadow: none;
    height: auto;
}

.input-wrap .form-control::placeholder {
    color: #bbb;
}

/* 覆盖浏览器自动填充的默认背景色，保持白色统一 */
.input-wrap .form-control:-webkit-autofill,
.input-wrap .form-control:-webkit-autofill:hover,
.input-wrap .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #333 !important;
}

.captcha-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-wrap .input-wrap {
    flex: 1;
}

.verify-img {
    height: 52px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    background: #fff;
    transition: transform .2s;
}

.verify-img:hover {
    transform: scale(1.04);
}

.btn-login {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 24px rgba(118, 75, 162, .36);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    outline: none;
    animation: fadeUp .7s ease .55s both;
}

.btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(118, 75, 162, .44);
}

.btn-login:hover::after {
    animation: btnShine .7s ease;
}

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

.login-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, .85);
    font-size: 12px;
    line-height: 1.6;
    padding: 0 20px;
    z-index: 1;
}

/* ===== 关键帧 ===== */
@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatA {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 36px); }
}

@keyframes floatB {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, -46px); }
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(26px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes avatarBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes btnShine {
    to { left: 130%; }
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* 尊重系统“减少动态效果”偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
    }
}

@media (max-width: 520px) {
    .login-card {
        padding: 40px 28px 36px;
    }
    .login-title {
        font-size: 21px;
    }
    .login-footer {
        font-size: 11px;
    }
}
