/* 弹窗与登录组件 */

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px 16px 32px;
    box-sizing: border-box;
    background-color: rgba(20, 22, 35, 0.42);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
    transition: opacity var(--motion-base) var(--motion-ease);
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: var(--gradient-surface);
    border: 1px solid var(--color-border);
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - 56px);
    margin: 0 auto;
    padding: 28px;
    border-radius: var(--radius-panel-lg);
    box-shadow: var(--elevation-base);
    position: relative;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(12px);
    opacity: 0;
    transition: transform var(--motion-slow) var(--motion-ease), opacity var(--motion-slow) var(--motion-ease);
}

.modal-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.modal-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(87, 81, 213, 0.08);
    color: #4b46c9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.modal-subtitle {
    margin: 0;
    color: rgba(22, 22, 21, 0.62);
    font-size: 14px;
    line-height: 1.6;
}

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

#platform-variant-modal {
    z-index: 12050 !important;
}

#platform-variant-modal .modal-content {
    max-width: 620px;
    padding: 34px 34px 26px;
    position: relative;
    z-index: 1;
    background:
        radial-gradient(circle at top right, rgba(221, 191, 144, 0.16) 0%, transparent 32%),
        radial-gradient(circle at top left, rgba(87, 81, 213, 0.08) 0%, transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(250, 247, 241, 0.99) 100%);
    border-color: rgba(96, 81, 61, 0.12);
    box-shadow: 0 28px 60px rgba(20, 22, 35, 0.18);
}

#platform-variant-desc {
    margin: 12px 0 8px;
    color: rgba(39, 44, 58, 0.82);
    font-size: 15px;
    line-height: 1.8;
}

.platform-variant-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

#platform-variant-modal .platform-variant-actions .btn {
    min-width: 88px;
}

.platform-variant-options,
.zhuque-variant-options {
    display: grid;
    gap: 12px;
    margin: 18px 0 4px;
}

.platform-variant-options .variant-option,
.zhuque-variant-options .variant-option {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border: 1px solid rgba(96, 81, 61, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 247, 241, 0.98) 100%);
    box-shadow: 0 10px 22px rgba(22, 22, 21, 0.06);
    cursor: pointer;
    transition: transform var(--motion-base) var(--motion-ease),
        border-color var(--motion-base) var(--motion-ease),
        box-shadow var(--motion-base) var(--motion-ease),
        background var(--motion-base) var(--motion-ease);
}

.platform-variant-options .variant-option:hover,
.zhuque-variant-options .variant-option:hover {
    transform: translateY(-1px);
    border-color: rgba(87, 81, 213, 0.2);
    box-shadow: 0 16px 26px rgba(22, 22, 21, 0.1);
}

.platform-variant-options .variant-option input[type="radio"],
.zhuque-variant-options .variant-option input[type="radio"] {
    margin-top: 5px;
    accent-color: var(--color-brand-600);
}

.platform-variant-options .variant-option__body,
.zhuque-variant-options .variant-option__body {
    min-width: 0;
}

.platform-variant-options .variant-option__title,
.zhuque-variant-options .variant-option__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.55;
    color: #1f2937;
}

.platform-variant-options .variant-option__badge,
.zhuque-variant-options .variant-option__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #8a5b12;
    background: rgba(243, 201, 124, 0.24);
}

.platform-variant-options .variant-option__title.option-text--compact,
.zhuque-variant-options .variant-option__title.option-text--compact {
    font-size: 16px;
}

.platform-variant-options .variant-option__title.option-text--tight,
.zhuque-variant-options .variant-option__title.option-text--tight {
    font-size: 15px;
    letter-spacing: -0.02em;
}

.platform-variant-options .variant-option__desc,
.zhuque-variant-options .variant-option__desc {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(39, 44, 58, 0.74);
}

.platform-variant-options .variant-option.selected,
.zhuque-variant-options .variant-option.selected {
    border-color: rgba(87, 81, 213, 0.34);
    background: linear-gradient(180deg, rgba(248, 244, 255, 0.98) 0%, rgba(242, 236, 252, 0.98) 100%);
    box-shadow:
        0 0 0 3px rgba(87, 81, 213, 0.12),
        0 18px 30px rgba(87, 81, 213, 0.12);
}

.platform-variant-options .variant-option.selected::after,
.zhuque-variant-options .variant-option.selected::after {
    content: '当前选择';
    position: absolute;
    top: 12px;
    right: 14px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(87, 81, 213, 0.12);
    color: #514ad1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.platform-variant-options .variant-option:focus-within,
.zhuque-variant-options .variant-option:focus-within {
    outline: 3px solid rgba(87, 81, 213, 0.18);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    #platform-variant-modal .modal-content {
        width: min(100%, 560px);
        padding: 28px 20px 22px;
    }

    .platform-variant-options .variant-option,
    .zhuque-variant-options .variant-option {
        padding: 14px 14px 14px 16px;
        border-radius: 16px;
    }

    .platform-variant-options .variant-option__title,
    .zhuque-variant-options .variant-option__title {
        font-size: 16px;
    }

}

.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.42);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 12100;
    color: #ffffff;
}

#invite-center-modal {
    padding: 18px 16px 24px;
    background-color: rgba(18, 19, 27, 0.28);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    align-items: center;
}

#invite-center-modal .invite-center-modal-content {
    width: min(1100px, calc(100vw - 32px));
    max-width: 1100px;
    max-height: calc(100vh - 36px);
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(22, 22, 21, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(247, 246, 250, 0.99) 100%);
    box-shadow: 0 28px 60px rgba(20, 22, 35, 0.18);
}

#invite-center-modal #invite-center-container {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.invite-center-loading {
    text-align: center;
    padding: 40px;
}

.invite-center-loading__spinner {
    font-size: 24px;
    color: #007bff;
}

.invite-center-loading__text {
    margin-top: 10px;
    color: #6c757d;
}

#usage-guide-modal {
    z-index: 10000;
}

#usage-guide-modal .usage-guide-content {
    width: min(800px, 90%);
    max-width: 800px;
    max-height: 85vh;
    padding: 25px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#usage-guide-modal .usage-guide-header h2 {
    margin: 0 0 20px;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

#usage-guide-modal .usage-guide-body {
    color: #374151;
    line-height: 1.6;
}

#usage-guide-modal .guide-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f3f4f6;
}

#usage-guide-modal .usage-guide-body > .guide-section:last-of-type {
    margin-bottom: 0;
    border-bottom: none;
}

#usage-guide-modal .guide-section h3 {
    margin-bottom: 10px;
    color: #111827;
    font-size: 1.1rem;
    font-weight: 600;
}

#usage-guide-modal .guide-section p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

#usage-guide-modal .usage-guide-title-link {
    color: #4b46c9;
    text-decoration: none;
    border-bottom: 1px solid rgba(75, 70, 201, 0.36);
    transition: color 0.2s ease, border-color 0.2s ease;
}

#usage-guide-modal .usage-guide-title-link:hover,
#usage-guide-modal .usage-guide-title-link:focus-visible {
    color: #3f3ab0;
    border-color: rgba(63, 58, 176, 0.6);
}

#usage-guide-modal .highlight-red {
    color: #dc2626;
    font-weight: 500;
}

@media (max-width: 640px) {
    #usage-guide-modal .usage-guide-content {
        width: 95%;
        padding: 20px;
    }

    #usage-guide-modal .usage-guide-header h2 {
        font-size: 1.25rem;
    }

    #usage-guide-modal .guide-section h3 {
        font-size: 1rem;
    }

    #usage-guide-modal .guide-section p {
        font-size: 0.9rem;
    }
}

.note-item__icon--wechat {
    color: #07c160;
}

.note-item__icon--gift {
    color: #f59e0b;
}

#exchange-modal .exchange-modal-content {
    width: min(680px, calc(100vw - 32px));
    max-width: 680px;
    max-height: calc(100vh - 36px);
    padding: 22px 24px 24px;
    border-radius: 20px;
}

#exchange-modal .exchange-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#exchange-modal .exchange-form .form-group {
    margin-bottom: 0;
}

#exchange-modal .exchange-form label {
    display: inline-flex;
    margin-bottom: 8px;
    color: #1f2535;
    font-size: 14px;
    font-weight: 700;
}

#exchange-modal .code-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

#exchange-modal #card-code {
    width: 100%;
    min-height: 52px;
    padding: 0 46px 0 16px;
    border: 1px solid rgba(22, 22, 21, 0.1);
    border-radius: 14px;
    background: #ffffff;
    color: #243146;
    font-size: 15px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

#exchange-modal #card-code:focus {
    border-color: rgba(87, 81, 213, 0.3);
    box-shadow: 0 0 0 3px rgba(87, 81, 213, 0.08);
    outline: none;
}

#exchange-modal .btn-clear-input {
    right: 12px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #8b95a7;
    transition: background var(--motion-base) var(--motion-ease), color var(--motion-base) var(--motion-ease);
}

#exchange-modal .btn-clear-input:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #c2410c;
}

#exchange-modal .form-hint {
    margin-top: 8px;
    color: #687082;
    font-size: 12.5px;
    line-height: 1.55;
}

#exchange-modal .card-types {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 8px 0;
}

#exchange-modal .card-type-inline {
    color: #4f586a;
    font-size: 12.5px;
    line-height: 1.45;
}

#exchange-modal .card-type-sep {
    color: #c0c5d0;
    font-size: 12px;
}

#exchange-modal #exchange-submit-btn {
    min-height: 52px;
    border-radius: 14px;
    border: 1px solid rgba(24, 28, 46, 0.18);
    background: linear-gradient(135deg, #202535 0%, #4048b4 72%, #5562d4 100%);
    box-shadow: 0 14px 22px rgba(32, 37, 53, 0.16);
}

#exchange-modal #exchange-submit-btn:hover {
    background: linear-gradient(135deg, #1c2232 0%, #3842ad 72%, #4d5dce 100%);
    box-shadow: 0 18px 28px rgba(32, 37, 53, 0.2);
}

#usage-guide-modal {
    z-index: 10000;
}

@media (max-width: 768px) {
    .modal {
        padding: 16px 12px 24px;
    }

    .modal-content {
        width: 100%;
        max-height: calc(100vh - 40px);
        padding: 20px 18px;
        border-radius: 16px;
    }

    #invite-center-modal {
        padding: 14px 12px 18px;
        align-items: flex-start;
    }

    #invite-center-modal .invite-center-modal-content {
        width: 100%;
        max-width: none;
        max-height: calc(100vh - 28px);
        padding: 16px 16px 16px;
        border-radius: 18px;
    }
}

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

.close-modal,
.close-modal-qr {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(87, 81, 213, 0.18);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px -20px rgba(24, 24, 27, 0.34);
    -webkit-appearance: none;
    appearance: none;
    font-size: 26px;
    line-height: 1;
    color: #575d6a;
    cursor: pointer;
    z-index: 3;
    transition: color var(--motion-base) var(--motion-ease),
        border-color var(--motion-base) var(--motion-ease),
        background var(--motion-base) var(--motion-ease),
        box-shadow var(--motion-base) var(--motion-ease),
        transform var(--motion-base) var(--motion-ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover,
.close-modal-qr:hover {
    color: #fff;
    border-color: rgba(87, 81, 213, 0.42);
    background: var(--color-brand-600, #5751d5);
    box-shadow: 0 18px 34px -18px rgba(87, 81, 213, 0.52);
    transform: translateY(-1px) scale(1.04);
}

.close-modal:active,
.close-modal-qr:active {
    transform: translateY(0) scale(0.95);
}

.close-modal:focus-visible,
.close-modal-qr:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(87, 81, 213, 0.16), 0 14px 30px -20px rgba(24, 24, 27, 0.34);
}

.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: 4px 0 10px;
}

#help-modal .modal-content,
#ai-detection-modal .modal-content {
    max-width: 620px;
}

#help-modal .help-modal-content,
#ai-detection-modal .ai-detection-modal-content {
    padding-top: 22px;
}

/* 微信二维码容器 */
.wechat-qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 22px 0 14px 0;
    padding: 22px;
    background: linear-gradient(180deg, rgba(248, 247, 251, 0.96) 0%, rgba(243, 242, 248, 0.98) 100%);
    border-radius: 14px;
    border: 1px solid rgba(22, 22, 21, 0.08);
    box-shadow: 0 8px 16px rgba(20, 22, 35, 0.06);
}

/* 微信二维码图片 */
.wechat-qr-image {
    width: 240px;
    height: 240px;
    border-radius: 10px;
    box-shadow: 0 10px 16px rgba(20, 22, 35, 0.08);
    transition: transform 0.3s ease;
}

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

/* 紧凑型微信联系信息 */
.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);
}


/* 认证链接样式 */
.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;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.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;
}

.wechat-qr-refresh-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 138, 84, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1f8a54;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    opacity: 0.48;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, width 0.2s ease;
    z-index: 3;
}

.wechat-qr-refresh-btn:hover,
.wechat-qr-refresh-btn:focus-visible {
    opacity: 0.95;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.wechat-qr-refresh-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

.qr-refresh-icon {
    font-size: 12px;
}

.qr-refresh-label {
    display: none;
    margin-left: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.wechat-qr-wrapper.qr-refresh-critical .wechat-qr-refresh-btn {
    width: auto;
    min-width: 74px;
    height: 30px;
    border-radius: 999px;
    padding: 0 10px;
    opacity: 1;
    border-color: #31c27c;
    background: #ffffff;
}

.wechat-qr-wrapper.qr-refresh-critical .qr-refresh-label {
    display: inline;
}

.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;
}

/* 登录注册弹窗四轮收口：二维码主舞台、邀请码强化条、背景与按钮统一 */
#auth-modal .modal-content {
    width: min(920px, calc(100vw - 36px));
    max-width: 920px;
    max-height: calc(100vh - 36px);
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

#auth-modal .close-modal {
    top: 16px;
    right: 16px;
}

#auth-modal .tabs {
    margin-bottom: 0;
    padding-right: 54px;
    gap: 8px;
    border-bottom: 1px solid rgba(22, 22, 21, 0.08);
}

#auth-modal .tab {
    flex: 0 0 auto;
    padding: 10px 16px;
    color: #6b7280;
    border-bottom: 2px solid transparent;
}

#auth-modal .tab:hover {
    color: #2f3650;
}

#auth-modal .tab.active {
    color: #161615;
    border-bottom-color: rgba(87, 81, 213, 0.32);
    background: rgba(245, 244, 250, 0.82);
}

#auth-modal .tab-content {
    margin-top: 0;
    min-height: 0;
    padding: 0 6px 6px 2px;
    overflow: auto;
}

#auth-modal .tab-content::-webkit-scrollbar {
    width: 8px;
}

#auth-modal .tab-content::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.24);
    border-radius: 999px;
}

#auth-modal #login-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#auth-modal .wechat-login-section {
    --auth-qr-stage-size: 304px;
    --auth-qr-shell-padding: 14px;
    --auth-qr-image-size: 270px;
    display: grid;
    align-items: start;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 20px;
    padding: 18px 20px;
    margin-bottom: 0;
    text-align: left;
    border: 1px solid rgba(22, 22, 21, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 246, 250, 0.99) 100%);
}

#auth-modal .auth-modal-qr-pane,
#auth-modal .auth-modal-side-pane {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#auth-modal .auth-modal-qr-pane {
    align-items: center;
}

#auth-modal .auth-modal-side-pane {
    align-self: center;
    gap: 14px;
}

#auth-modal .wechat-login-header {
    width: min(100%, var(--auth-qr-stage-size));
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0;
}

#auth-modal .wechat-login-header > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

#auth-modal .wechat-login-header i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(7, 193, 96, 0.12);
    color: #07c160;
    font-size: 20px;
}

#auth-modal .wechat-login-header h3 {
    margin: 0;
    color: #161615;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.35;
}

#auth-modal .wechat-login-subtitle {
    margin: 0;
    color: #6c7486;
    font-size: 12.5px;
    line-height: 1.6;
}

#auth-modal .wechat-qr-wrapper {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#auth-modal .login-qrcode-stage {
    width: min(100%, var(--auth-qr-stage-size));
    position: relative;
}

#auth-modal .login-qrcode-container {
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    margin-bottom: 0;
    padding: var(--auth-qr-shell-padding);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    border: 1px solid rgba(22, 22, 21, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, rgba(248, 248, 252, 0.98) 100%);
    box-shadow: 0 18px 32px rgba(20, 22, 35, 0.08);
}

#auth-modal .login-qrcode-container > * {
    width: 100%;
}

#auth-modal .login-qrcode-image {
    width: min(100%, var(--auth-qr-image-size));
    max-width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 18px;
    border: 1px solid rgba(22, 22, 21, 0.1);
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

#auth-modal .qr-loading,
#auth-modal .qr-error {
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-sizing: border-box;
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed rgba(87, 81, 213, 0.18);
    background: linear-gradient(180deg, rgba(248, 247, 252, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
    text-align: center;
}

#auth-modal .qr-loading i {
    font-size: 30px;
    color: #4b46c9;
}

#auth-modal .qr-error i {
    font-size: 28px;
    color: #c2410c;
}

#auth-modal .qr-loading p,
#auth-modal .qr-error p {
    margin: 0;
}

#auth-modal .qr-error p:first-of-type {
    color: #1f2535;
    font-weight: 600;
    font-size: 15px;
}

#auth-modal .qr-error p:last-of-type {
    color: #6c7486;
    font-size: 13px;
    line-height: 1.6;
}

#auth-modal .wechat-qr-actions {
    width: min(100%, var(--auth-qr-stage-size));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

#auth-modal .qr-hint {
    margin: 0;
    color: #202535;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
}

#auth-modal .qr-hint-note {
    margin: 0;
    color: #6c7486;
    font-size: 12.5px;
    line-height: 1.6;
}

#auth-modal .wechat-qr-refresh-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    min-width: 0;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(87, 81, 213, 0.12);
    background: rgba(255, 255, 255, 0.76);
    color: rgba(76, 84, 112, 0.92);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    opacity: 0.56;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition:
        opacity 200ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 200ms cubic-bezier(0.22, 1, 0.36, 1),
        color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

#auth-modal .wechat-qr-refresh-btn .qr-refresh-label {
    display: none;
}

#auth-modal .wechat-qr-refresh-btn .qr-refresh-icon {
    font-size: 13px;
}

#auth-modal .wechat-qr-refresh-btn:hover,
#auth-modal .wechat-qr-refresh-btn:focus-visible {
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.94);
    color: #4b46c9;
    border-color: rgba(87, 81, 213, 0.24);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

#auth-modal .wechat-qr-wrapper.qr-refresh-critical .wechat-qr-refresh-btn {
    width: 38px;
    height: 38px;
    min-width: 0;
    padding: 0;
    border-radius: 12px;
    opacity: 0.94;
    color: #c2410c;
    border-color: rgba(194, 65, 12, 0.18);
    background: rgba(255, 247, 237, 0.96);
}

#auth-modal .invite-rewards-section {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid rgba(87, 81, 213, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(250, 249, 255, 1) 0%, rgba(245, 243, 253, 1) 100%);
}

#auth-modal .invite-code-header {
    padding: 15px 16px 0;
    background: transparent;
    color: #161615;
    font-size: 14px;
    font-weight: 650;
    gap: 8px;
}

#auth-modal .invite-code-header i {
    color: var(--color-brand-700);
}

#auth-modal .invite-code-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 16px 14px;
}

#auth-modal .invite-input-group {
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 0;
}

#auth-modal .invite-input {
    min-height: 44px;
    padding: 0 14px;
    border: 1.5px solid rgba(87, 81, 213, 0.16);
    border-radius: 14px;
    background: #ffffff;
    color: #2a3040;
    font-size: 14px;
    box-shadow: none;
}

#auth-modal .invite-input:focus {
    border-color: rgba(87, 81, 213, 0.36);
    box-shadow: 0 0 0 3px rgba(87, 81, 213, 0.08);
}

#auth-modal .invite-save-btn {
    height: 44px;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(24, 28, 46, 0.16);
    background: linear-gradient(135deg, #202535 0%, #4048b4 72%, #5562d4 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 650;
    box-shadow: 0 12px 20px rgba(32, 37, 53, 0.16);
}

#auth-modal .invite-save-btn:hover {
    background: linear-gradient(135deg, #1c2232 0%, #3842ad 72%, #4d5dce 100%);
    box-shadow: 0 16px 24px rgba(32, 37, 53, 0.2);
}

#auth-modal .invite-status {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.5;
}

#auth-modal .rewards-content-wrapper {
    display: none;
}

#auth-modal .rewards-list {
    color: #4f586a;
    font-size: 12.5px;
    line-height: 1.58;
}

#auth-modal .rewards-list .reward-item {
    align-items: flex-start;
    gap: 7px;
    margin-bottom: 7px;
}

#auth-modal .invite-rewards-list {
    margin: 0;
    padding-left: 18px;
    color: #3e475b;
    font-size: 12px;
    line-height: 1.64;
    list-style: disc;
}

#auth-modal .invite-rewards-list li {
    margin-bottom: 6px;
}

#auth-modal .invite-rewards-list strong {
    color: #4b46c9;
    font-weight: 700;
}

#auth-modal[data-auth-tab="login"] #register-content,
#auth-modal[data-auth-tab="register"] #login-content {
    display: none !important;
}

#auth-modal #login-content .privacy-terms-notice {
    margin-top: 0;
    padding: 0 2px;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    text-align: left;
    font-size: 11.5px;
}

#auth-modal #register-form .privacy-terms-notice {
    margin-top: 0;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    text-align: left;
    font-size: 11.5px;
}

#auth-modal #login-content .privacy-terms-notice a,
#auth-modal #register-form .privacy-terms-notice a {
    color: #433dad;
    font-weight: 600;
}

#auth-modal .traditional-login-wrapper {
    margin-top: 0;
    padding-top: 0;
}

#auth-modal .auth-modal-password-entry {
    padding-inline: 2px;
}

#auth-modal .login-method-divider {
    margin: 0 0 8px;
}

#auth-modal .login-method-divider::before,
#auth-modal .login-method-divider::after {
    background: linear-gradient(90deg, transparent, rgba(22, 22, 21, 0.14), transparent);
}

#auth-modal .login-method-divider span {
    padding: 0 12px;
    background: transparent;
    color: #687082;
    font-size: 11.5px;
}

#auth-modal .traditional-login-toggle {
    min-height: 40px;
    margin-bottom: 0;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(22, 22, 21, 0.08);
    background: rgba(248, 248, 251, 0.98);
    color: #384052;
}

#auth-modal .traditional-login-toggle:hover {
    border-color: rgba(87, 81, 213, 0.18);
    background: rgba(255, 255, 255, 1);
}

#auth-modal .traditional-login-form-wrapper.expanded {
    max-height: 404px;
}

#auth-modal .traditional-login-form-wrapper {
    padding-inline: 2px;
}

#auth-modal .traditional-login-form {
    width: 100%;
    min-width: 0;
    padding: 12px 2px 2px;
}

#auth-modal .auth-modal-password-entry .traditional-login-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

#auth-modal .auth-modal-password-entry .form-group {
    margin-bottom: 0;
}

#auth-modal .auth-modal-password-entry .btn.btn-primary.btn-block,
#auth-modal .auth-modal-password-entry .auth-links {
    grid-column: 1 / -1;
}

#auth-modal .form-group {
    margin-bottom: 12px;
}

#auth-modal .form-group label,
#forgot-password-modal .form-group label {
    color: #1f2535;
    font-size: 13px;
}

#auth-modal .form-group input,
#auth-modal .register-acquisition-select,
#forgot-password-modal .form-group input {
    min-height: 44px;
    border: 1px solid rgba(22, 22, 21, 0.08);
    border-radius: 14px;
    background: #ffffff;
    color: #2a3040;
    box-shadow: none;
}

#auth-modal .form-group input:focus,
#auth-modal .register-acquisition-select:focus,
#forgot-password-modal .form-group input:focus {
    border-color: rgba(87, 81, 213, 0.28);
    box-shadow: 0 0 0 3px rgba(87, 81, 213, 0.08);
    background: #ffffff;
}

#auth-modal .traditional-login-form .btn.btn-primary.btn-block,
#auth-modal #register-form .btn.btn-primary.btn-block,
#forgot-password-modal .btn.btn-primary.btn-block {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 2px auto 0;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(24, 28, 46, 0.16);
    background: linear-gradient(135deg, #202535 0%, #4048b4 72%, #5562d4 100%);
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(32, 37, 53, 0.14);
}

#auth-modal .traditional-login-form .btn.btn-primary.btn-block:hover,
#auth-modal #register-form .btn.btn-primary.btn-block:hover,
#forgot-password-modal .btn.btn-primary.btn-block:hover {
    background: linear-gradient(135deg, #1c2232 0%, #3842ad 72%, #4d5dce 100%);
    box-shadow: 0 18px 28px rgba(32, 37, 53, 0.2);
}

#auth-modal #register-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    width: 100%;
    min-width: 0;
    padding-inline: 2px;
}

#auth-modal #register-form .register-acquisition-field,
#auth-modal #register-form .btn.btn-primary.btn-block,
#auth-modal #register-form .register-tip,
#auth-modal #register-form .privacy-terms-notice {
    grid-column: 1 / -1;
}

#auth-modal .register-tip {
    margin-top: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    background: rgba(255, 248, 235, 0.98);
    color: #8b5e17;
    font-size: 13px;
}

#auth-modal .auth-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 2px;
}

#forgot-password-modal form {
    width: 100%;
    min-width: 0;
    padding-inline: 2px;
}

#auth-modal .auth-links a {
    color: #4b46c9;
    font-weight: 600;
}

@media (max-width: 1024px) {
    #auth-modal .modal-content {
        width: min(100%, calc(100vw - 28px));
        max-width: 820px;
        max-height: calc(100vh - 24px);
        padding: 18px 16px 18px;
    }

    #auth-modal .wechat-login-section {
        --auth-qr-stage-size: 304px;
        --auth-qr-shell-padding: 14px;
        --auth-qr-image-size: 270px;
        grid-template-columns: repeat(2, minmax(300px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    #auth-modal.bottom-sheet {
        align-items: flex-end;
        background: rgba(15, 23, 42, 0.32);
    }

    #auth-modal.bottom-sheet .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: min(88vh, 760px);
        border-radius: 24px 24px 0 0;
        margin: 0;
        overflow: hidden;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    #auth-modal.bottom-sheet .modal-content::before {
        content: '';
        display: block;
        width: 42px;
        height: 4px;
        background: #e5e7eb;
        border-radius: 999px;
        margin: 8px auto 6px;
    }

    #auth-modal .tabs {
        padding-right: 42px;
    }

    #auth-modal .wechat-login-section {
        --auth-qr-stage-size: 304px;
        --auth-qr-shell-padding: 14px;
        --auth-qr-image-size: 266px;
        grid-template-columns: 1fr;
        padding: 14px;
    }

    #auth-modal .wechat-login-header {
        width: min(100%, var(--auth-qr-stage-size));
    }

    #auth-modal .auth-modal-qr-pane {
        align-items: center;
    }

    #auth-modal .wechat-qr-wrapper {
        align-items: center;
    }

    #auth-modal .wechat-qr-actions {
        width: min(100%, var(--auth-qr-stage-size));
        align-items: center;
        text-align: center;
    }

    #auth-modal .wechat-qr-refresh-btn {
        width: 38px;
        height: 38px;
    }

    #auth-modal .invite-input-group {
        flex-direction: column;
    }

    #auth-modal .invite-save-btn {
        width: 100%;
    }

    #auth-modal .rewards-content-wrapper,
    #auth-modal #register-form,
    #auth-modal .auth-modal-password-entry .traditional-login-form {
        grid-template-columns: 1fr;
    }

    #auth-modal .tab-content {
        padding: 0 4px 6px;
    }

    #auth-modal .traditional-login-form-wrapper,
    #auth-modal .traditional-login-form,
    #auth-modal #register-form,
    #forgot-password-modal form {
        padding-inline: 0;
    }

    #auth-modal .rewards-right {
        padding-left: 0;
        padding-top: 12px;
        border-left: 0;
        border-top: 1px solid rgba(87, 81, 213, 0.1);
    }

    #exchange-modal .exchange-modal-content {
        width: min(100%, calc(100vw - 20px));
        padding: 18px 16px 18px;
    }

    #exchange-modal .code-format-example {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    #exchange-modal .card-types {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
