/* /assets/css/admin-login.css - 统一管理员登录页面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 背景设计 - 使用更柔和的颜色 */
.login-background {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 动态背景效果 */
.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 140, 200, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(120, 200, 180, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(180, 120, 200, 0.1) 0%, transparent 50%);
    animation: bgAnimation 20s ease infinite;
}

@keyframes bgAnimation {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(1deg); }
    66% { transform: translate(20px, -10px) rotate(-1deg); }
}

/* 登录容器 */
.login-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

/* 登录表单 */
.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-form:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.06);
}

/* 表单组 */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #adb5bd;
}

/* 记住我复选框 */
.form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #6c757d;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
}

.form-checkbox label {
    cursor: pointer;
    user-select: none;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn::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 ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 底部链接 */
.footer-links {
    text-align: center;
    margin-top: 2rem;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* 警告和提示 */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #ffe5e5;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: #323232;
    color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-form {
        padding: 2rem;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
    
    .footer-links a {
        display: block;
        margin: 0.5rem 0;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        color: #e1e8ed;
    }
    
    .login-background {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .login-form {
        background: rgba(30, 30, 45, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .form-input {
        background: #1a1a2e;
        color: #e1e8ed;
        border-color: #2c3e50;
    }
    
    .form-input:focus {
        background: #16213e;
        border-color: #667eea;
    }
    
    .form-label {
        color: #bdc3c7;
    }
    
    .login-header p {
        color: #95a5a6;
    }
}

/* 特殊效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 输入框验证状态 */
.form-input.is-valid {
    border-color: #28a745;
}

.form-input.is-invalid {
    border-color: #dc3545;
}

.validation-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: #28a745;
}

.invalid-feedback {
    color: #dc3545;
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background: #dc3545;
    width: 33%;
}

.password-strength.medium {
    background: #ffc107;
    width: 66%;
}

.password-strength.strong {
    background: #28a745;
    width: 100%;
}

/* 浏览器自动填充样式 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #f8f9fa inset;
    -webkit-text-fill-color: #333;
    transition: background-color 5000s ease-in-out 0s;
}

/* 动画延迟类 */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}