/* 多源小说阅读网样式 */

/* 重置样式 */
* {
    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-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px 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;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.logo i {
    margin-right: 8px;
    color: #ffd700;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav a:hover,
.nav a.active {
    color: #ffd700;
    background-color: rgba(255,255,255,0.1);
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box form {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 10px 15px;
    border: none;
    border-radius: 25px 0 0 25px;
    width: 300px;
    font-size: 14px;
    outline: none;
}

.search-box button {
    padding: 10px 15px;
    background: #ffd700;
    border: none;
    border-radius: 0 25px 25px 0;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background: #ffed4e;
}

/* 主要内容 */
.main {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* 轮播图 */
.banner {
    margin-bottom: 40px;
}

.banner-slider {
    position: relative;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.banner-item {
    position: relative;
    height: 100%;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px;
}

.banner-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

/* 快速搜索 */
.quick-search {
    margin-bottom: 40px;
}

.search-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.search-form h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.search-inputs {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.search-inputs input {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    width: 300px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-inputs input:focus {
    border-color: #667eea;
}

.search-inputs select {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background: white;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.search-inputs button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-inputs button:hover {
    transform: translateY(-2px);
}

/* 分类导航 */
.categories {
    margin-bottom: 40px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.category-item a {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: #333;
}

.category-item i {
    font-size: 24px;
    margin-right: 15px;
    color: #667eea;
}

.category-item span {
    font-size: 16px;
    font-weight: 500;
}

/* 书籍网格 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.book-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.book-cover {
    height: 200px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.book-item:hover .book-cover img {
    transform: scale(1.05);
}

.book-info {
    padding: 20px;
}

.book-title {
    margin-bottom: 10px;
}

.book-title a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
}

.book-title a:hover {
    color: #667eea;
}

.book-author {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.book-intro {
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.book-category {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    color: #666;
}

.book-status {
    background: #e8f5e8;
    color: #4caf50;
    padding: 4px 8px;
    border-radius: 12px;
}

/* 书籍列表 */
.book-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.book-list-item {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.book-list-item:hover {
    transform: translateX(5px);
}

.book-cover-small {
    width: 80px;
    height: 120px;
    flex-shrink: 0;
}

.book-cover-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-list-item .book-info {
    flex: 1;
    padding: 15px;
}

.book-list-item .book-title {
    margin-bottom: 8px;
}

.book-list-item .book-title a {
    font-size: 16px;
}

.book-last-chapter {
    color: #667eea;
    font-size: 14px;
    margin-bottom: 5px;
}

.book-update-time {
    color: #999;
    font-size: 12px;
}

/* 搜索页面样式 */
.search-section {
    margin-bottom: 40px;
}

.search-form-large {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.search-form-large h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.search-inputs-large {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.search-inputs-large input {
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    width: 400px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-inputs-large input:focus {
    border-color: #667eea;
}

.search-inputs-large select {
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    background: white;
    font-size: 16px;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

.search-inputs-large button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-inputs-large button:hover {
    transform: translateY(-2px);
}

/* 搜索结果 */
.search-results {
    margin-bottom: 40px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.results-header h3 {
    font-size: 20px;
    color: #333;
}

.results-info {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.no-results i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results p {
    color: #666;
    margin-bottom: 10px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.result-item:hover {
    transform: translateX(5px);
}

.result-item .book-cover {
    width: 100px;
    height: 150px;
    flex-shrink: 0;
}

.result-item .book-info {
    flex: 1;
    padding: 20px;
}

.result-item .book-title {
    margin-bottom: 10px;
}

.result-item .book-title a {
    font-size: 18px;
    color: #333;
    text-decoration: none;
}

.result-item .book-title a:hover {
    color: #667eea;
}

.result-item .book-author {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.result-item .book-intro {
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.result-item .book-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.book-source {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    color: #666;
}

/* 热门搜索 */
.hot-searches {
    margin-bottom: 40px;
}

.hot-searches h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tag {
    background: white;
    color: #667eea;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border: 2px solid #e0e0e0;
}

.search-tag:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.search-tag .count {
    color: #999;
    font-size: 12px;
}

/* 搜索建议 */
.search-suggestions {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-suggestions h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.suggestion-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.suggestion-item h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.suggestion-item ul {
    list-style: none;
    padding-left: 0;
}

.suggestion-item li {
    padding: 5px 0;
    color: #666;
    font-size: 14px;
    position: relative;
    padding-left: 20px;
}

.suggestion-item li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    background: #f0f0f0;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.category-tag:hover {
    background: #667eea;
    color: white;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .current {
    background: #667eea;
    color: white;
    border: 1px solid #667eea;
}

.pagination .dots {
    background: transparent;
    color: #666;
    border: none;
}

/* 底部 */
.footer {
    background: #333;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: #ffd700;
    font-size: 18px;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav ul {
        gap: 15px;
    }
    
    .search-box input {
        width: 250px;
    }
    
    .search-inputs,
    .search-inputs-large {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-inputs input,
    .search-inputs-large input {
        width: 100%;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .book-list-item {
        flex-direction: column;
    }
    
    .book-cover-small {
        width: 100%;
        height: 200px;
    }
    
    .result-item {
        flex-direction: column;
    }
    
    .result-item .book-cover {
        width: 100%;
        height: 200px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .nav ul {
        gap: 10px;
    }
    
    .nav a {
        padding: 6px 8px;
        font-size: 14px;
    }
    
    .search-box input {
        width: 200px;
        padding: 8px 12px;
    }
    
    .search-box button {
        padding: 8px 12px;
    }
    
    .banner-content h2 {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .book-grid {
        grid-template-columns: 1fr;
    }
}
