/* BookVerse - Book Review Blog CSS */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

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

/* 导航栏样式 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 5px;
}
.logo a {
    text-decoration: none;
    color: #2c3e50;
}

.logo .tagline {
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 16px;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 300;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.hero-search input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
}

.hero-search button {
    padding: 15px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.hero-search button:hover {
    background: #2980b9;
}

/* 主体内容区域 */
main {
    padding: 60px 0;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #3498db;
    margin: 15px auto;
}

/* 特色文章网格 */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* 书籍分类区域 */
.book-categories {
    margin-bottom: 80px;
}

.category {
    margin-bottom: 60px;
}

.category h3 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* 书籍卡片样式 */
.book-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.book-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
}

.book-content {
    padding: 20px;
}

.book-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.book-author {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 12px;
    font-style: italic;
}

.book-rating {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.stars {
    color: #f39c12;
    margin-right: 8px;
}

.rating-number {
    font-size: 14px;
    color: #7f8c8d;
}

.book-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #95a5a6;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #2980b9;
}

/* 最新文章网格 */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* 阅读指南区域 */
.reading-guides {
    background: #f8f9fa;
    padding: 60px 0;
    margin: 0 -20px;
}

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

.guide-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-3px);
}

.guide-card h4 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.guide-card p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.friend-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.friend-links a {
    color: #3498db;
    font-weight: 500;
    position: relative;
    padding-left: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-links a::before {
    content: '🔗';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
}

.friend-links a:hover {
    color: #2980b9;
    padding-left: 25px;
    transition: all 0.3s ease;
}

.friend-links a:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero h2 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .hero-search {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .hero-search input,
    .hero-search button {
        width: 100%;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .featured-grid,
    .books-grid,
    .latest-grid,
    .guides-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .category h3 {
        font-size: 24px;
    }
    
    .book-card {
        margin: 0 -10px;
    }
    
    .reading-guides {
        margin: 0 -15px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

/* 特色卡片样式 */
.featured-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.featured-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.featured-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.3;
}

.featured-excerpt {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #7f8c8d;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    margin: 20px 0;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #3498db;
}

.close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}