/* 登录注册页面样式 */
.ymx-login-page-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--ymx-btn-left, #667eea) 0%, var(--ymx-btn-right, #764ba2) 100%);
}

.ymx-login-container {
    width: 100%;
    max-width: 420px;
}

.ymx-login-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 标签切换 */
.ymx-login-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.ymx-login-tab {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ymx-login-tab:hover {
    color: #333;
    background: #f9f9f9;
}

.ymx-login-tab.active {
    color: var(--ymx-btn-color, #667eea);
}

.ymx-login-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--ymx-btn-left, #667eea), var(--ymx-btn-right, #764ba2));
    border-radius: 3px 3px 0 0;
}

/* 表单包装器 */
.ymx-login-form-wrapper {
    display: none;
    padding: 30px;
}

.ymx-login-form-wrapper.active {
    display: block;
}

/* 表单样式 */
.ymx-login-form {
    margin: 0;
}

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

.ymx-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.ymx-form-group input[type="text"],
.ymx-form-group input[type="email"],
.ymx-form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

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

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

/* 验证码输入框组 */
.ymx-email-code-group .ymx-email-code-input {
    display: flex;
    gap: 10px;
}

.ymx-email-code-group .ymx-email-code-input input {
    flex: 1;
}

.ymx-send-code-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--ymx-btn-left, #667eea) 0%, var(--ymx-btn-right, #764ba2) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ymx-send-code-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ymx-send-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 表单选项 */
.ymx-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ymx-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.ymx-remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ymx-btn-color, #667eea);
}

.ymx-forgot-password {
    font-size: 14px;
    color: var(--ymx-btn-color, #667eea);
    text-decoration: none;
}

.ymx-forgot-password:hover {
    text-decoration: underline;
}

/* 协议勾选 */
.ymx-form-agreement {
    margin-top: 16px;
    text-align: center;
}

.ymx-form-agreement label {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.ymx-form-agreement input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--ymx-btn-color, #667eea);
    cursor: pointer;
}

.ymx-form-agreement a {
    color: var(--ymx-btn-color, #667eea);
    text-decoration: none;
    font-weight: 500;
}

.ymx-form-agreement a:hover {
    text-decoration: underline;
}

/* 提交按钮 */
.ymx-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--ymx-btn-left, #667eea) 0%, var(--ymx-btn-right, #764ba2) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ymx-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.ymx-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 错误提示 */
.ymx-login-error {
    background: #fee;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #fcc;
}

/* 分隔线 */
.yimen-login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #999;
    font-size: 14px;
}

.yimen-login-divider::before,
.yimen-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.yimen-login-divider span {
    padding: 0 16px;
}

/* 三方登录容器 */
.yimen-login-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 46px;
}

.yimen-login-container .ym-login-host {
    width: 100%;
}

.yimen-login-empty {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    color: #8c92a4;
    font-size: 13px;
    text-align: center;
}

.yimen-login-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(4px);
}

.yimen-login-loading-overlay.show {
    display: flex;
}

.yimen-login-loading-card {
    min-width: 140px;
    padding: 22px 24px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    text-align: center;
}

.yimen-login-loading-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 12px;
    border: 3px solid #eef2ff;
    border-top-color: var(--ymx-btn-color, #667eea);
    border-radius: 50%;
    animation: ymx-login-spin 0.8s linear infinite;
}

.yimen-login-loading-text {
    color: #333;
    font-size: 14px;
}

@keyframes ymx-login-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 模态框样式 */
.yimen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.yimen-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.yimen-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.yimen-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.yimen-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.yimen-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.yimen-modal-close:hover {
    color: #333;
}

.yimen-modal-body {
    padding: 24px;
}

.yimen-modal-body p {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Toast提示 */
.ymx-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ymx-toast.show {
    transform: translateX(-50%) translateY(0);
}

.ymx-toast.success {
    background: #52c41a;
}

.ymx-toast.error {
    background: #ff4d4f;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .ymx-login-page-wrapper {
        padding: 20px 16px;
        min-height: calc(100vh - 100px);
    }

    .ymx-login-form-wrapper {
        padding: 24px 20px;
    }

    .ymx-form-group input[type="text"],
    .ymx-form-group input[type="email"],
    .ymx-form-group input[type="password"] {
        padding: 10px 14px;
    }

    .ymx-submit-btn {
        padding: 12px;
    }

    .ymx-email-code-group .ymx-email-code-input {
        flex-direction: column;
    }

    .ymx-send-code-btn {
        width: 100%;
    }
}
