/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
header {
    background-color: #2c3e50;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.logo span {
    color: #3498db;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

.mobile-menu {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 英雄区样式 */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 5rem 5%;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    outline: none;
}

.search-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #2980b9;
}

/* 主要内容区基础样式 */
main {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #3498db;
    margin: 1rem auto;
}

/* 分类卡片样式 */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.category-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.category-card ul {
    list-style: none;
}

.category-card li {
    margin-bottom: 0.5rem;
}

.category-card a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.category-card a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* AI生成区样式 */
.ai-generator {
    background-color: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 4rem;
}

.generator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    grid-column: 1 / -1;
    min-height: 100px;
}

.generate-btn {
    grid-column: 1 / -1;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.generate-btn:hover {
    background-color: #219653;
}

/* 热门案例区样式 */
.popular-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.example-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.example-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.example-card .preview {
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.example-card a {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.example-card a:hover {
    background-color: #2980b9;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 5%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h3 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #3498db;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .ai-generator {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* 辅助SEO的样式 */
.keyword-highlight {
    font-weight: bold;
    color: #2c3e50;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

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

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Obituary Examples 内页样式 */
.example-detail {
    max-width: 900px;
    margin: 0 auto;
}

.intro {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 3rem;
    line-height: 1.8;
    text-align: center;
}

.full-example {
    margin-bottom: 4rem;
    padding: 2.5rem;
}

.full-example h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.example-content {
    color: #333;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.example-content p {
    margin-bottom: 1rem;
}

.example-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-btn, .edit-btn, .cta-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.download-btn {
    background-color: #3498db;
    color: white;
}

.download-btn:hover {
    background-color: #2980b9;
}

.edit-btn {
    background-color: #27ae60;
    color: white;
}

.edit-btn:hover {
    background-color: #219653;
}

/* 写作指南样式 */
.writing-guide {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 4rem;
}

.writing-guide h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.guide-list {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.guide-list li {
    margin-bottom: 1rem;
}

.cta-btn {
    background-color: #e67e22;
    color: white;
}

.cta-btn:hover {
    background-color: #d35400;
}

/* 相关案例样式 */
.related-examples h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.related-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #3498db;
    text-decoration: none;
    transition: transform 0.3s;
}

.related-card:hover {
    transform: translateY(-3px);
    color: #2980b9;
}