/* AI Sense 网站样式 - 优化版 */

/* 导入Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    color: #333;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 导航栏样式 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Logo样式 */
.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin: 0;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover h1 {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    border: 1px solid transparent;
}

.nav-menu a:hover {
    color: #667eea;
    background: rgba(102,126,234,0.08);
    border-color: rgba(102,126,234,0.2);
    transform: translateY(-2px);
}

/* 主要内容区域 */
main.container {
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
}

/* 首页Hero区域 */
.hero {
    text-align: center;
    padding: 5rem 2rem 4rem;
    background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.08) 100%);
    border-radius: 16px;
    margin-bottom: 3rem;
    border: 1px solid rgba(102,126,234,0.1);
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.2rem;
    letter-spacing: -1px;
}

.hero .tagline {
    font-size: 1.4rem;
    color: #555;
    font-weight: 500;
    line-height: 1.6;
}

/* 最新内容区域 */
.latest-content {
    margin-bottom: 4rem;
}

.latest-content h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #333;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

.post-preview {
    background: #fff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.post-preview:hover {
    border-color: #667eea;
    box-shadow: 0 12px 32px rgba(102,126,234,0.15);
    transform: translateY(-4px);
}

.post-preview h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.post-preview h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
}

.post-preview h3 a:hover {
    color: #667eea;
}

.post-preview .meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.post-preview p {
    color: #666;
    margin: 0;
    line-height: 1.7;
    font-size: 1rem;
}

/* 核心栏目区域 */
.categories {
    margin-bottom: 3rem;
}

.categories h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #333;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

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

.category-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.category-card:hover {
    border-color: #667eea;
    box-shadow: 0 12px 32px rgba(102,126,234,0.15);
    transform: translateY(-6px);
}

.category-card h3 {
    font-size: 1.4rem;
    margin: 0 0 1.2rem 0;
    color: #333;
    font-weight: 600;
}

.category-card p {
    color: #666;
    margin-bottom: 1.8rem;
    line-height: 1.7;
    font-size: 1rem;
}

/* 分类列表页 */
.category-list {
    max-width: 900px;
    margin: 0 auto;
}

.category-list h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.category-list > p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* 文章列表项 */
.post-item {
    background: #fff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.post-item:hover {
    border-color: #667eea;
    box-shadow: 0 12px 32px rgba(102,126,234,0.15);
    transform: translateY(-4px);
}

.post-item h2, .post-item h3 {
    margin: 0 0 1rem 0;
}

.post-item h2 a, .post-item h3 a {
    color: #333;
    text-decoration: none;
    font-size: 1.5rem;
    transition: color 0.3s ease;
    font-weight: 600;
}

.post-item h2 a:hover, .post-item h3 a:hover {
    color: #667eea;
}

.post-item .meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.post-item p {
    color: #666;
    margin: 0;
    line-height: 1.7;
    font-size: 1rem;
}

/* 文章页面 */
.post {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.08) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102,126,234,0.1);
}

.post-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 700;
    line-height: 1.3;
}

.post-meta {
    color: #888;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.post-meta span {
    padding: 0.3rem 0.8rem;
    background: rgba(255,255,255,0.8);
    border-radius: 20px;
    font-weight: 500;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #333;
}

.post-content h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.8rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.post-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: #555;
    font-size: 1.5rem;
    font-weight: 600;
}

.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #666;
    font-size: 1.3rem;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    line-height: 1.9;
}

.post-content li {
    margin-bottom: 0.8rem;
}

.post-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.8rem;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.post-content th, .post-content td {
    padding: 1rem 1.2rem;
    border: 1px solid #e8e8e8;
    text-align: left;
}

.post-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.post-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.post-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e8e8e8;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-tags {
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(102,126,234,0.1);
    color: #667eea;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 页面 */
.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

.page p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102,126,234,0.3);
    font-size: 0.95rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
    filter: brightness(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 0;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
        padding: 0.5rem 0.9rem;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero .tagline {
        font-size: 1.1rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-header {
        padding: 2rem 1.5rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.3rem;
    }
    
    .category-list h1 {
        font-size: 1.8rem;
    }
    
    .categories h2,
    .latest-content h2 {
        font-size: 1.6rem;
    }
    
    main.container {
        padding: 2rem 1rem;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .post-navigation .btn {
        width: 100%;
        text-align: center;
    }
}

/* 页脚 */
footer {
    background: #fff;
    padding: 3rem 0 2rem;
    text-align: center;
    color: #999;
    margin-top: 4rem;
    border-top: 1px solid #eee;
}

footer p {
    margin-bottom: 0.8rem;
    line-height: 1.8;
}

footer a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

footer a:hover {
    color: #667eea;
    background: rgba(102,126,234,0.08);
}

footer .footer-links {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
}

footer .footer-links a {
    margin: 0 0.8rem;
    font-size: 0.9rem;
}

footer .copyright {
    font-size: 0.85rem;
    color: #bbb;
    margin-top: 1.5rem;
}

/* 额外优化 */
.category-info,
.robot-info,
.novel-info {
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid #667eea;
}

.category-info ul,
.robot-info ul,
.novel-info ul {
    margin: 0.5rem 0 0 1.5rem;
    line-height: 1.8;
}

.chapter-list {
    margin-top: 2rem;
}

.chapter-list .post-item {
    margin-bottom: 1rem;
    padding: 1.5rem;
}

.chapter-list .post-item h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chapter-list .post-item h3 a {
    font-size: 1.1rem;
}

.chapter-list .meta {
    color: #666;
    font-size: 0.85rem;
    margin: 0.5rem 0 0 0;
}
