body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f8f9fa;
    color: #343a40;
}

header {
    background: #343a40;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 a {
    color: #fff;
    text-decoration: none;
    font-size: 1.8rem;
}

nav a {
    color: #f8f9fa;
    padding: 0 15px;
    text-decoration: none;
    font-size: 1rem;
}
nav a:hover {
    color: #adb5bd;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.9em;
}

.novel-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.novel-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.novel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.novel-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.novel-item h3 {
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.novel-item h3 a {
    text-decoration: none;
    color: #007bff;
}
.novel-item h3 a:hover {
    text-decoration: underline;
}

.novel-item p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 5px 0 0;
}


.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding: 0;
    list-style: none;
}

.pagination a, .pagination span {
    padding: 8px 15px;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #007bff;
    margin: 0 3px;
    border-radius: 5px;
}
.pagination a:hover {
    background-color: #e9ecef;
}

.pagination .current {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}
.pagination .disabled {
    color: #6c757d;
    pointer-events: none;
}


.novel-details {
    display: flex;
    gap: 30px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.novel-details .icon img {
    max-width: 200px;
    border-radius: 8px;
}

.novel-details .info h1 {
    margin-top: 0;
    font-size: 2rem;
    color: #343a40;
}
.novel-details .info .meta {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.novel-details .info .description {
    line-height: 1.8;
}

.novel-tags {
    margin-top: 15px;
}
.novel-tags a {
    display: inline-block;
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 15px;
    text-decoration: none;
    color: #495057;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.9em;
}
.novel-tags a:hover {
    background: #ced4da;
}

.related-novels {
    margin-top: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
.related-novels h2 {
    margin-top: 0;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.tag-cloud {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    text-align: center;
}
.tag-cloud a {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 8px 18px;
    margin: 7px;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 1rem;
}
.tag-cloud a:hover {
    background: #0056b3;
}
.tag-cloud a .count {
    font-size: 0.8em;
    margin-left: 5px;
    color: #e9ecef;
} 