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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

/* 头部 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
}

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

.site-branding h1 {
    font-size: 24px;
    margin: 0;
}

.site-branding a {
    color: #333;
    text-decoration: none;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 10px;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    padding: 5px 10px;
}

.main-navigation a:hover {
    color: #0073aa;
}

.header-search form {
    display: flex;
}

.header-search input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 200px;
}

.header-search button {
    padding: 8px 15px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 主要内容区 */
.site-content {
    padding: 30px 0;
}

/* 小说网格 */
.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.novel-item {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.novel-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.novel-info {
    padding: 15px;
}

.novel-title {
    font-size: 18px;
    margin: 0 0 10px;
}

.novel-title a {
    color: #333;
    text-decoration: none;
}

.novel-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.novel-excerpt {
    font-size: 14px;
    color: #777;
}

/* 小说详情页 */
.novel-cover-large {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 300px;
}

.novel-description {
    margin-bottom: 30px;
}

.chapter-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.chapter-list li {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 3px;
}

.chapter-list a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
}

.chapter-list a:hover {
    background: #0073aa;
    color: #fff;
}

/* 章节阅读页 */
.chapter-nav {
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.chapter-nav a {
    display: inline-block;
    padding: 8px 15px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
}

.chapter-nav a:hover {
    background: #0073aa;
    color: #fff;
}

.chapter-content {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    line-height: 1.8;
    font-size: 18px;
}

/* 页脚 */
.site-footer {
    background: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

/* 书架按钮 */
.shelf-action {
    margin: 10px 0;
}
.biquge-shelf-toggle {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.biquge-shelf-toggle.shelf-add {
    background: #0073aa;
    color: #fff;
}
.biquge-shelf-toggle.shelf-remove {
    background: #dc3545;
    color: #fff;
}

/* 历史列表 */
.history-list {
    list-style: none;
    padding: 0;
}
.history-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}
.history-novel {
    font-weight: bold;
    width: 30%;
}
.history-chapter {
    width: 40%;
}
.history-time {
    width: 20%;
    color: #666;
    font-size: 0.9em;
}
@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .history-novel, .history-chapter, .history-time {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-search input[type="search"] {
        width: 100%;
    }
    
    .novel-cover-large {
        float: none;
        max-width: 100%;
        margin: 0 0 20px;
    }
}