/* Subscription Page Styles */
.subscription-container {
    min-height: 100vh;
    background-color: #1a1a1a;
    color: #ffffff;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 138, 80, 0.2);
    border-top-color: #FF8A50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #1a1a1a;
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.hidden {
    display: none;
}

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

.toast-icon {
    font-size: 24px;
}

.toast.success .toast-icon {
    color: #4CAF50;
}

.toast.error .toast-icon {
    color: #FF4463;
}

.toast-message {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.subscription-card {
    width: 100%;
    background: #1a1a1a;
}

/* 移动端：隐藏PC端权益列表，显示移动端 */
.benefits-list-desktop {
    display: none !important;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.benefits-list-mobile {
    display: block;
}

/* 默认隐藏价格标题 */
.pricing-title {
    display: none;
}

/* 移动端/PC端显示控制 */
.mobile-only {
    display: flex;
}

.desktop-only {
    display: none;
}

/* PC端返回按钮 */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.back-btn i {
    font-size: 14px;
}

/* Hero Section */
.subscription-hero {
    position: relative;
    height: 200px;
    background-image: url('/images/subscribe_top.png');
    background-size: cover;
    background-position: center;
    background-color: #2a1a2a;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.3) 0%, rgba(26, 26, 26, 0.8) 70%, #1a1a1a 100%);
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-content {
    position: relative;
    z-index: 5;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 24px 24px;
}

.hero-title {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Main Content */
.subscription-content {
    padding: 24px;
    max-width: 500px;
    margin: 0 auto;
}

/* Benefits List */
.benefits-list {
    margin-bottom: 32px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    color: #FF4463;
    margin-right: 12px;
    margin-top: 2px;
}

.benefit-text h3 {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.benefit-text p {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
}

/* Pricing Options */
.pricing-options {
    margin-bottom: 24px;
}

.pricing-option {
    display: block;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pricing-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pricing-option.selected {
    border-color: #FF4463;
    background: rgba(255, 68, 99, 0.1);
}

.pricing-option input[type="radio"] {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-info {
    display: flex;
    flex-direction: column;
}

.option-price {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.option-label {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.option-radio {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-option.selected .option-radio {
    border-color: #FF4463;
}

.pricing-option.selected .option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #FF4463;
    border-radius: 50%;
}

/* Subscribe Button */
.subscribe-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 28px;
    background: linear-gradient(90deg, #FF8A50 0%, #FF4463 100%);
    color: #ffffff;
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 68, 99, 0.4);
}

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

.subscribe-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.subscribe-btn .btn-text,
.subscribe-btn .btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.subscribe-btn .hidden {
    display: none;
}

/* PayPal Button Container */
#paypal-button-container {
    margin-bottom: 24px;
    min-height: 55px;
    position: relative;
    z-index: 100;
}

/* 确保 PayPal iframe 可交互 */
#paypal-button-container iframe {
    position: relative !important;
    z-index: 100 !important;
}

/* Terms */
.subscription-terms {
    text-align: center;
    margin-bottom: 24px;
}

.subscription-terms p {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

/* Footer */
.subscription-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.subscription-footer a {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.subscription-footer a:hover {
    color: #FF4463;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

/* RTL Support */
[dir="rtl"] .benefit-icon {
    margin-right: 0;
    margin-left: 12px;
}

/* Responsive */
@media (max-width: 480px) {
    .subscription-hero {
        height: 180px;
    }

    .hero-title {
        font-size: 28px;
    }

    .subscription-content {
        padding: 20px 16px;
    }

    .benefit-text h3 {
        font-size: 15px;
    }

    .option-price {
        font-size: 18px;
    }

    .subscribe-btn {
        height: 52px;
        font-size: 16px;
    }
}

/* Desktop styles - 左右分栏布局 */
@media (min-width: 768px) {
    .subscription-container {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        padding: 40px 20px;
        linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    }

    .subscription-card {
        display: flex;
        flex-direction: row;
        width: 100%;
        max-width: 900px;
        background: #1a1a1a;
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                    0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    /* 左侧 - 背景图+权益 */
    .subscription-hero {
        width: 50%;
        min-height: 500px;
        height: auto;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .hero-overlay {
        background: linear-gradient(to bottom, rgba(26, 26, 26, 0.2) 0%, rgba(26, 26, 26, 0.7) 50%, rgba(26, 26, 26, 0.95) 100%);
    }

    .hero-content {
        position: relative;
        z-index: 5;
        height: auto;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 32px;
        padding-top: 72px; /* 给返回按钮留出空间 */
    }

    .hero-title {
        font-size: 42px;
        margin-bottom: 32px;
        text-align: center;
        width: 100%;
    }

    /* PC端隐藏关闭按钮，显示返回按钮 */
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: flex !important;
    }

    .back-btn {
        display: flex;
    }

    /* PC端显示左侧权益列表，隐藏移动端 */
    .benefits-list-desktop {
        display: flex !important;
        flex-direction: column;
        margin: 0;
        height: auto;
        overflow: visible;
    }

    .benefits-list-mobile {
        display: none !important;
    }

    .subscription-hero .benefit-item {
        margin-bottom: 24px;
    }

    .subscription-hero .benefit-text h3 {
        font-size: 16px;
        font-weight: 600;
    }

    .subscription-hero .benefit-text p {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.7);
    }

    /* 右侧 - 价格选项+订阅 */
    .subscription-content {
        width: 50%;
        max-width: none;
        padding: 72px 36px 40px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        background: #222;
    }

    .pricing-title {
        display: block;
        font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
        font-size: 24px;
        font-weight: 700;
        color: #ffffff;
        margin-bottom: 24px;
    }

    .pricing-options {
        margin-bottom: 24px;
    }

    .pricing-option {
        padding: 20px 24px;
        margin-bottom: 12px;
        border-radius: 16px;
    }

    .pricing-option:hover {
        transform: translateX(4px);
    }

    .option-price {
        font-size: 24px;
    }

    .option-label {
        font-size: 14px;
    }

    .subscribe-btn {
        height: 56px;
        font-size: 17px;
        border-radius: 16px;
    }

    .subscription-terms {
        margin-bottom: 24px;
    }

    .subscription-terms p {
        font-size: 12px;
        line-height: 1.6;
    }

    .subscription-footer {
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .subscription-footer a {
        font-size: 13px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .subscription-container {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    }

    .subscription-card {
        max-width: 960px;
    }

    .hero-title {
        font-size: 48px;
    }

    .subscription-hero .benefit-text h3 {
        font-size: 17px;
    }

    .subscription-hero .benefit-text p {
        font-size: 15px;
    }

    .pricing-title {
        font-size: 28px;
    }

    .subscription-content {
        padding: 48px 44px;
    }
}
