/*
Theme Name: Novel Lite
Description: A clean, light, and highly organized modern theme for novel sharing.
Author: Antigravity
Version: 2.0.0
*/

:root {
    --primary: #2563eb;
    --primary-soft: #eff6ff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.search-form {
    position: relative;
}

.search-form input {
    background: var(--bg-main);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    width: 250px;
    outline: none;
}

/* Grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

/* Novel Card */
.novel-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.novel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-thumb {
    position: relative;
    aspect-ratio: 2/3;
    background: #eee;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-cat {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.card-body {
    padding: 12px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-author {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Single */
.single-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
}

.single-sidebar img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.single-content h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.single-meta {
    color: var(--text-light);
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-outline {
    border: 1px solid var(--border);
}

/* Pagination */
.pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pagination .page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination a.page-numbers:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

/* Search Header */
.search-header {
    margin-bottom: 32px;
}

.search-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.search-header span {
    color: var(--text-dark);
}

/* Star Rating Hover */
.rate-star:hover,
.rate-star:hover~.rate-star {
    color: #3b82f6 !important;
}

.star-rating:hover .rate-star {
    color: #3b82f6;
}

.star-rating .rate-star:hover~.rate-star {
    color: #94a3b8 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .single-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .header-container {
        flex-direction: column;
        gap: 16px;
    }

    .search-form input {
        width: 100%;
    }
}