/* /css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: wrap;
}

.logo h1 a {
    text-decoration: none;
    color: #667eea;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav a:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: #667eea;
    transition: all 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
    left: 0;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    width: 250px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.search-btn {
    padding: 10px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.main {
    background: white;
    margin: 20px 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.breadcrumb {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb span {
    color: #666;
}

.book-info {
    display: flex;
    padding: 40px 20px;
    gap: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.book-cover {
    flex-shrink: 0;
}

.cover-img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.cover-img:hover {
    transform: scale(1.05);
}

.book-details {
    flex: 1;
}

.book-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.book-meta span {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

.book-meta a {
    color: #667eea;
    text-decoration: none;
}

.book-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.book-desc {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    line-height: 1.8;
    backdrop-filter: blur(5px);
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
    color: #333;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.chapter-list {
    padding: 40px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.section-header h2 {
    font-size: 24px;
    color: #333;
}

.sort-options {
    display: flex;
    gap: 10px;
}

.sort-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-btn.active,
.sort-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.chapter-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.chapter-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chapter-item.new::before {
    content: 'NEW';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    z-index: 1;
}

.chapter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
}

.chapter-title {
    font-weight: 500;
    flex: 1;
}

.chapter-date {
    color: #666;
    font-size: 12px;
}

.load-more {
    text-align: center;
}

.related-books {
    padding: 40px 20px;
    background: #f8f9fa;
}

.section-title {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

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

.book-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
}

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

.book-cover-small img {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
}

.book-info-small {
    flex: 1;
}

.book-info-small h3 {
    margin-bottom: 8px;
}

.book-info-small h3 a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.book-info-small h3 a:hover {
    color: #667eea;
}

.author-small {
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.desc-small {
    color: #888;
    font-size: 12px;
    line-height: 1.5;
}

.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 40px 0 20px;
}

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

.link-group h4 {
    margin-bottom: 15px;
    color: #ecf0f1;
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 8px;
}

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

.link-group a:hover {
    color: #3498db;
}

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

.footer-bottom p {
    margin-bottom: 5px;
    font-size: 14px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav ul {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-input {
        width: 200px;
    }
    
    .book-info {
        flex-direction: column;
        text-align: center;
    }
    
    .cover-img {
        width: 150px;
        height: 210px;
        margin: 0 auto;
    }
    
    .book-title {
        font-size: 24px;
    }
    
    .book-meta {
        justify-content: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .nav ul {
        gap: 15px;
    }
    
    .search-box {
        flex-direction: column;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .book-info {
        padding: 20px 15px;
    }
    
        .book-title {
        font-size: 20px;
    }
    
    .book-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .chapter-list,
    .related-books {
        padding: 20px 15px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .book-card {
        flex-direction: column;
        text-align: center;
    }
    
    .book-cover-small {
        align-self: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

