/* static/css/pricing.css */

/* 使用主页面的CSS变量 */
:root {
    --primary-color: #1e3a8a;
    --primary-hover: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --background-light: #f8fafc;
    --background-card: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 使页脚始终位于页面底部 */
html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}
main {
    flex: 1 0 auto;
}
footer {
    flex-shrink: 0;
}

.pricing-container {
    /* 移除宽度和边距设置，让Bootstrap的container类处理 */
    position: relative;
    overflow: hidden;
    /* 不需要padding，Bootstrap的py-5已经提供 */
}

/* 定价页面标题区域 - 与demo-header保持一致 */
.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.pricing-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(30, 58, 138, 0.1);
}

.pricing-header .subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.pricing-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(30,58,138,0.04)"/><circle cx="80" cy="80" r="1.5" fill="rgba(30,58,138,0.06)"/><circle cx="40" cy="60" r="1" fill="rgba(30,58,138,0.03)"/><circle cx="70" cy="30" r="2" fill="rgba(30,58,138,0.05)"/></svg>') repeat;
    pointer-events: none;
    animation: pricingFloat 25s ease-in-out infinite;
}

@keyframes pricingFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* 样式已移至.pricing-header */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 强制三列布局 */
    gap: 2rem;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    max-width: 1200px; /* 限制最大宽度 */
    margin-left: auto;
    margin-right: auto;
}

.pricing-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: left;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.pricing-card:hover::before {
    transform: scaleX(1);
}

.pricing-card.popular {
    border-color: var(--primary-color);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.02), rgba(255, 255, 255, 0.95), rgba(59, 130, 246, 0.02));
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.15), 0 8px 16px rgba(30, 58, 138, 0.1);
}

.pricing-card.popular::before {
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color), var(--primary-light));
    transform: scaleX(1);
    animation: popularPulse 2s ease-in-out infinite;
}

@keyframes popularPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.popular-badge {
    position: absolute;
    top: -2px;
    right: 2rem;
    background: linear-gradient(135deg, var(--accent-color), #d97706);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: var(--shadow-md);
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { 
        box-shadow: var(--shadow-md);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    }
}

.pricing-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-top: 0.25rem;
}

.pricing-card .plan-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    /* 移动到下方统一定义高度和边距 */
}

.btn {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--background-light), var(--background-card));
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--border-color), var(--background-light));
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-color);
}

.features-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
    padding: 0.75rem 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0.5rem;
}

.features-list li:hover {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.02), rgba(59, 130, 246, 0.05));
    transform: translateX(4px);
}

.features-list .checkmark {
    color: var(--accent-color);
    margin-right: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent-color), #d97706);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* Bootstrap的container和py-5已经处理了响应式间距 */
    
    .pricing-header h1 {
        font-size: 2.5rem;
    }
    
    .pricing-header .subtitle {
        font-size: 1.1rem;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr; /* 移动端单列布局 */
        gap: 1.5rem;
    }
    
    .pricing-card {
        padding: 2rem;
        border-radius: 20px;
        min-height: auto; /* 移动端取消固定高度 */
    }
    
    .pricing-card h2 {
        font-size: 1.75rem;
    }
    
    .pricing-card .price {
        font-size: 2.25rem;
    }
    
    .popular-badge {
        right: 1.5rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    /* Bootstrap的容器类已经处理了响应式布局 */
    
    .pricing-header h1 {
        font-size: 2rem;
    }
    
    .pricing-header .subtitle {
        font-size: 1rem;
    }
    
    .pricing-card {
        padding: 1.5rem;
        border-radius: 16px;
        min-height: auto; /* 小屏幕取消固定高度 */
    }
    
    .pricing-card h2 {
        font-size: 1.5rem;
    }
    
    .pricing-card .price {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .features-list li {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .features-list .checkmark {
        margin-right: 0.75rem;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
    
    .popular-badge {
        right: 1rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* 推荐阅读区域样式 */
.recommended-reading {
    margin-top: 4rem;
    margin-bottom: 5rem; /* 与首页disclaimer-section保持一致的底部间距 */
    position: relative;
    z-index: 1;
}

.recommended-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.8));
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.recommended-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color), var(--primary-light));
}

.recommended-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.03), transparent);
    pointer-events: none;
}

.recommended-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.recommended-title i {
    color: var(--accent-color);
    font-size: 1.25rem;
}

.recommended-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.recommended-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.02), rgba(59, 130, 246, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(30, 58, 138, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recommended-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-color), var(--primary-light));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.recommended-link:hover {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(59, 130, 246, 0.1));
    transform: translateX(4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.recommended-link:hover::before {
    transform: scaleY(1);
}

.recommended-link i {
    color: var(--primary-color);
    font-size: 1.125rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.recommended-link a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.recommended-link:hover a {
    color: var(--primary-color);
}

/* 确保价格卡片高度一致 */
.pricing-card {
    display: flex;
    flex-direction: column;
    min-height: 650px; /* 增加最小高度适应更多内容 */
}

.pricing-card .plan-description {
    height: 60px; /* 固定高度确保完全一致 */
    margin-bottom: 2rem;
    display: flex;
    align-items: center; /* 垂直居中对齐 */
    text-align: left;
}

.pricing-card .features-list {
    flex-grow: 1; /* 让功能列表占据剩余空间 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 功能列表从顶部开始 */
}

.pricing-card .btn {
    margin-top: auto; /* 将按钮推到底部 */
    flex-shrink: 0; /* 防止按钮被压缩 */
}

/* 响应式设计 - 推荐阅读 */
@media (max-width: 768px) {
    .recommended-reading {
        margin-top: 4rem; /* 保持充足的间距 */
        margin-bottom: 3rem; /* 与首页平板端保持一致 */
    }
    
    .recommended-content {
        padding: 2rem;
        border-radius: 16px;
    }
    
    .recommended-title {
        font-size: 1.25rem;
        text-align: center;
        justify-content: center;
    }
    
    .recommended-links {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .recommended-link {
        padding: 0.875rem 1.25rem;
    }
    
    .recommended-link a {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .recommended-reading {
        margin-top: 3rem; /* 小屏幕保持合适间距 */
        margin-bottom: 2.5rem; /* 与首页小屏幕端保持一致 */
    }
    
    .recommended-content {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .recommended-title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .recommended-link {
        padding: 0.75rem 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .recommended-link a {
        font-size: 0.9rem;
    }
}
