/* 弹窗遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

/* 登录弹窗 */
.login-modal {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 900px;
    position: relative;
    overflow: hidden;
}

.login-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: 24px;
    z-index: 10;
    transition: color 0.2s;
}

.login-modal .close-btn:hover {
    color: #334155;
}

.login-header {
    text-align: center;
    padding: 40px 40px 30px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo {
    width: 80px;
    height: 80px;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 10px;
}

.login-content {
    display: flex;
    padding: 0 40px 40px;
    gap: 40px;
}

.login-left {
    flex: 1;
}

.login-right {
    width: 280px;
    border-left: 1px solid var(--border-color);
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tab-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 16px;
    color: #64748B;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    font-family: inherit;
}

.tab.active {
    color: #0F172A;
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--trace-active);
}

.form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    background: var(--input-bg);
    color: #0F172A;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--trace-active);
}

.form-input::placeholder {
    color: #94A3B8;
}

/* password-toggle 样式已移至 settings-feedback.css */

.verification-wrapper {
    display: flex;
    gap: 12px;
}

.verification-wrapper .form-input {
    flex: 1;
}

.get-code-btn {
    padding: 14px 20px;
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--trace-active);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.get-code-btn:hover {
    background: #E2E8F0;
}

.get-code-btn:disabled {
    background: var(--button-disabled);
    color: #94A3B8;
    cursor: not-allowed;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--trace-active) 0%, #4DB6AC 100%);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 10px;
    font-family: inherit;
}

.login-btn:hover {
    opacity: 0.9;
}

.login-btn:disabled {
    background: var(--button-disabled);
    cursor: not-allowed;
    opacity: 1;
}

.form-panel {
    display: none;
}

.form-panel.active {
    display: block;
}

.agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 30px;
    font-size: 12px;
    color: #64748B;
    line-height: 1.6;
    padding: 0 40px 30px;
}

.agreement input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* 忘记密码链接 */
.forgot-password-wrapper {
    text-align: right;
    margin-bottom: 10px;
}

.forgot-password-link {
    color: var(--trace-active);
    font-size: 13px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.forgot-password-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 重置密码弹窗 */
.reset-password-modal {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
}

.reset-password-header {
    text-align: center;
    padding: 40px 40px 30px;
}

.reset-password-title {
    font-size: 24px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 8px;
}

.reset-password-subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

.reset-password-content {
    padding: 0 40px 40px;
}

.password-hint {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 6px;
}

.back-to-login {
    text-align: center;
    margin-top: 16px;
}

.back-to-login a {
    color: var(--trace-active);
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.back-to-login a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 个人中心弹窗 */
.user-menu-popup {
    position: fixed;
    bottom: 90px;
    left: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 99999;
    overflow: hidden;
    pointer-events: auto;
}

.user-menu-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #F1F5F9;
    pointer-events: auto;
}

.user-menu-item:last-child {
    border-bottom: none;
}

.user-menu-item:hover {
    background-color: #F8FAFC;
}

.user-menu-item-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* 确认对话框 */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
}

.confirm-dialog-overlay.show {
    display: flex;
}

.confirm-dialog {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

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

.confirm-dialog-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.confirm-dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.confirm-dialog-content {
    padding: 24px;
}

.confirm-dialog-message {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
}

.confirm-dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #FAFBFC;
}

.confirm-dialog-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.confirm-dialog-btn-cancel {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.confirm-dialog-btn-cancel:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.confirm-dialog-btn-confirm {
    background: linear-gradient(135deg, var(--trace-active) 0%, #4DB6AC 100%);
    color: #fff;
}

.confirm-dialog-btn-confirm:hover {
    background: linear-gradient(135deg, #4DB6AC 0%, var(--trace-active) 100%);
    box-shadow: 0 4px 12px rgba(109, 213, 232, 0.3);
}

/* 语言选择器 */
.language-selector {
    position: fixed;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 100000;
    overflow: hidden;
    pointer-events: auto;
}

.language-selector.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.language-option {
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #F1F5F9;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #F8FAFC;
}

.language-option.selected {
    background-color: #F8FAFC;
}

.language-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.language-check {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--trace-active);
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.language-option.selected .language-check {
    opacity: 1;
}

/* 手机号绑定弹窗 */
.phone-bind-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.phone-bind-modal.show {
    display: flex;
}

.phone-bind-content {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.phone-bind-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--border-color);
}

.phone-bind-title {
    font-size: 20px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 8px;
}

.phone-bind-subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

.phone-bind-body {
    padding: 30px;
}

.phone-bind-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: 24px;
    z-index: 10;
    transition: color 0.2s;
}

.phone-bind-close:hover {
    color: #334155;
}

/* 模拟扫码按钮样式 */
.demo-scan-btn {
    width: 100%;
    padding: 10px 16px;
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #64748B;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.demo-scan-btn:hover {
    background: #E2E8F0;
    color: var(--trace-active);
    border-color: var(--trace-active);
}

/* 第三方账号绑定样式 */
.third-party-bind-container {
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.third-party-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.third-party-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.third-party-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.third-party-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.third-party-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.third-party-status {
    font-size: 13px;
    color: #94A3B8;
}

.third-party-status.bound {
    color: #64748B;
}

.third-party-action-btn {
    padding: 6px 16px;
    border: 1px solid var(--trace-active);
    border-radius: 6px;
    background: transparent;
    color: var(--trace-active);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.third-party-action-btn:hover {
    background: var(--trace-active);
    color: #fff;
}

.third-party-action-btn.unbind {
    color: #EF4444;
    border-color: #EF4444;
}

.third-party-action-btn.unbind:hover {
    background: #EF4444;
    color: #fff;
}

/* 微信扫码绑定弹窗 */
.wechat-bind-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
}

.wechat-bind-modal.show {
    display: flex;
}

.wechat-bind-content {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.wechat-bind-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--border-color);
}

.wechat-bind-title {
    font-size: 20px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 8px;
}

.wechat-bind-subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

.wechat-bind-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wechat-qr-code {
    width: 200px;
    height: 200px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wechat-qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wechat-bind-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: 24px;
    z-index: 10;
    transition: color 0.2s;
}

.wechat-bind-close:hover {
    color: #334155;
}

.demo-bind-btn {
    width: 100%;
    padding: 10px 16px;
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #64748B;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: 12px;
}

.demo-bind-btn:hover {
    background: #E2E8F0;
    color: var(--trace-active);
    border-color: var(--trace-active);
}

/* 响应式 */
@media (max-width: 768px) {
    .login-content {
        flex-direction: column;
        padding: 0 20px 30px;
    }

    .login-right {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 30px;
    }

    .login-header {
        padding: 30px 20px 20px;
    }

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

