/* 登录页面专用样式 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4f46e5;
    margin-bottom: 0.5rem;
    display: block;
}

.login-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1f2937;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #9ca3af;
}

.password-toggle {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle-btn:hover {
    color: #4f46e5;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
}

.remember-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
}

.forgot-link {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #3730a3;
}

.login-btn {
    width: 100%;
    background: #4f46e5;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: #3730a3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

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

.login-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff30;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-left: 4px solid #dc2626;
    display: none;
}

.success-message {
    background: #dcfce7;
    color: #16a34a;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-left: 4px solid #16a34a;
    display: none;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.back-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #4f46e5;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }

    .login-logo {
        font-size: 2rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .login-container {
        background: rgba(31, 41, 55, 0.95);
        color: #f9fafb;
    }

    .login-subtitle,
    .form-label {
        color: #d1d5db;
    }

    .form-input {
        background: rgba(55, 65, 81, 0.8);
        border-color: #4b5563;
        color: #f9fafb;
    }

    .form-input::placeholder {
        color: #6b7280;
    }

    .remember-me {
        color: #d1d5db;
    }

    .back-link {
        color: #9ca3af;
    }

    .error-message {
        background: rgba(220, 38, 38, 0.1);
        color: #fca5a5;
    }

    .success-message {
        background: rgba(22, 163, 74, 0.1);
        color: #86efac;
    }
}

/* 验证码样式 */
.captcha-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.captcha-input {
    flex: 1;
    min-width: 0;
}

.captcha-image {
    height: 44px;
    width: auto;
    min-width: 100px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    padding: 4px;
}

.captcha-image:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

/* 暗色主题下的验证码样式 */
@media (prefers-color-scheme: dark) {
    .captcha-image {
        background: rgba(55, 65, 81, 0.8);
        border-color: #4b5563;
    }

    .captcha-image:hover {
        border-color: #667eea;
        background: rgba(75, 85, 99, 0.8);
    }
}

/* 移动端优化 */
@media (max-width: 480px) {
    .captcha-container {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .captcha-image {
        height: 40px;
        align-self: center;
        max-width: 120px;
    }
}