/*
Theme Name: Web Truyện
Author: Bạn
Version: 1.0
*/
/* ===== RESET NHẸ ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== BODY ===== */
body {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 18px;
  line-height: 1.8;
  background-color: #f6f3ee; /* dịu mắt */
  color: #2b2b2b;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 760px;
  margin: auto;
  padding: 20px;
}

/* ===== TITLE ===== */
h1, h2, h3 {
  line-height: 1.4;
  margin-bottom: 12px;
  font-weight: 600;
}

/* ===== LINK ===== */
a {
  color: #5a3e2b;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== LIST TRUYỆN ===== */
.story-item {
  padding: 16px 0;
  border-bottom: 1px solid #ddd;
}

.story-title {
  font-size: 20px;
}

/* ===== NỘI DUNG CHƯƠNG ===== */
.chapter-content {
  margin-top: 20px;
}

.chapter-content p {
  margin-bottom: 16px;
}

/* ===== ẢNH ===== */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ===== NÚT (nếu có) ===== */
button {
  font-family: inherit;
  padding: 8px 14px;
  border: none;
  background: #5a3e2b;
  color: white;
  border-radius: 6px;
}

/* ===== MOBILE TỐI ƯU ===== */
@media (max-width: 600px) {
  body {
    font-size: 18px;
  }

  .container {
    padding: 16px;
  }

  .story-title {
    font-size: 19px;
  }
}
/* ===== CHAPTER PAGE ===== */

.chapter-title {
  margin-bottom: 10px;
}

.back-link {
  margin-bottom: 20px;
}

.back-link a {
  font-size: 16px;
  color: #777;
}

.back-link a:hover {
  color: #000;
}

/* nội dung đọc chính */
.chapter-content {
  margin-top: 10px;
}

/* tối ưu đoạn văn đọc truyện */
.chapter-content p {
  margin-bottom: 18px;
  text-align: justify;
}

/* khoảng cách dễ đọc hơn trên mobile */
@media (max-width: 600px) {
  .chapter-content p {
    margin-bottom: 20px;
  }
}
/* ===== STORY PAGE ===== */

.story-author {
  font-style: italic;
  color: #666;
  margin-bottom: 12px;
}

.story-content {
  margin-bottom: 24px;
}

/* ===== CHAPTER LIST ===== */

.chapter-list {
  margin-top: 10px;
}

.chapter-item {
  padding: 8px 0;
  border-bottom: 1px dashed #ddd;
}

.chapter-item a {
  display: block;
  font-size: 17px;
}

/* hover nhẹ cho dễ nhìn */
.chapter-item a:hover {
  color: #000;
}
/* ===== HOMEPAGE ===== */

.page-title {
  margin-bottom: 20px;
}

.story-item {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.story-title a {
  font-size: 20px;
}

.story-excerpt {
  color: #555;
  margin-top: 8px;
}

.no-story {
  color: #777;
}
/* ===== HEADER ===== */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 20px;
  font-weight: bold;
}

/* ===== MENU WRAPPER ===== */
.menu-wrapper {
  position: relative;
}

/* ===== BUTTON ===== */
.menu-toggle {
  background: #5a3e2b;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

/* ===== DROPDOWN ===== */
.main-menu {
  display: none;              /* ❗ QUAN TRỌNG */
  position: absolute;         /* ❗ QUAN TRỌNG */
  right: 0;
  top: 110%;

  background: #f6f3ee;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  min-width: 180px;
  z-index: 999;
}

/* ===== SHOW MENU ===== */
.menu-wrapper.active .main-menu {
  display: block;
}

/* ===== RESET UL ===== */
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ===== ITEM ===== */
.menu-list li a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #2b2b2b;
  text-decoration: none;
}

/* ===== HOVER ===== */
.menu-list li a:hover {
  background: #e8e2d9;
}

/* ===== ACTIVE ===== */
.menu-list .current-menu-item a {
  background: #dcd3c6;
  font-weight: 600;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .main-menu {
    right: 0;
  }
}