/**
 * 登录页面特有样式
 * 继承 auth-base.css
 */

/* ==================== 登录容器 ==================== */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    width: 420px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

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

/* ==================== 登录标题 ==================== */
.login-title {
    color: #1a1a2e;
    margin-bottom: 35px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* ==================== 登录按钮 ==================== */
.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

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

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

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 24px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* 输入框包装器 */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* 输入框图标 */
.input-icon {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    font-size: 18px;
    z-index: 2;
    transition: color 0.3s ease;
}

.input-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 输入框 */
.form-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    color: #2d3748;
}

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

.form-group input:focus + .input-icon {
    color: #667eea;
}

.form-group input::placeholder {
    color: #a0aec0;
}

/* ==================== 加载动画 ==================== */
.loading {
    display: none;
    margin: 15px 0;
    text-align: center;
}

.spinner {
    border: 3px solid rgba(102, 126, 234, 0.1);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* ==================== 错误消息 ==================== */
.error-message {
    color: #e53e3e;
    margin-top: 20px;
    font-size: 14px;
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.3);
    text-align: left;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ==================== 成功消息 ==================== */
.success-message {
    color: #38a169;
    margin-top: 20px;
    font-size: 14px;
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.3);
    text-align: left;
}

/* ==================== 页脚 ==================== */
.footer {
    margin-top: 15px;
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ==================== 验证码基础样式 ==================== */
.captcha-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-image {
    width: 130px;
    height: 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
    overflow: hidden;
}

.captcha-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* ==================== 安全提示 ==================== */
.security-notice {
    margin-bottom: 20px;
    font-size: 12px;
    color: #718096;
}

/* ==================== 其他登录方式 ==================== */
.other-login-methods {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.login-methods-title {
    display: none;
}

.login-methods-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.login-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-method-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

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

.login-method-icon {
    width: 32px;
    height: 32px;
    fill: #667eea;
    margin-bottom: 8px;
    transition: fill 0.3s ease;
}

.login-method-btn:hover .login-method-icon {
    fill: #764ba2;
}

.login-method-btn span {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

.login-method-btn:hover span {
    color: #667eea;
}

/* ==================== 登录切换 ==================== */
.login-toggle {
    display: flex;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 25px;
}

.login-toggle-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.login-toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-toggle-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* ==================== 登录页面切换 ==================== */
.login-page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.login-page.active {
    display: block;
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 480px) {
    .login-container {
        width: 90%;
        padding: 35px 25px;
    }

    .login-title {
        font-size: 24px;
    }

    .captcha-image {
        width: 100px;
        height: 42px;
    }
}
