/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #0a192f;
    --primary-blue: #112240;
    --accent-green: #64ffda;
    --accent-gold: #ffd700;
    --accent-light: #ccd6f6;
    --accent-gray: #8892b0;
    --white: #e6f1ff;
    --danger: #ff6b6b;
    --success: #51cf66;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: var(--primary-dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 登录容器 */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* 左侧装饰区 */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2364ffda' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.brand-info {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 40px;
}

.logo i {
    font-size: 36px;
}

.brand-info h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.3;
}

.brand-info p {
    font-size: 1.2rem;
    color: var(--accent-gray);
    margin-bottom: 40px;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 8px;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
}

.feature-item i {
    font-size: 2rem;
    color: var(--accent-green);
}

.feature-item span {
    font-size: 0.9rem;
    color: var(--accent-light);
}

/* 右侧登录区 */
.login-right {
    flex: 1;
    background-color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-content {
    width: 100%;
    max-width: 450px;
}

/* 标签切换 */
.tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.tab {
    padding: 12px 24px;
    background-color: transparent;
    border: none;
    color: var(--accent-gray);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-green);
    transform: scaleX(0);
    transition: var(--transition);
}

.tab.active {
    color: var(--white);
}

.tab.active::after {
    transform: scaleX(1);
}

.tab:hover {
    color: var(--accent-green);
}

/* 登录方式选择 */
.login-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.method-btn {
    flex: 1;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    color: var(--accent-gray);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
}

.method-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.method-btn.active {
    background-color: var(--accent-green);
    color: var(--primary-dark);
    border-color: var(--accent-green);
}

.method-btn i {
    font-size: 16px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--accent-light);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    color: var(--accent-gray);
}

.input-group input {
    width: 100%;
    padding: 12px 45px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    color: var(--white);
    font-size: 14px;
    transition: var(--transition);
    border-radius: 8px;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-green);
    background-color: rgba(100, 255, 218, 0.05);
}

.input-group input::placeholder {
    color: var(--accent-gray);
}

.input-group.verification {
    position: relative;
}

.input-group.verification input {
    padding-right: 130px;
}

.send-code-btn {
    position: absolute;
    right: 5px;
    padding: 6px 12px;
    background-color: var(--accent-green);
    color: var(--primary-dark);
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 5px;
}

.send-code-btn:hover {
    background-color: var(--accent-gold);
}

.send-code-btn:disabled {
    background-color: var(--accent-gray);
    cursor: not-allowed;
}

.input-group.password input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--accent-gray);
    cursor: pointer;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--accent-green);
}

/* 错误信息 */
.error-msg {
    color: var(--danger);
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

/* 复选框 */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--accent-gray);
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

.checkbox-label a {
    color: var(--accent-green);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--accent-green);
    color: var(--primary-dark);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
}

.submit-btn:hover {
    background-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* 二维码登录 */
.qrcode-login {
    display: none;
}

.qrcode-login.active {
    display: block;
}

.qrcode-container {
    text-align: center;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.qrcode-img {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 2px solid var(--accent-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#qrcode, #qrcode-register {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-status {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qrcode-status i {
    font-size: 2rem;
    color: var(--accent-green);
}

.qrcode-status p {
    font-size: 13px;
    color: var(--accent-gray);
}

.qrcode-tip {
    font-size: 14px;
    color: var(--accent-gray);
    margin-bottom: 20px;
}

.refresh-qrcode {
    padding: 8px 20px;
    background-color: transparent;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.refresh-qrcode:hover {
    background-color: var(--accent-green);
    color: var(--primary-dark);
}

/* 第三方登录 */
.third-party-login {
    margin-top: 30px;
}

.divider {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(100, 255, 218, 0.2);
}

.divider span {
    position: relative;
    background-color: var(--primary-blue);
    padding: 0 15px;
    font-size: 13px;
    color: var(--accent-gray);
}

.social-login {
    display: flex;
    gap: 15px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover {
    border-color: var(--accent-green);
    transform: translateY(-2px);
}

.social-btn i {
    font-size: 20px;
}

.social-btn span {
    font-size: 14px;
    color: var(--accent-light);
}

.social-btn.wechat:hover {
    border-color: #07c160;
}

.social-btn.wechat:hover i,
.social-btn.wechat:hover span {
    color: #07c160;
}

.social-btn.alipay:hover {
    border-color: #1677ff;
}

.social-btn.alipay:hover i,
.social-btn.alipay:hover span {
    color: #1677ff;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--primary-blue);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
}

.modal-header h3 {
    font-size: 18px;
    color: var(--accent-light);
}

.close-modal {
    background: none;
    border: none;
    color: var(--accent-gray);
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent-green);
}

.modal-body {
    padding: 20px;
}

/* 授权弹窗 */
.auth-modal .modal-body {
    text-align: center;
}

.auth-icon {
    width: 80px;
    height: 80px;
    margin: 20px auto;
    border-radius: 50%;
    background-color: rgba(100, 255, 218, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-icon i {
    font-size: 40px;
    color: var(--accent-green);
}

.auth-modal h4 {
    font-size: 18px;
    color: var(--accent-light);
    margin-bottom: 10px;
}

.auth-modal p {
    font-size: 14px;
    color: var(--accent-gray);
    margin-bottom: 25px;
}

.auth-actions {
    display: flex;
    gap: 15px;
}

.auth-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
}

.btn-cancel {
    background-color: transparent;
    border: 1px solid rgba(100, 255, 218, 0.2);
    color: var(--accent-gray);
}

.btn-cancel:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.btn-confirm {
    background-color: var(--accent-green);
    color: var(--primary-dark);
}

.btn-confirm:hover {
    background-color: var(--accent-gold);
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: var(--primary-blue);
    border: 1px solid var(--accent-green);
    border-radius: 8px;
    padding: 15px 20px;
    display: none;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    animation: toastSlideIn 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.active {
    display: flex;
}

.toast-icon i {
    font-size: 24px;
    color: var(--success);
}

.toast-content h4 {
    font-size: 16px;
    color: var(--accent-light);
    margin-bottom: 3px;
}

.toast-content p {
    font-size: 13px;
    color: var(--accent-gray);
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
    }

    .login-content {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 20px;
    }

    .features {
        flex-direction: column;
    }

    .social-login {
        flex-direction: column;
    }

    .auth-actions {
        flex-direction: column;
    }
}

/* 表单显隐 */
.login-form,
.register-form {
    display: none;
}

.login-form.active,
.register-form.active {
    display: block;
}

/* 二维码容器样式 */
#qrcode canvas,
#qrcode-register canvas {
    max-width: 100%;
    height: auto;
}

/* 模拟二维码样式 */
#qrcode::before {
    content: '推福APP扫码';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    color: var(--accent-gray);
    background: repeating-linear-gradient(
        0deg,
        var(--accent-gray) 0px,
        var(--accent-gray) 2px,
        transparent 2px,
        transparent 4px
    );
}

#qrcode-register::before {
    content: '推福APP扫码';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    color: var(--accent-gray);
    background: repeating-linear-gradient(
        0deg,
        var(--accent-gray) 0px,
        var(--accent-gray) 2px,
        transparent 2px,
        transparent 4px
    );
}
