/* 小紫代码编辑器样式 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 48px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 18px;
    opacity: 0.9;
}

/* 优惠横幅 */
.discount-banner {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.discount-banner h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.discount-banner p {
    font-size: 16px;
    opacity: 0.9;
}

/* 套餐选择 */
.pricing-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.pricing-card.popular {
    border: 3px solid #6c5ce7;
    transform: scale(1.05);
}

.pricing-card.popular::before {
    content: '推荐';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #6c5ce7;
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.plan-name {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.plan-price {
    font-size: 48px;
    font-weight: bold;
    color: #6c5ce7;
    margin-bottom: 10px;
}

.monthly-price {
    display: inline;
}

.yearly-price {
    display: none;
}

.plan-period {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.monthly-period {
    display: inline;
}

.yearly-period {
    display: none;
}

.yearly-save {
    display: none;
}

/* 年付模式下的样式 */
.pricing-card.yearly-mode .monthly-price {
    display: none;
}

.pricing-card.yearly-mode .yearly-price {
    display: inline;
}

.pricing-card.yearly-mode .monthly-period {
    display: none;
}

.pricing-card.yearly-mode .yearly-period {
    display: inline;
}

.pricing-card.yearly-mode .yearly-save {
    display: inline;
}

.yearly-save {
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    margin-left: 10px;
}

.plan-features {
    list-style: none;
    margin-bottom: 30px;
}

.plan-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.plan-features li i {
    margin-right: 10px;
    width: 20px;
}

.plan-features li .fa-check {
    color: #28a745;
}

.plan-features li .fa-times {
    color: #dc3545;
}

.billing-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
    margin-bottom: 20px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.toggle-btn.active {
    background: #6c5ce7;
    color: white;
}

.purchase-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #6c5ce7;
    color: white;
}

.purchase-btn:hover {
    background: #5f3dc4;
    transform: translateY(-2px);
}

.purchase-btn.free-btn {
    background: #6c757d;
    cursor: not-allowed;
}

.purchase-btn.free-btn:hover {
    background: #6c757d;
    transform: none;
}

/* 支付方式 */
.payment-methods {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.payment-methods h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.payment-options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #eee;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.payment-option:hover {
    border-color: #6c5ce7;
    background: #f8f9fa;
}

.payment-option.selected {
    border-color: #6c5ce7;
    background: #f0f0ff;
}

.payment-option i {
    font-size: 48px;
    margin-bottom: 10px;
}

.payment-option span {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* 功能特色 */
.features-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.features-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item i {
    font-size: 48px;
    color: #6c5ce7;
    margin-bottom: 20px;
}

.feature-item h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* 用户评价 */
.testimonials {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.testimonials h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: bold;
    color: #6c5ce7;
    margin-bottom: 5px;
}

.testimonial-role {
    color: #666;
    font-size: 14px;
}

/* 常见问题 */
.faq-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.faq-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.faq-question:hover {
    color: #6c5ce7;
}

.faq-answer {
    padding: 0 0 20px 0;
    color: #666;
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* 页脚 */
.footer {
    text-align: center;
    color: white;
    padding: 30px 0;
    opacity: 0.8;
}

.footer a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

/* 加载状态 */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: white;
}

.loading i {
    font-size: 48px;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功消息 */
.success-message {
    display: none;
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.success-message i {
    font-size: 24px;
    margin-right: 10px;
}

/* 错误消息 */
.error-message {
    display: none;
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.error-message i {
    font-size: 24px;
    margin-right: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 36px;
    }
    
    .pricing-container {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-options {
        flex-direction: column;
        align-items: center;
    }
    
    .billing-toggle {
        flex-direction: column;
    }
}
