/* 弹窗与登录组件 */

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    border: 1px solid #e1e8f0;
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 当模态框显示时，确保模态内容可见 */
.modal[style*="display: flex"] .modal-content,
.modal[style*="display:flex"] .modal-content,
.modal.shown .modal-content {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.modal h2 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

.tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f4f8;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-weight: 600;
    color: #95a5a6;
    transition: all 0.3s;
}

.tab:hover {
    color: #3a7bd5;
}

.tab.active {
    color: #3a7bd5;
    border-bottom: 3px solid #3a7bd5;
}

.tab-content {
    margin-top: 20px;
}

.hidden {
    display: none;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: #445366;
}

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

.recharge-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.recharge-option {
    text-align: center;
    padding: 25px;
    border-radius: 12px;
    background-color: #f9fafc;
    transition: all 0.3s;
    cursor: pointer;
}

.recharge-option:hover {
    background-color: #f0f4f8;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.recharge-option i {
    font-size: 35px;
    color: #3a7bd5;
    margin-bottom: 15px;
}

.help-content {
    text-align: center;
    padding: 10px;
}

/* 微信二维码容器 */
.wechat-qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0 15px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 100%);
    border-radius: 16px;
    border: 2px solid #e1e8ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 微信二维码图片 */
.wechat-qr-image {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.wechat-qr-image:hover {
    transform: scale(1.05);
}

/* 紧凑型微信联系信息 */
.wechat-contact-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    padding: 12px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.wechat-contact-compact i {
    font-size: 24px;
    color: #4fc08d;
}

.wechat-contact-compact .wechat-id {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    background-color: transparent;
    padding: 0;
}

/* 原有的微信联系样式保留，用于其他地方 */
.wechat-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 20px;
    background-color: #f0f4f8;
    border-radius: 12px;
}

.wechat-contact i {
    font-size: 45px;
    color: #4fc08d;
}

.wechat-id {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: #ecf0f1;
}

/* 帮助提示文字 */
.help-tip {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* 联系方式弹窗中的二维码区域 */
.contact-qr-section {
    margin: 20px 0;
    text-align: center;
}

.contact-qr-section .wechat-qr-container {
    margin: 15px auto;
    max-width: 280px;
}

.contact-qr-section .wechat-qr-image {
    width: 200px;
    height: 200px;
}

.contact-qr-section .wechat-contact-compact {
    margin: 15px auto;
    max-width: 250px;
}

/* 选择功能卡片动画效果 */
@keyframes selectCard {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(-4px);
    }
}

.feature-card.active {
    animation: selectCard 0.5s ease-out forwards;
    border: 3px solid;
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

#rewrite-card.active {
    border-color: #3a7bd5;
    background: linear-gradient(to bottom, #ffffff, #f0f7ff);
}

#rewrite-card.active .feature-icon {
    background: linear-gradient(135deg, rgba(58, 123, 213, 0.2) 0%, rgba(0, 210, 255, 0.2) 100%);
    transform: scale(1.08);
    box-shadow: 0 6px 12px rgba(58, 123, 213, 0.2);
}

#rewrite-card.active .feature-title {
    color: #3a7bd5;
}

#rewrite-card.active .feature-price {
    background-color: #ebf5ff;
    color: #3a7bd5;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.15);
}

#deai-card.active {
    border-color: #6d5dc6;
    background: linear-gradient(to bottom, #ffffff, #f5f3ff);
}

#deai-card.active .feature-icon {
    background: linear-gradient(135deg, rgba(109, 93, 198, 0.2) 0%, rgba(179, 108, 234, 0.2) 100%);
    transform: scale(1.08);
    box-shadow: 0 6px 12px rgba(109, 93, 198, 0.2);
}

#deai-card.active .feature-title {
    color: #6d5dc6;
}

#deai-card.active .feature-price {
    background-color: #f3efff;
    color: #6d5dc6;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(109, 93, 198, 0.15);
}

#rewrite-deai-card.active {
    border-color: #ff5757;
    background: linear-gradient(to bottom, #ffffff, #fff5f5);
}

#rewrite-deai-card.active .feature-icon {
    background: linear-gradient(135deg, rgba(255, 141, 141, 0.2) 0%, rgba(255, 87, 87, 0.2) 100%);
    transform: scale(1.08);
    box-shadow: 0 6px 12px rgba(255, 87, 87, 0.2);
}

#rewrite-deai-card.active .feature-title {
    color: #ff5757;
}

#rewrite-deai-card.active .feature-price {
    background-color: #ffeaea;
    color: #ff5757;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 87, 87, 0.15);
}

/* 添加选中标记 */
.feature-card.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ffffff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#rewrite-card.active::after {
    color: #3a7bd5;
    border: 2px solid #3a7bd5;
}

#deai-card.active::after {
    color: #6d5dc6;
    border: 2px solid #6d5dc6;
}

#rewrite-deai-card.active::after {
    color: #ff5757;
    border: 2px solid #ff5757;
}

/* 认证链接样式 */
.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 14px;
}

.auth-links a {
    color: #3a7bd5;
    transition: all 0.3s;
}

.auth-links a:hover {
    color: #185a9d;
    text-decoration: underline;
}

/* 微信登录样式 */
.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    text-align: center;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e1e8ed, transparent);
}

.login-divider span {
    padding: 0 15px;
    color: #68778c;
    font-size: 14px;
    background-color: white;
}

.btn-wechat {
    background: linear-gradient(135deg, #07C160 0%, #05A04C 100%);
    color: white;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-wechat:hover {
    background: linear-gradient(135deg, #05A04C 0%, #048B42 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7, 193, 96, 0.3);
}

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

.btn-wechat i {
    font-size: 18px;
    margin-right: 8px;
}

.btn-wechat:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 微信登录模态框样式 */
#wechat-login-modal .modal-content {
    max-width: 450px;
    text-align: center;
    padding: 30px;
}

#wechat-login-modal h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
}

/* 邀请码输入区域样式 */
.invite-code-section {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.invite-code-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.invite-code-section input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.invite-code-section input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.invite-code-section input::placeholder {
    color: #999;
}

#invite-code-status {
    margin-top: 5px;
    font-size: 12px;
    min-height: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 邀请码确认对话框样式 */
#invite-confirm-modal .modal-content,
#invite-ineligible-modal .modal-content {
    max-width: 400px;
    text-align: center;
    padding: 30px;
}

#invite-confirm-modal h3,
#invite-ineligible-modal h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#invite-confirm-modal p,
#invite-ineligible-modal p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

#invite-confirm-modal .btn,
#invite-ineligible-modal .btn {
    margin: 0 5px;
    min-width: 80px;
}

#wechat-login-modal h2 i {
    color: #07C160;
    margin-right: 10px;
}

.wechat-qr-container {
    margin: 20px 0;
}

#wechat-qrcode {
    margin: 20px auto;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.wechat-login-tips {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: left;
}

.wechat-login-tips h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.wechat-login-tips ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #666;
}

.wechat-login-tips li {
    margin-bottom: 5px;
}

/* 微信登录按钮动效 */
@keyframes wechat-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(7, 193, 96, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(7, 193, 96, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(7, 193, 96, 0);
    }
}

.btn-wechat:focus {
    animation: wechat-pulse var(--motion-pulse) var(--motion-ease) 2;
}

/* 登录框微信区域样式 */
.wechat-login-section {
    text-align: center;
    padding: 20px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.wechat-login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.wechat-login-header i {
    color: #07C160;
    font-size: 24px;
}

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

.wechat-qr-wrapper {
    margin: 20px 0;
}

.login-qrcode-container {
    display: inline-block;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    min-width: 200px;
    min-height: 200px;
    position: relative;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
}

.qr-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #07C160;
}

.qr-loading p {
    margin: 0;
    font-size: 14px;
}

.qr-hint {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.new-user-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    border: 1px solid #ffb3b3;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    color: #d63031;
    font-weight: 600;
    font-size: 14px;
}

.new-user-reward i {
    color: #e17055;
    font-size: 16px;
}

.login-method-divider {
    display: flex;
    align-items: center;
    margin: 25px 0 15px 0;
    text-align: center;
}

.login-method-divider::before,
.login-method-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
}

.login-method-divider span {
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    background-color: white;
    font-weight: 500;
}

/* 折叠式传统登录样式 */
.traditional-login-wrapper {
    margin-top: 20px;
}

.traditional-login-toggle {
    width: 100%;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.traditional-login-toggle:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #343a40;
}

.traditional-login-toggle .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.traditional-login-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.traditional-login-form-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.traditional-login-form-wrapper.expanded {
    max-height: 400px;
}

.traditional-login-form {
    padding-top: 10px;
}
