body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    background: #f5f5f5;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: white;
    border-bottom: 1px solid #ddd;
}

header a {
    text-decoration: none;
    color: #4CAF50;
    font-weight: bold;
}

header button {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

/* tiêu đề */

#title {
    text-align: center;
    color: #5a8f00;
    font-size: 28px;
    margin-bottom: 10px;
}

.admin-row input {
    margin-bottom: 10px;
}

.reader-container #chapterTitle {
    text-align: center;
    color: #777;
    margin-bottom: 20px;
}

/* nội dung */

.content {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    white-space: pre-line;
}

/* navigation */

.nav {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.nav button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 22px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.nav button:hover {
    background: #3f9443;
}

.nav button:disabled {
    background: #b8d9b8;
    cursor: not-allowed;
}

/* dark mode */

.dark {
    background: #1e1e1e;
    color: #ddd;
}

.dark header {
    background: #2b2b2b;
    border-bottom: 1px solid #444;
}

.dark .content {
    color: #ddd;
}

/* danh sách truyện */

#storyList {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

/* card truyện */

.story {
    display: flex;
    align-items: center;
    gap: 15px;

    background: white;
    padding: 12px;
    border-radius: 6px;

    cursor: pointer;
    transition: 0.2s;
}

.story:hover {
    background: #f0f0f0;
}

/* ảnh */

.page-index .story img {
    width: 50px;
    height: 65px;
    object-fit: cover;
    border-radius: 4px;
}

/* title */

.page-index .story-title {
    font-size: 18px;
    font-weight: bold;
}

/* hover nhẹ cho đẹp */

.story:hover img {
    transform: scale(1.03);
    transition: 0.3s;
}

.page-index .story-desc {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

#pagination {
    text-align: center;
    margin: 25px;
}

#pagination button {

    border: none;
    background: #eee;
    padding: 6px 10px;
    margin: 2px;

    border-radius: 4px;
    cursor: pointer;
}

/* Chi tiet truyen */

.section-title {
    border-bottom: 2px solid #ddd;
    padding-bottom: 6px;
    margin-top: 30px;
}

.page-story .story-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    margin: 15px 0;
}

.page-story .cover-box {
    text-align: center;
}

.page-story .cover-box img {
    width: 240px;
    border-radius: 6px;
}

.page-story .story-desc {
    font-size: 24px;
    line-height: 1.7;
    margin: 25px 0;
}

.page-story .chapter {

    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 24px;
}

.page-story .chapter:hover {
    background: #f5f5f5;
}

/* ===== ADMIN PAGE ===== */

.admin-container {
    max-width: 800px;
    margin: auto;
    padding: 25px;
}

/* mỗi dòng */

.admin-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

/* label */

.admin-row label {
    font-weight: bold;
    margin-bottom: 5px;
}

/* input */

.admin-row input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* textarea */

.admin-row textarea {
    height: 200px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

/* nút */

.admin-container button {
    margin-right: 10px;
    margin-top: 10px;
    padding: 8px 14px;
    border: none;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.admin-container button:hover {
    background: #3f9443;
}