/* 主页专用样式 */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
}

.hero-section h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    color: white;
    transition: all 0.3s;
}

.btn-primary {
    background: #4caf50;
    color: white;
}

.btn-primary:hover {
    background: #388e3c;
}

.btn-secondary {
    background: #66bb6a;
    color: white;
}

.btn-secondary:hover {
    background: #43a047;
}

.btn-novel {
    background: #81c784;
    color: white;
}

.btn-novel:hover {
    background: #66bb6a;
}

.btn-farseer {
    background: #a5d6a7;
    color: #2e7d32;
}

.btn-farseer:hover {
    background: #81c784;
    color: white;
}

.about-section {
    padding: 3rem 0;
    text-align: center;
}

.site-footer {
    background: #2e7d32;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}


/* 新增：概率分析工具组件样式 */
.probability-tool-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.probability-tool-section h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.probability-tool-section p {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
}

#probability-component-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.loading-message, .error-message {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fallback-link {
    text-align: center;
    margin-top: 1rem;
}

.fallback-link a {
    color: #3498db;
    text-decoration: none;
}

.fallback-link a:hover {
    text-decoration: underline;
}

/* 新增：样式切换按钮样式 */
.text-style-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none; /* 添加这一行去除下划线 */
}

.text-style-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 新增：可样式化文本框样式 */
.features-section {
    padding: 3rem 0;
    text-align: center;
}

.styleable-textbox {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.intro-text {
    line-height: 1.8;
    margin: 0;
}

.intro-text.style-1 {
    color: #3498db;
    font-size: 1.1rem;
    font-weight: bold;
}

.intro-text.style-2 {
    color: #e74c3c;
    font-style: italic;
    font-size: 1.2rem;
}

.intro-text.style-3 {
    color: #2ecc71;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-size: 1.1rem;
}

/* 以下是针对便携式设备的响应式样式 */
@media screen and (max-width: 768px) {
    /* 英雄区域响应式样式 */
    .hero-section {
        padding: 3rem 1rem;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    /* 按钮区域响应式样式 */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .btn, .text-style-btn {
        width: 100%;
        max-width: 300px;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    /* 文本框响应式样式 */
    .styleable-textbox {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .intro-text {
        font-size: 0.95rem;
    }
    
    /* 其他区域响应式样式 */
    .about-section, .features-section {
        padding: 2rem 1rem;
    }
    
    .site-footer {
        padding: 1.5rem 1rem;
    }
}

/* 针对小屏幕手机的额外优化 */
@media screen and (max-width: 480px) {
    .hero-section h2 {
        font-size: 1.8rem;
    }
    
    .btn, .text-style-btn {
        font-size: 0.85rem;
        padding: 10px;
    }
    
    .intro-text {
        font-size: 0.9rem;
    }
}

/* 注释：本页面在便携式设备上的兼容性情况
   1. 已添加viewport meta标签，确保在移动设备上正确缩放
   2. 使用了响应式媒体查询，针对768px和480px断点进行优化
   3. 导航菜单在移动设备上转为垂直排列
   4. 按钮区域在移动设备上转为垂直排列，确保触摸区域足够大
   5. 字体大小和间距根据屏幕尺寸自动调整
   6. 内容区域设置了适当的内边距，避免紧贴屏幕边缘
   7. 使用了flex-wrap属性，确保内容在小屏幕上不会溢出
   8. 保持了良好的对比度和可读性，适合移动设备查看
*/

/* 新增：更新日志区域样式 */
.changelog-section {
    margin: 2rem auto;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
    border-radius: 12px;
    border-left: 4px solid #4caf50;
    max-width: 900px; /* 限制最大宽度为900px */
    width: 90%; /* 设置相对宽度 */
}

.latest-update {
    line-height: 1.6;
    text-align: left; /* 确保整个更新区域左对齐 */
}

/* 并排显示的更新容器 */
.updates-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.update-section {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: left;
}

.update-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 0.5rem;
    text-align: left;
    border-bottom: 2px solid #c8e6c9;
    padding-bottom: 0.5rem;
}

.update-version {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 0.5rem;
    text-align: left;
}

.update-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    text-align: left;
}

.update-content {
    text-align: left;
}

.update-category {
    font-weight: bold;
    color: #495057;
    margin: 0.5rem 0 0.3rem 0;
    text-align: left;
}

.update-item {
    margin-left: 1rem;
    color: #495057;
    margin-bottom: 0.3rem;
    text-align: left;
}

.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.error {
    text-align: center;
    color: #dc3545;
    font-style: italic;
}

.update-item-card {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: left;
}

.update-item-card .update-date {
    font-size: 1rem;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #c8e6c9;
}

.toggle-button-container {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.toggle-button {
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.toggle-button:hover {
    background: #388e3c;
}

/* 更新日志区域响应式样式 */
@media screen and (max-width: 768px) {
    .changelog-section {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    
    .update-content {
        padding: 0.8rem;
    }
    
    .update-version {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 480px) {
    .changelog-section {
        margin: 1rem 0;
        padding: 0.8rem;
    }
    
    .update-content {
        padding: 0.6rem;
    }
    
    .update-item {
        margin-left: 0.5rem;
    }
    
    .update-item-card {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .toggle-button {
        width: 100%;
        padding: 12px;
    }
}