:root {
    --bg: #ffffff;
    --surface: #f7f9fb;
    --text: #121212;
    --text-muted: #666;
    --border: #e8edf2;
    --accent: #00bcd4;
    --accent-soft: #e7fbff;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(0, 0, 0, .04);
    --container: 1280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.header {
    border-bottom: 1px solid var(--border);
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.logo {
    font-weight: 700;
    font-size: 1.3rem;
}

    .logo:hover {
        color: var(--accent);
    }

nav {
    display: flex;
    gap: 24px;
}

    nav a {
        color: var(--text-muted);
    }

        nav a:hover {
            color: var(--accent);
        }

.search {
    width: 260px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 18px;
    outline: none;
}

    .search:focus {
        border-color: var(--accent);
    }

.hero {
    padding: 80px 0;
    text-align: center;
}

    .hero h1 {
        font-size: 3rem;
        line-height: 1.1;
        margin-bottom: 16px;
    }

    .hero p {
        color: var(--text-muted);
        max-width: 700px;
        margin: 0 auto;
    }

.section {
    padding-bottom: 64px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

    .section-header a {
        color: var(--accent);
    }

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.book-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: .2s;
    box-shadow: var(--shadow);
}

    .book-card:hover {
        transform: translateY(-3px);
        border-color: var(--accent);
    }

.cover {
    height: 220px;
    background: linear-gradient(135deg, #d8f8ff, #f4fdff);
}

.book-content {
    padding: 18px;
}

    .book-content h3 {
        margin-bottom: 8px;
        font-size: 1.05rem;
    }

.meta {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 12px;
}

.genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

    .genres span {
        background: var(--accent-soft);
        color: #0f6c78;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: .8rem;
    }

.chapter {
    font-size: .9rem;
    color: var(--accent);
    font-weight: 600;
}

.compact .cover {
    height: 160px;
}

.rating {
    margin-top: 12px;
    font-weight: 600;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

    .tags a {
        border: 1px solid var(--border);
        padding: 10px 16px;
        border-radius: 999px;
        background: white;
        transition: .2s;
    }

        .tags a:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

@media (max-width: 768px) {

    .header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 0;
        gap: 16px;
    }

    nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .search {
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }
}
