/**
 * 登录页面样式 - 现代化设计
 * 与注册页面保持统一的设计风格
 */

/* ========== 登录主容器样式 ========== */
.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* ========== 登录卡片样式 ========== */
.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 顶部流动渐变装饰条 */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1890ff 0%, #52c41a 50%, #faad14 100%);
    background-size: 200% 100%;
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========== 卡片头部 ========== */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #1890ff 0%, #52c41a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header h1 i {
    background: linear-gradient(135deg, #1890ff 0%, #52c41a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 8px;
}

.login-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* ========== 表单组样式 ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

/* ========== 输入框组样式 ========== */
.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: color 0.3s ease;
    z-index: 1;
}

.input-group input {
    padding-left: 40px;
}

.input-group input:focus + i,
.input-group:focus-within i {
    color: #1890ff;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

/* ========== 错误提示样式 ========== */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

.error-message i {
    margin-right: 6px;
}

/* ========== 记住登录 ========== */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me input {
    margin-right: 8px;
    cursor: pointer;
}

.remember-me label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

/* ========== 验证码样式 ========== */
.captcha-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-input {
    flex: 1;
}

.captcha-img {
    height: 46px;
    cursor: pointer;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.captcha-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.captcha-img:hover {
    border-color: #40a9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.25);
}

.captcha-img:hover::before {
    left: 100%;
}

.captcha-img:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.2);
}

/* ========== 提示文本 ========== */
.text-muted {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.3);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i {
    margin-right: 6px;
}

/* ========== 底部链接 ========== */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.login-footer a {
    color: #1890ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #40a9ff;
    text-decoration: underline;
}

/* ========== 响应式设计 ========== */
@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .captcha-group {
        flex-direction: column;
    }
    
    .captcha-img {
        width: 100%;
        height: 60px;
    }
}
