/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-image: linear-gradient(to bottom, #fde7f1, #f0f2f5 50%);
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    box-sizing: border-box;
}

header, main, footer {
    width: 100%;
    max-width: 500px; /* Mobile first approach */
    box-sizing: border-box;
    padding: 20px 10px; /* Reduced horizontal padding for mobile */
}

.main-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px 15px; /* Reduced horizontal padding for mobile */
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 20px;
}

.left-actions, .right-actions {
    display: flex;
    gap: 10px;
}

.top-actions button {
    border: 1px solid transparent;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-download {
    background-color: #ff4d4f;
    color: white;
    border-color: #ff4d4f;
}

.btn-order, .btn-contact {
    background-color: #fff1f0;
    color: #ff4d4f;
    border-color: #ffccc7;
}

.title-section {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

.title-section h1 {
    font-size: 28px;
    margin: 0 0 15px;
}

.unlock-features {
    background-color: #ff4d4f;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 20px;
}

.content-tabs {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.tab-btn {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
}




.app-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.section-divider {
    border-top: 1px solid #f0f0f0;
    margin: 0 20px 20px;
}

.app-icons span {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
}

.membership-section {
    position: relative;
    margin-bottom: 20px;
}

.membership-container-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    scroll-padding-inline: 15px; /* Ensures padding on scroll-snap */
}

.membership-container-wrapper::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.membership-container {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    padding-top: 10px; /* Add padding to prevent clipping */
}

.membership-card {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    min-width: 140px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    text-align: center;
    position: relative;
    /* transition: transform 0.3s ease, box-shadow 0.3s ease; */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* .membership-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
} */

.membership-card.recommended {
    border: 2px solid #ff7a45;
}

.membership-card.premium {
    background: linear-gradient(to bottom, #fff1f0, #ffffff);
    border-color: #ffccc7;
    box-shadow: 0 6px 20px rgba(255, 77, 79, 0.1);
}

.membership-card.premium h2 {
    color: #d4380d;
}

.card-header {
    margin-bottom: 15px;
}

.tag {
    background-color: #fff1f0;
    color: #ff4d4f;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.membership-card.recommended .tag {
    background-color: #ff7a45;
    color: white;
}

.membership-card h2 {
    font-size: 20px;
    margin: 0 0 10px;
}

.description {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
    min-height: 40px;
}

.price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #ff4d4f;
    margin-bottom: 20px;
}

.original-price {
    font-size: 16px;
    color: #aaa;
    text-decoration: line-through;
}

.ai-logo {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 60px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.05);
    transform: rotate(-15deg);
}


.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    display: none; /* Hide by default on mobile */
}

.scroll-button.prev {
    left: 15px;
}

.scroll-button.next {
    right: 15px;
}

.activation-section {
    margin-bottom: 20px;
}

.activation-section h4 {
    margin: 20px 0 15px;
    font-size: 16px;
    color: #555;
    text-align: center;
}

.email-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.email-input {
    flex-grow: 1;
}

.email-input input {
    width: 100%;
    border: none;
    background-color: #f7f7f7;
    padding: 15px;
    border-radius: 10px;
    box-sizing: border-box;
    border: 1px solid transparent; /* Add a transparent border to prevent layout shift */
    transition: border-color 0.3s ease;
}

.email-input input:focus {
    outline: none;
    border-color: #ff4d4f;
}

.features-check {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.features-check label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    position: relative;
    cursor: pointer;
    width: fit-content;
}

.features-check input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.features-check label::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
    background-color: #fff;
    transition: all 0.2s;
}

.features-check input[type="checkbox"]:checked + label::before {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
}

.features-check input[type="checkbox"]:checked + label::after {
    content: '✔';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    color: white;
    font-size: 12px;
}

.features-check input[type="checkbox"]:disabled + label::before {
    background-color: #f2f6fc;
    border-color: #dcdfe6;
}

.features-check input[type="checkbox"]:disabled:checked + label::before {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
}


.payment-method-section {
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 20px;
}

.payment-method-section h4 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #555;
    text-align: center;
}

.payment-options {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.payment-options input[type="radio"] {
    display: none;
}

.payment-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.payment-option img {
    width: 24px;
    height: 24px;
}

.payment-options input[type="radio"]:checked + .payment-option {
    border-color: #ff4d4f;
}


.action-section {
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-pay {
    background-image: linear-gradient(90deg, #ff7a45, #ff4d4f);
    color: #fff;
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

footer {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    padding: 20px;
}

footer p {
    margin: 5px 0;
}

/* Payment Modal Styles */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: calc(100% - 40px);
    max-width: 350px;
    box-sizing: border-box;
}

.modal-content h3 {
    margin: 0 0 20px;
    font-size: 20px;
}

.qr-code-container {
    margin: 0 auto 20px;
    width: 212px; /* image 200 + padding 10 + border 2 */
    height: 212px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.qr-code-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    padding: 5px;
    box-sizing: border-box;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-price {
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.btn-paid, .btn-cancel-payment {
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
}

.btn-paid {
    flex: 2;
    background-color: #5cb85c; /* Default to a generic success color */
    color: white;
}

.wechat-theme .modal-content h3,
.wechat-theme .btn-paid {
    background-color: #4CAF50; /* WeChat Green */
    color: white;
}

.alipay-theme .modal-content h3,
.alipay-theme .btn-paid {
    background-color: #1677FF; /* AliPay Blue */
    color: white;
}

.wechat-theme .modal-content h3,
.alipay-theme .modal-content h3 {
    padding: 10px;
    border-radius: 8px 8px 0 0;
    margin: -30px -30px 20px -30px;
}

.btn-cancel-payment {
    flex: 1;
    background-color: #f0f0f0;
    color: #555;
}


/* PC Styles */
@media (min-width: 768px) {
    main {
        max-width: 900px;
    }

    .email-container {
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
    }

    .main-card {
        padding: 20px; /* Restore padding on PC */
    }

    .payment-options {
        flex-direction: row;
        justify-content: center;
    }

    .payment-option {
        min-width: 320px; /* Doubled from 160px */
    }

    .membership-section {
        padding-inline: 55px; /* Add space for buttons */
    }

    .scroll-button {
        display: block;
    }

    .membership-card {
        /* min-width is now inherited from base */
    }

    .membership-container {
        /* justify-content: center; */ /* Removing this to allow free scroll */
    }
    .scroll-button.prev {
       left: 5px;
    }
    .scroll-button.next {
       right: 5px;
    }

    .action-section {
        flex-direction: column; /* Ensure button takes full width */
        align-items: center; /* Center the button */
    }

    .btn-pay {
        width: 655px; /* Match payment options width (320px * 2 + 15px gap) */
        max-width: 100%; /* Ensure it doesn't overflow on smaller PC screens */
    }
}


/* Kefu Modal Styles */
.kefu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.kefu-modal-content {
    position: relative;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-kefu-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

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

.kefu-modal-content h2 {
    color: #59359a;
    margin-top: 0;
    margin-bottom: 20px;
}

.kefu-info {
    font-size: 18px;
    line-height: 3.6;
    color: #333;
    word-wrap: break-word;
    text-align: center;
    font-weight: bold;
}

.kefu-info p {
    margin: 0;
    padding: 5px 0;
}
/* 查询订单结果样式 */
.order-result { border:1px solid #eee; border-radius:10px; background:#f9fafb; padding:12px 14px; color:#111827; }
.order-result .status { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.order-result .status-badge { padding:2px 8px; border-radius:999px; font-size:12px; font-weight:600; }
.order-result .status-paid { background:#e8f7ee; color:#16a34a; }
.order-result .status-pending { background:#fef3c7; color:#b45309; }
.order-result .status-error { background:#fee2e2; color:#b91c1c; }
.order-result .result-grid { display:grid; grid-template-columns: 88px 1fr; column-gap:8px; row-gap:6px; font-size:14px; }
.order-result .result-label { color:#6b7280; }
.order-result .result-value { color:#111827; word-break: break-all; }
.order-result .result-kami { margin-top:10px; background:#fff; border:1px solid #eee; border-radius:8px; max-height:160px; overflow:auto; }
.order-result .result-kami pre { margin:0; padding:10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; white-space: pre-wrap; }