/* 登录页面样式 - 科技感背景 */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #0a0e27;
    position: relative;
    overflow: hidden;
}

/* 动态渐变背景 */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(24, 144, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(82, 196, 26, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(114, 46, 209, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* 网格背景 */
.login-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(24, 144, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 144, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* 粒子画布 */
.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 发光球体 */
.glow-orbs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(24, 144, 255, 0.6), transparent);
    top: 10%;
    left: 10%;
    animation-duration: 25s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(82, 196, 26, 0.4), transparent);
    bottom: 10%;
    right: 10%;
    animation-duration: 30s;
    animation-delay: -10s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(114, 46, 209, 0.5), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 20s;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 50px) scale(0.9);
    }
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    width: 420px;
    max-width: 90%;
    position: relative;
    z-index: 10;
    animation: slideUp 0.5s ease-out;
    border: 1px solid rgba(24, 144, 255, 0.1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.logo-icon {
    display: inline-block;
    margin-bottom: 16px;
    position: relative;
    animation: pulse 2s infinite ease-in-out;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(24, 144, 255, 0.2), transparent);
    border-radius: 50%;
    animation: ripple 2s infinite ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.login-box h1 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 600;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* 表单样式 */
.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 1;
}

.form-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all 0.3s;
    background-color: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 3px rgba(24, 144, 255, 0.1),
        0 0 20px rgba(24, 144, 255, 0.2),
        inset 0 1px 3px rgba(0, 0, 0, 0.05);
    background: linear-gradient(to bottom, #ffffff, #fafbff);
}

.form-group input:focus+label {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(24, 144, 255, 0.5));
}

/* 验证码组 */
.captcha-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.captcha-input-wrapper {
    flex: 1;
    position: relative;
}

.captcha-input-wrapper input {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.captcha-image-wrapper {
    width: 120px;
    height: 50px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: #f5f5f5;
    flex-shrink: 0;
}

.captcha-image-wrapper img {
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: block;
    object-fit: contain;
    transition: opacity 0.3s;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.captcha-image-wrapper img:hover {
    opacity: 0.85;
}

.captcha-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 2;
}

.captcha-loading.hidden {
    display: none;
}

/* 记住我选项 */
.remember-me-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.remember-me-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-color);
}

.remember-me-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.remember-me-label span {
    transition: color 0.3s;
    white-space: nowrap;
}

.remember-me-label:hover span {
    color: var(--primary-color);
}

.remember-me-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 24px;
    opacity: 0.7;
    line-height: 1.4;
}

/* 错误消息 */
.error-message {
    color: var(--danger-color);
    font-size: 13px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: var(--border-radius);
    display: none;
    animation: shake 0.5s;
}

.error-message.show {
    display: block;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    border: none;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.btn-login:hover:not(:disabled)::before {
    left: 100%;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(24, 144, 255, 0.4),
        0 0 30px rgba(24, 144, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 加载动画 */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 页脚 */
.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 200px) {
    .login-box {
        padding: 24px;
        width: 100%;
        margin: 16px;
    }

    .login-box h1 {
        font-size: 24px;
    }

    .captcha-group {
        flex-direction: column;
    }

    .captcha-image-wrapper {
        width: 100%;
        height: 50px;
    }

    .captcha-input-wrapper input {
        font-size: 16px;
    }
}