body {
    background: linear-gradient(135deg, #cfe2ff 0%, #e0f2fe 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

.login-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    width: 80%;
    max-width: 450px;
    text-align: center;
    transition: top 0.8s cubic-bezier(0.4,0,0.2,1);
    z-index: 2;
    animation: slideDown 1s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-container:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.system-logo {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: rgba(13, 110, 253, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.system-logo i {
    color: rgba(52, 152, 219, 0.8);
    margin-right: 15px;
    font-size: 2.5rem;
    transition: color 0.3s ease;
}

.login-container:hover .system-logo i {
    color: rgba(41, 128, 185, 0.8);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(13, 110, 253, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.password-toggle:hover {
    color: rgba(13, 110, 253, 0.9);
    background: rgba(13, 110, 253, 0.08);
    transform: translateY(-50%) scale(1.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle i {
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-toggle:hover i {
    transform: scale(1.1);
}

.form-control {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 15px;
    padding: 15px 20px;
    color: rgba(13, 110, 253, 0.6);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.form-control::placeholder {
    color: rgba(13, 110, 253, 0.6);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    outline: none;
    color: rgba(13, 110, 253, 0.6);
}

.btn-login {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.8) 0%, rgba(52, 152, 219, 0.8) 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
    width: 100%;
    font-size: 1rem;
}

.btn-login:hover {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.8) 0%, rgba(13, 110, 253, 0.8) 100%);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.5);
    transform: translateY(-3px);
}

.forgot-password {
    display: block;
    margin-top: 20px;
    color: rgba(13, 110, 253, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.8rem;
}

.forgot-password:hover {
    color: rgba(13, 110, 253, 0.8);
}

.collision-char {
    position: relative;
    display: inline-block;
    animation: scaleAndFade 4s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes scaleAndFade {
    0% {
        transform: scale(0.92);
        opacity: 0.8;
        color: rgba(13, 110, 253, 1);
    }
    100% {
        transform: scale(1.08);
        opacity: 0.6;
        color: rgba(13, 110, 253, 1);
    }
}

/* 优化雪花动画 */
.snowflake {
    position: absolute;
    background-color: white;
    pointer-events: none;
    border-radius: 50%;
    z-index: 1;
    animation: snowfall linear infinite;
    opacity: 0;
    animation-fill-mode: forwards;
    animation-delay: calc(var(--delay) * 1s);
    will-change: transform, opacity;
}

@keyframes snowfall {
    0% {
        top: -10px;
        transform: translateX(0);
        opacity: 0;
    }
    10% {
        opacity: var(--opacity);
    }
    50% {
        transform: translateX(calc(var(--drift) * 1px));
    }
    100% {
        top: 100vh;
        transform: translateX(0);
        opacity: var(--opacity);
    }
}

.form-group:focus-within .password-toggle {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* 隐藏浏览器自带的密码可见按钮 */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-input-password-toggle-button,
input[type="password"]::-webkit-input-clear-button,
input[type="password"]::-webkit-input-password-reveal-button {
    display: none;
}
input[type="password"]::-webkit-input-password-toggle {
    display: none;
}
input[type="password"]::-webkit-input-clear-button {
    display: none;
}
input[type="password"]::-webkit-input-password-reveal-button {
    display: none;
}
input[type="password"]::-o-clear {
    display: none;
}
input[type="password"]::-o-reveal {
    display: none;
}
input[type="password"]::-moz-clear {
    display: none;
}
input[type="password"]::-moz-reveal {
    display: none;
}

#toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 80vw;
    background: linear-gradient(90deg, #fca5a5 0%, #f87171 100%);
    color: #fff;
    font-size: 1rem;
    padding: 16px 32px;
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(220, 38, 38, 0.18);
    text-align: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: top 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    font-family: 'Poppins', 'Dancing Script', cursive, sans-serif;
    letter-spacing: 1px;
}
#toast.show {
    top: 32px;
    opacity: 1;
    pointer-events: auto;
}

/* 验证码弹窗样式 */
#captcha-container {
    position: fixed;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    transition: top 0.5s cubic-bezier(0.4,0,0.2,1);
    opacity: 0;
    pointer-events: none;
}
#captcha-container.show {
    top: 80px;
    opacity: 1;
    pointer-events: auto;
}
.captcha-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(31, 41, 55, 0.18);
    padding: 32px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 320px;
}
.captcha-img {
    width: 220px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px #e0e7ef;
}
.captcha-input {
    width: 180px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    margin-bottom: 16px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}
.captcha-input:focus {
    border-color: #2563eb;
}
.captcha-btn {
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 32px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.captcha-btn:hover {
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

/* 登录弹窗滑出动画 */
.login-container.hide {
    top: -600px;
    pointer-events: none;
    position: relative;
}
.login-container.show {
    top: 0;
    pointer-events: auto;
    animation: slideDown 0.8s ease-out;
}

#draw-verify-container {
    position: fixed;
    top: -100vh;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.8s cubic-bezier(0.4,0,0.2,1), opacity 0.8s cubic-bezier(0.4,0,0.2,1);
    opacity: 0;
}
#draw-verify-container.show {
    top: 0;
    opacity: 1;
}
.draw-verify-modal {
    background: rgba(240, 249, 255, 0.9);
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 41, 55, 0.18);
    padding: 32px 28px 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 420px;
    position: relative;
}
#backBtn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}
#backBtn:hover {
    color: #60a5fa;
}
#canvas {
    border: 1.5px solid #2563eb;
    border-radius: 8px;
    margin-bottom: 18px;
    background: #f4f8ff;
}
#drawVerifyBtn {
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 32px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 12px;
}
#drawVerifyBtn:hover {
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}
#drawVerifyResult {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 80vw;
    background: linear-gradient(90deg, #fca5a5 0%, #f87171 100%);
    color: #fff;
    font-size: 1rem;
    padding: 16px 32px;
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(220, 38, 38, 0.18);
    text-align: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: top 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    font-family: 'Poppins', 'Dancing Script', cursive, sans-serif;
    letter-spacing: 1px;
}
#drawVerifyResult.show {
    top: 32px;
    opacity: 1;
    pointer-events: auto;
}

/* 错误提示弹窗样式 */
#error-toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 80vw;
    background: linear-gradient(90deg, #fca5a5 0%, #f87171 100%);
    color: #fff;
    font-size: 1rem;
    padding: 16px 32px;
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(220, 38, 38, 0.18);
    text-align: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: top 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    font-family: 'Poppins', 'Dancing Script', cursive, sans-serif;
    letter-spacing: 1px;
}

#error-toast.show {
    top: 32px;
    opacity: 1;
    pointer-events: auto;
}
