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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* 分类导航 - 与header融合 */
.category-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-nav .container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.category-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.category-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-nav a.active {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.language-switch select {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background: white;
    color: #333;
}

/* 头部搜索框样式 */
.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
}

.header-search .search-form {
    margin: 0;
    max-width: 100%;
}

.header-search .search-form input {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
    height: 44px;
    padding: 0.8rem 1.2rem;
    border-radius: 8px 0 0 8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.header-search .search-form input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.header-search .search-form input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 极光.1);
}

.header-search .search-form button {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.7);
    color: white;
    backdrop-filter: blur(10px);
    height: 44px;
    padding: 0.8rem 1.2rem;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search .search-form button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* 主要内容区域 */
.main {
    padding: 2rem 0;
}

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

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

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 搜索英雄区域 */
.search-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.search-hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.search-hero h2 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.4rem;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.search-box-hero {
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-container-hero {
    max-width: 800px;
    margin: 0 auto;
}

.search-form-hero {
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-form-hero input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 60px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: #333;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 56px;
}

.search-form-hero input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.search-form-hero input::placeholder {
    color: #888;
}

.search-btn-hero {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-btn-hero:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.search-controls-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.search-suggestions-hero {
    width: 100%;
    order: 1;
}

.search-filters-hero {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    order: 2;
}

.search-suggestions-hero .suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
}

.search-suggestions-hero .suggestion-tags span {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.search-suggestions-hero .suggestion-tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.search-suggestions-hero .suggestion-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    text-decoration: none;
}

.search-filters-hero {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.search-filters-hero .filter-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.search-filters-hero label {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.search-filters-hero select {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-filters-hero select:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.search-filters-hero select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.search-filters-hero option {
    background: #2d3748;
    color: white;
}

/* 搜索容器 */
.search-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box {
    max-width: 800px;
    margin: 0 auto;
}

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

.search-form input {
    flex: 1;
    padding: 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 8px 0 0 8px;
    font-size: 1.1rem;
}

.search-form button {
    padding: 1.2rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
}

.search-form button:hover {
    background: #5a67d8;
}

/* 搜索建议 */
.search-suggestions {
    margin-top: 2rem;
    text-align: center;
}

.search-suggestions h4 {
    margin-bottom: 1rem;
    color: #666;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.suggestion-tag {
    padding: 0.6rem 1.2rem;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.suggestion-tag:hover {
    background: #667eea;
    color: white;
}

/* 搜索筛选 */
.search-filters {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.filter-group label {
    font-weight: 500;
    color: #333;
}

.filter-group select {
    padding: 0.6rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
}

/* 搜索结果 */
.search-results {
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.results-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.results-stats {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.no-results h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.3rem;
}

.no-results p {
    margin-bottom: 1rem;
}

.no-results ul {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.no-results li {
    margin: 0.5rem 0;
}

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

.no-results a:hover {
    text-decoration: underline;
}

.recommendations {
    margin-top: 2rem;
}

.recommendations h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.recommendations h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #667eea;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pagination-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: #666;
    font-size: 0.9rem;
}

/* 搜索结果卡片特殊样式 */
.search-result-card {
    position: relative;
}

.chapter-matches {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.chapter-matches h5 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
}

.matched-chapters {
    list-style: none;
    padding: 0;
    margin: 0;
}

.matched-chapters li {
    margin: 0.3rem 0;
}

.chapter-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.chapter-link:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.more-chapters {
    color: #6c757d;
    font-size: 0.8rem;
    font-style: italic;
}

/* 搜索高亮 */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    font-weight: 500;
}

/* 搜索结果统计 */
.results-count {
    font-weight: 500;
    color: #495057;
}

.results-time {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 热门搜索词区域 */
.hot-search-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.hot-search-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.2rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.8rem;
}

.hot-search-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.hot-search-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.hot-search-tag {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    color: #4a5568;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.hot-search-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

.hot-search-tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

.hot-search-tag:hover::before {
    left: 100%;
}

.hot-search-desc {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hot-search-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .hot-search-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .hot-search-tags {
        gap: 0.6rem;
    }
    
    .hot-search-tag {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hot-search-section {
        padding: 1rem;
    }
    
    .hot-search-tags {
        justify-content: flex-start;
    }
    
    .hot-search-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* 书籍网格 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.book-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.book-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card a:hover {
    text-decoration: none;
}

.book-cover {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.book-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.3;
}

.book-card .author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.book-card .status {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.book-card .description {
    color: #777;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.rating {
    color: #ffc107;
    font-weight: bold;
    font-size: 0.9rem;
}

.word-count {
    color: #6c757d;
    font-size: 0.8rem;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: #667eea;
    text-decoration: none;
}

.category-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
}

/* 推荐栏目样式 */
.featured-books,
.new-books,
.popular-books,
.editor-picks {
    margin: 4rem 0;
}

.featured-books h3,
.new-books h3,
.popular-books h3,
.editor-picks h3 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: #333;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.featured-books h3::after,
.new-books h3::after,
.popular-books h3::after,
.editor-picks h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* 阅读统计 */
.reading-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h4 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: white;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* 链接通用样式 */
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

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

/* 导航链接特殊样式 */
.nav a,
.category-nav a {
    text-decoration: none;
}

.nav a:hover,
.category-nav a:hover {
    text-decoration: none;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

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

.footer nav {
    display: flex;
    gap: 1.5rem;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer a:hover {
    color: white;
}

/* 搜索页响应式设计 */
@media (max-width: 768px) {
    .search-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul {
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form input,
    .search-form button {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer nav {
        justify-content: center;
    }
}

/* 搜索结果页增强样式 */
.search-result-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

.search-result-card:hover::before {
    left: 100%;
}

.search-result-card .book-cover {
    position: relative;
    overflow: hidden;
}

.search-result-card .book-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-result-card:hover .book-cover::after {
    opacity: 1;
}

.chapter-matches {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.search-result-card:hover .chapter-matches {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateX(5px);
}

.chapter-link {
    transition: all 0.2s ease;
}

.chapter-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea !important;
    transform: translateX(5px);
}

/* 搜索关键词高亮动画 */
.search-keyword {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    animation: pulse 2s infinite;
}

/* 单行书籍搜索结果样式 */
.book-results-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.book-result-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.book-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.2);
}

.book-result-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-info-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.book-cover-small {
    flex-shrink: 0;
    width: 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.book-cover-small {
    position: relative;
}

.book-cover-small a {
    display: block;
    transition: transform 0.2s ease;
}

.book-cover-small a:hover {
    transform: translateY(-2px);
}

.book-cover-small {
    position: relative;
    width: 80px;
    height: 100px;
    flex-shrink: 0;
}

.book-cover-small a {
    display: block;
    transition: transform 0.2s ease;
    width: 100%;
    height: 100%;
}

.book-cover-small a:hover {
    transform: translateY(-2px);
}

.book-cover-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-cover-small a:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.book-cover-small a:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.book-basic-info h4 a {
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
}

.book-basic-info h4 a:hover {
    color: #667eea;
    text-decoration: underline;
}

.book-basic-info {
    flex: 1;
    min-width: 0;
}

.book-basic-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.book-meta-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.book-meta-row .author {
    color: #667eea;
    font-weight: 500;
}

.book-meta-row .status {
    background: #48bb78;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.book-meta-row .rating {
    color: #f59e0b;
    font-weight: 500;
}

.book-meta-row .word-count {
    color: #6b7280;
    font-weight: 400;
}

.book-description {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chapter-matches-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border-left: 3px solid #667eea;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.8rem;
}

.chapter-matches-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.chapter-match-label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.chapter-match-inline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    text-decoration: none;
    color: #667eea;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.chapter-match-inline:hover {
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-1px);
}

.view-all-chapters {
    padding: 0.3rem 0.6rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.view-all-chapters:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.chapter-number {
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
}

.chapter-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1f2937;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-snippet {
    font-size: 0.8rem;
    color: #6b7280;
    display: none; /* 移动端隐藏片段 */
}

.view-all-chapters {
    background: #667eea;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.view-all-chapters:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* 分页按钮增强样式 */
.pagination-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pagination-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.pagination-btn:hover::before {
    left: 100%;
}

/* 单行书籍搜索结果样式 */
.book-results-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.book-result-item {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.book-result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.book-result-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.book-info-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.book-cover-small {
    flex-shrink: 0;
    width: 120px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.book-result-item:hover .book-cover-small {
    transform: scale(1.05);
}

.book-cover-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-basic-info {
    flex: 1;
    min-width: 0;
}

.book-basic-info h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.book-meta-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.book-meta-row .author {
    color: #667eea;
    font-weight: 600;
    font-size: 0.95rem;
}

.book-meta-row .status {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.book-meta-row .rating {
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.9rem;
}

.book-meta-row .word-count {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

.book-description {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chapter-matches-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '📖';
    font-size: 1.2rem;
}

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

.chapter-match-card {
    background: white;
    padding: 1.2rem;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-match-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    text-decoration: none;
    color: #374151;
}

.chapter-number {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    align-self: flex-start;
}

.chapter-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.chapter-snippet {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-all-chapters {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-all-chapters:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    color: white;
}

.view-all-chapters::after {
    content: '→';
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .book-info-header {
        flex-direction: column;
        text-align: center;
    }
    
    .book-cover-small {
        align-self: center;
    }
    
    .book-meta-row {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .matched-chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .book-result-item {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-search {
        max-width: 100%;
        order: 3;
    }
    
    .search-form-header {
        flex-direction: row;
    }
    
    .search-form-header input {
        border-radius: 20px 0 0 20px;
    }
    
    .search-form-header button {
        border-radius: 0 20px 20px 0;
    }
    
    .book-info-header {
        flex-direction: column;
        text-align: center;
    }
    
    .book-cover-small {
        align-self: center;
    }
    
    .book-meta-row {
        justify-content: center;
        gap: 0.6rem;
    }
    
    .matched-chapters-single {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .chapter-match-single {
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
    }
    
    .chapter-title {
        white-space: normal;
        text-overflow: clip;
    }
}

@media (max-width: 480px) {
    .book-meta-row {
        flex-direction: column;
        gap: 0.4rem;
        align-items: center;
    }
    
    .chapter-matches-section {
        padding: 0.8rem;
    }
    
    .search-form-header input {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 书籍详情页图片优化 */
.book-detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.book-cover {
    flex-shrink: 0;
    width: 280px;
    height: 373px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 100%;
}

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

.book-info {
    flex: 1;
    min-width: 0;
}

.book-info h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.book-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.book-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #4a5568;
}

.book-meta .author {
    color: #667eea;
    font-weight: 600;
}

.book-meta .status {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    width: fit-content;
}

.book-meta .category {
    color: #805ad5;
    font-weight: 500;
}

.book-meta .word-count {
    color: #718096;
}

.book-meta .rating {
    color: #f59e0b;
    font-weight: 600;
    font-size: 1.1rem;
}

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

.btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    border: 2px solid #cbd5e0;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 内联作品简介样式 */
.book-description-inline {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.description-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.description-content {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
}

.description-content p {
    margin: 0;
    text-align: justify;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .book-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .book-cover {
        width: 240px;
        height: 320px;
    }
    
    .book-info {
        text-align: center;
    }
    
    .book-meta {
        align-items: center;
    }
    
    .book-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .book-cover {
        width: 200px;
        height: 267px;
    }
    
    .book-info h1 {
        font-size: 1.7rem;
    }
    
    .book-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .book-cover {
        width: 160px;
        height: 213px;
    }
    
    .book-info h1 {
        font-size: 1.5rem;
    }
    
    .book-meta span {
        font-size: 0.9rem;
    }
}

/* 辅助类 */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}