/**
 * 登录页面专属样式
 */

/* 背景动画效果 */
.login-bg-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 102, 255, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(0, 212, 255, 0.04) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

/* 装饰性几何图形 */
.login-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: decoFloat 15s ease-in-out infinite;
}

.deco-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.deco-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #00D4FF 0%, #0066FF 100%);
    bottom: -50px;
    left: -50px;
    animation-delay: 3s;
}

.deco-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #0066FF 0%, #6B46C1 100%);
    top: 50%;
    right: 10%;
    animation-delay: 6s;
}

@keyframes decoFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.15;
    }
    50% { 
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.2;
    }
}

.deco-dots {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, #0066FF 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    animation: dotsRotate 30s linear infinite;
}

.deco-4 {
    top: 20%;
    left: 15%;
}

.deco-5 {
    bottom: 25%;
    right: 20%;
    animation-direction: reverse;
}

@keyframes dotsRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 输入框只接受数字 - 隐藏箭头 */
input[type="text"][inputmode="numeric"] {
    -moz-appearance: textfield;
}

input[type="text"][inputmode="numeric"]::-webkit-outer-spin-button,
input[type="text"][inputmode="numeric"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Logo 区域样式 */
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.login-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.login-logo-text {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #0A192F 0%, #0066FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 品牌副标题 */
.login-card h2 {
    letter-spacing: 0.05em;
}

.login-card .subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* 表单字段增强 */
.form-field {
    transition: all 0.3s ease;
}

.form-field:focus-within label {
    color: #0066FF;
}

/* 输入框焦点效果增强 */
.input-enhanced {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-enhanced:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}

/* 按钮悬停效果 */
.btn-submit-enhanced {
    position: relative;
    overflow: hidden;
}

.btn-submit-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit-enhanced:hover::before {
    left: 100%;
}

/* 按钮加载状态 */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    top: 50%;
    left: 50%;
    margin-left: -0.625rem;
    margin-top: -0.625rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 登录成功动画 */
.login-success {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* 登录失败动画 */
.login-failed {
    animation: failedShake 0.5s ease;
}

@keyframes failedShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 验证码图片容器 */
.captcha-container {
    position: relative;
    overflow: hidden;
}

.captcha-container img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.captcha-container:hover img {
    transform: scale(1.05);
}

/* 响应式调整 */
@media (max-width: 640px) {
    .login-card {
        padding: 32px 24px !important;
    }
    
    .login-logo-text {
        font-size: 28px;
    }
    
    .login-logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    /* 移动端减少装饰元素大小 */
    .deco-1 {
        width: 200px;
        height: 200px;
    }
    
    .deco-2 {
        width: 150px;
        height: 150px;
    }
    
    .deco-3 {
        width: 100px;
        height: 100px;
    }
    
    .deco-dots {
        width: 60px;
        height: 60px;
        background-size: 15px 15px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 375px) {
    .login-card {
        padding: 24px 20px !important;
    }
    
    .deco-circle {
        opacity: 0.1;
    }
}
