/* 登录页面专用样式 */

/* 页面基础设置 */
html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

/* Footer固定在底部 */
.footer-custom {
    margin-top: auto !important;
    flex-shrink: 0;
}

/* 登录容器 */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
    min-height: 0;
}

/* 背景装饰 */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    right: -100px;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* 登录表单容器 */
.login-form-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
}

/* PC端右上角定位 */
@media (min-width: 768px) {
    .login-container {
        justify-content: flex-end;
        align-items: flex-start;
        padding: 12vh 14vw 2vh 2vw;
    }
    
    .login-form-container {
        max-width: 400px;
        width: 400px;
    }
}

/* 登录卡片 */
.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    animation: slideUp 0.8s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

/* 登录/注册标题 */
.login-register-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 8px;
}

/* 登录/注册描述 */
.login-register-desc {
    font-size: 14px;
    color: #6c757d;
    text-align: left;
    margin-bottom: 24px;
    line-height: 1.4;
}

/* 密码登录选项 */
.password-login-option {
    text-align: right;
    margin-bottom: 16px;
}

.password-login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.password-login-link:hover {
    color: #e55a00;
    text-decoration: underline;
}

/* 验证码步骤标题和描述 */
.verify-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 8px;
}

.verify-desc {
    font-size: 14px;
    color: #6c757d;
    text-align: left;
    margin-bottom: 24px;
    line-height: 1.4;
}

/* 密码登录标题 */
.password-login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 24px;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.login-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* 登录方式切换标签 */
.login-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
    position: relative;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.tab-button.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 登录表单 */
.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

/* 登录步骤 */
.login-step {
    display: none;
}

.login-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* 验证码输入组 */
.verify-input-group {
    position: relative;
}

/* 验证码输入框 */
.verify-code-input {
    padding-right: 100px !important;
}

/* 获取验证码文字 */
.get-code-text {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
    white-space: nowrap;
    z-index: 10;
}

.get-code-text:hover {
    color: #e55a00;
}

.get-code-text.disabled {
    color: #6c757d;
    cursor: not-allowed;
}

.get-code-text.disabled:hover {
    color: #6c757d;
}

.phone-display {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-secondary);
    background: white;
    padding: 0 8px;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 密码输入组 */
.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* 表单选项 */
.form-options {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #e55a00;
    text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.login-btn:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 105, 0, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

/* 返回按钮 */
.back-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #e55a00;
    text-decoration: underline;
}

/* 其他登录选项 */
.other-options {
    margin: 30px 0 20px;
}

.divider {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.divider span {
    background: white;
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* 社交登录 */
.social-login {
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #07c160;
    border-radius: 12px;
    background: white;
    color: #07c160;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.wechat-btn {
    border-color: #07c160;
    color: #07c160;
}

.wechat-btn:hover {
    background: #07c160;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.social-btn i {
    font-size: 18px;
    flex-shrink: 0;
}

.social-btn span {
    white-space: nowrap;
}

/* 注册链接 */
.register-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.register-link a:hover {
    color: #e55a00;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 767px) {
    .login-container {
        padding: 15px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .login-card {
        padding: 30px 20px;
        border-radius: 16px;
        margin: 0;
    }

    .login-title {
        font-size: 20px;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 16px;
    }

    .login-btn {
        padding: 14px;
        font-size: 16px;
    }

    .phone-display {
        display: none;
    }

    .verify-input-group::after {
        content: attr(data-phone);
        position: absolute;
        bottom: -20px;
        left: 0;
        font-size: 12px;
        color: var(--text-secondary);
    }

    .shape-1, .shape-2 {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 15px;
    }

    .tab-button {
        padding: 10px 12px;
        font-size: 13px;
    }

    .social-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 100px;
        gap: 6px;
    }
    
    .social-btn i {
        font-size: 16px;
    }
}

/* 动画增强 */
.login-btn {
    position: relative;
    overflow: hidden;
}

.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;
}

.login-btn:hover::before {
    left: 100%;
}

/* 加载状态 */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
