/*
Theme Name: XBookCN Theme
Theme URI: https://novels.stcroixcreative.com/
Author: Phong & Thương
Author URI: https://novels.stcroixcreative.com/
Description: Theme WordPress tùy chỉnh cho trang web XBookCN với layout 2 cột
Version: 1.0
Text Domain: xbookcn
*/

/* Reset CSS */
html, body {
    overflow-x: hidden;
}
.content-outer {
  font-size: 92%;
}

a:link {
  text-decoration: none;
  color: #000000;
}

a:visited {
  text-decoration: none;
  color: #000000;
}

a:hover {
  text-decoration: underline;
  color: #c40064;
}

.body-fauxcolumns .cap-top {
  margin-top: 30px;
  background: transparent
    url(static/images/81d91db22b074e7abec9e53af04ff2a2.gif) repeat scroll top
    left;
  height: 121px;
}

.content-inner {
  padding: 0;
}

/* Header
----------------------------------------------- */
.header-inner .Header .titlewrapper,
.header-inner .Header .descriptionwrapper {
  padding-left: 20px;
  padding-right: 20px;
}

.Header h1 {
  font: normal bold 2em Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  color: #000000;
  text-shadow: 2px 2px rgba(0, 0, 0, 0.1);
}

.Header h1 a {
  color: #000000;
}

.Header .description {
  font-size: 140%;
  color: #693b45;
}

/* Header Styles */
/*#header {*/
/*    padding: 20px 0;*/
/*    margin-bottom: 20px;*/
/*}*/

#headerimg {
  text-align: center;
  max-width: 1200px;
  margin: 0 3rem;
  padding: 0 20px;
}

#headerimg h1 {
  margin: 3rem 0;
  font-size: 2.5em;
  font-weight: bold;
}

#headerimg h1 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

#headerimg h1 a:hover {
  color: #0073aa;
}

#headerimg .description {
  color: #666;
  font-size: 1.1em;
  font-style: italic;
}

/* Responsive Header */
@media (max-width: 768px) {
  #headerimg h1 {
    font-size: 2em;
  }

  #headerimg .description {
    font-size: 1em;
  }
  #headerimg {
    margin: 0px -1rem;
}
}

/* Tabs
----------------------------------------------- */
.tabs-inner .section {
  margin: 0 20px;
}

.tabs-inner .PageList,
.tabs-inner .LinkList,
.tabs-inner .Labels {
  margin-left: -11px;
  margin-right: -11px;
  background-color: rgba(0, 0, 0, 0);
  border-top: 0 solid #ffffff;
  border-bottom: 0 solid #ffffff;
  -moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
  -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
  -goog-ms-box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
}

.tabs-inner .PageList .widget-content,
.tabs-inner .LinkList .widget-content,
.tabs-inner .Labels .widget-content {
  margin: -3px -11px;
  background: transparent none no-repeat scroll right;
}

.tabs-inner .widget ul {
  padding: 2px 25px;
  max-height: 34px;
  background: transparent none no-repeat scroll left;
}

.tabs-inner .widget li {
  border: none;
}

.tabs-inner .widget li a {
  display: inline-block;
  padding: 0.25em 1em;
  font: normal normal 1em Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  color: #cc3300;
  border-right: 1px solid #c0a154;
}

.tabs-inner .widget li:first-child a {
  border-left: 1px solid #c0a154;
}

.tabs-inner .widget li.selected a,
.tabs-inner .widget li a:hover {
  color: #000000;
}

/* Headings
----------------------------------------------- */
h2 {
  font: normal normal 1.5em Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  color: #000000;
  margin: 0 0 0.5em;
}

h2.date-header {
  font: normal normal 1em Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  color: #693b45;
}

/* Main
----------------------------------------------- */
/* Use unified inner padding declared later (0 15px) */

.main-outer {
  margin-top: 0;
  background: transparent none no-repeat scroll top left;
}

/*.main-inner {*/
/*    padding-top: 30px;*/
/*}*/

.main-cap-top {
  position: relative;
}

.main-cap-top .cap-right {
  position: absolute;
  height: 0;
  width: 100%;
  bottom: 0;
  background: transparent none repeat-x scroll bottom center;
}

.main-cap-top .cap-left {
  position: absolute;
  height: 245px;
  width: 280px;
  right: 0;
  bottom: 0;
  background: transparent none no-repeat scroll bottom left;
}

/* Posts
----------------------------------------------- */
.post-outer {
  padding: 15px 20px;
  margin: 0 0 25px;
  background: #f5f5f5 url(static/images/post_background_birds.png) repeat scroll
    top left;
  _background-image: none;
  border: dotted 1px #000000;
  -moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
  -goog-ms-box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
}

h3.post-title {
  font: normal normal 1.5em Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  margin: 0;
}

.comments h4 {
  font: normal normal 1.5em Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  margin: 1em 0 0;
}

.post-body {
  font-size: 105%;
  line-height: 1.5;
  position: relative;
}

.post-header {
  margin: 0 0 1em;
  color: #000000;
}

.post-footer {
  margin: 10px 0 0;
  padding: 10px 0 0;
  color: #000000;
  border-top: dashed 1px #525252;
}

#blog-pager {
  font-size: 140%;
}

#comments .comment-author {
  padding-top: 1.5em;
  border-top: dashed 1px #525252;
  background-position: 0 1.5em;
}

#comments .comment-author:first-child {
  padding-top: 0;
  border-top: none;
}

.avatar-image-container {
  margin: 0.2em 0 0;
}

/* Comments
----------------------------------------------- */
.comments .comments-content .icon.blog-author {
  background-repeat: no-repeat;
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9sLFwMeCjjhcOMAAAD+SURBVDjLtZSvTgNBEIe/WRRnm3U8RC1neQdsm1zSBIU9VVF1FkUguQQsD9ITmD7ECZIJSE4OZo9stoVjC/zc7ky+zH9hXwVwDpTAWWLrgS3QAe8AZgaAJI5zYAmc8r0G4AHYHQKVwII8PZrZFsBFkeRCABYiMh9BRUhnSkPTNCtVXYXURi1FpBDgArj8QU1eVXUzfnjv7yP7kwu1mYrkWlU33vs1QNu2qU8pwN0UpKoqokjWwCztrMuBhEhmh8bD5UDqur75asbcX0BGUB9/HAMB+r32hznJgXy2v0sGLBcyAJ1EK3LFcbo1s91JeLwAbwGYu7TP/3ZGfnXYPgAVNngtqatUNgAAAABJRU5ErkJggg==);
}

.comments .comments-content .loadmore a {
  border-top: 1px solid #525252;
  border-bottom: 1px solid #525252;
}

.comments .continue {
  border-top: 2px solid #525252;
}

/* Widgets
----------------------------------------------- */
.widget ul,
.widget #ArchiveList ul.flat {
  padding: 0;
  list-style: none;
}

.widget ul li,
.widget #ArchiveList ul.flat li {
  padding: 0.35em 0;
  text-indent: 0;
  border-top: dashed 1px #525252;
}

.widget ul li:first-child,
.widget #ArchiveList ul.flat li:first-child {
  border-top: none;
}

.widget .post-body ul {
  list-style: disc;
}

.widget .post-body ul li {
  border: none;
}

.widget .zippy {
  color: #525252;
}

.post-body img,
.post-body .tr-caption-container,
.Profile img,
.Image img,
.BlogList .item-thumbnail img {
  padding: 5px;
  background: #fff;
  -moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  -webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  -goog-ms-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.post-body img,
.post-body .tr-caption-container {
  padding: 8px;
}

.post-body .tr-caption-container {
  color: #333333;
}

.post-body .tr-caption-container img {
  padding: 0;
  background: transparent;
  border: none;
  -moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
  -goog-ms-box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
}

/* Footer
----------------------------------------------- */
.footer-outer {
  color: #ccbb99;
  background: rgba(0, 0, 0, 0) url(static/images/body_background_navigator.png)
    repeat scroll top left;
}

.footer-outer a {
  color: #ff7755;
}

.footer-outer a:visited {
  color: #dd5533;
}

.footer-outer a:hover {
  color: #ff9977;
}

.footer-outer .widget h2 {
  color: #eeddbb;
}

/* Mobile
----------------------------------------------- */
body.mobile {
  background-size: 100% auto;
}

.mobile .body-fauxcolumn-outer {
  background: transparent none repeat scroll top left;
}

html .mobile .mobile-date-outer {
  border-bottom: none;
  background: #eeeeee url(static/images/post_background_birds.png) repeat scroll
    top left;
  _background-image: none;
  margin-bottom: 10px;
}

.mobile .main-inner .date-outer {
  padding: 0;
}

.mobile .main-inner .date-header {
  margin: 10px;
}

.mobile .main-cap-top {
  z-index: -1;
}

.mobile .content-outer {
  font-size: 100%;
}

.mobile .post-outer {
  padding: 10px;
}

.mobile .main-cap-top .cap-left {
  background: transparent none no-repeat scroll bottom left;
}

.mobile .body-fauxcolumns .cap-top {
  margin: 0;
}

.mobile-link-button {
  background: #eeeeee url(static/images/post_background_birds.png) repeat scroll
    top left;
}

.mobile-link-button a:link,
.mobile-link-button a:visited {
  color: #000000;
}

.mobile-index-date .date-header {
  color: #693b45;
}

.mobile-index-contents {
  color: #000000;
}

.mobile .tabs-inner .section {
  margin: 0;
}

.mobile .tabs-inner .PageList {
  margin-left: 0;
  margin-right: 0;
}

.mobile .tabs-inner .PageList .widget-content {
  margin: 0;
  color: #000000;
  background: #eeeeee url(static/images/post_background_birds.png) repeat scroll
    top left;
}

.mobile .tabs-inner .PageList .widget-content .pagelist-arrow {
  border-left: 1px solid #c0a154;
}

:root {
  --main-bg-color: #eeeeee;
  --main-color: #f5f5f5;
  --box-color: #a1a1a1;
  --box-bg-color: #cccccc;
  --text-color: #000000;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* 深色模式 */
    --main-bg-color: #191919;
    --main-color: #202020;
    --box-color: #3a3a3a;
    --box-bg-color: #292929;
    --text-color: #a3a3a3;
  }
}

body {
  font-size: 1em;
  max-width: 768px;
  padding: 2px;
  margin: 0 auto !important;
  background: var(--main-bg-color);
  color: var(--text-color);
}

/* Ensure inner wrappers are centered as well */
.content-outer,
.region-inner {
  max-width: 960px;
  margin: 0 auto;
}

a {
  color: var(--text-color);
  text-decoration: none;
}

a:link {
  color: var(--text-color);
  text-decoration: none;
}

a:visited {
  color: var(--text-color);
  text-decoration: none;
}

a:active {
  color: var(--text-color);
  text-decoration: none;
}

a:hover {
  color: var(--text-color);
  text-decoration: underline;
}

h2 {
  color: var(--text-color);
}

hr {
  border-top: 2px dotted;
}

iframe {
  max-width: 100%;
}

.tp-box {
  width: 100%;
  background: var(--main-bg-color);
  margin: 0 auto;
}

.tp-box h1 {
  color: var(--text-color);
  font-size: 2em;
  text-align: center;
  line-height: 200%;
  overflow: hidden;
  margin: 0 auto;
  letter-spacing: 0.2em;
}

.tp-box h2 {
  background-color: var(--box-color);
  color: var(--text-color);
  font-size: 1em;
  font-weight: bold;
  line-height: 200%;
  overflow: hidden;
  margin: 0 auto;
  text-align: center;
}

.tp-box h3 {
  background-color: var(--box-bg-color);
  font-size: 1em;
  font-weight: bold;
  line-height: 200%;
  overflow: hidden;
  margin: 0 auto;
  text-align: center;
}

.tp-box ul {
  overflow: hidden;
  margin: 0 auto;
  padding: 0;
}

.tp-box ul li {
  line-height: 200%;
  font-size: 1em;
  overflow: hidden;
  /* white-space: nowrap;
  text-overflow: clip;
  float: left;
  width: 25%; */
  text-align: left;
}

.tp-box.ok ul li {
  line-height: 200%;
  font-size: 1em;
  overflow: hidden;
  text-align: center;
}

@media screen and (max-width: 768px) {
    .tp-box.ok ul{
        padding: 0 !important;
        font-size: 17px;
    }
}

/* Nếu cha có ID = 27 */
.tp-box.cat-27 ul li {
  line-height: 200%;
  font-size: 1em;
  overflow: hidden;
  text-align: center;
}

@media screen and (max-width: 768px) {
    .tp-box.cat-27 ul {
        padding: 0 !important;
        font-size: 17px;
    }
}

/*.post-outer {*/
/*    background: var(--main-color);*/
/*    padding: 15px 20px 0px;*/
/*}*/

.Header h1 {
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--text-color);
}

.Header h1 a {
  color: var(--text-color);
}

/* Two-column override: main left (70%), sidebar right (30%) */
.column-center-outer,
.column-right-outer {
  position: relative;
}
.column-center-outer {
  float: left;
  width: 70%;
}
.column-right-outer {
  float: right;
  width: 30%;
}
.column-right-inner {
  padding-left: 0;
  padding-right: 0;
}

/* Use flex to guarantee horizontal alignment */
.columns-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
}
.columns-inner .column-center-outer,
.columns-inner .column-right-outer {
  float: none;
}
/* Disable legacy left column mechanics from Blogger skin */
.column-left-outer {
  display: none;
  width: 0;
  margin: 0;
  right: auto;
}

.main-inner .column-center-inner,
.main-inner .column-left-inner,
.main-inner .column-right-inner {
  padding: 0 15px;
}

.cap-top {
  display: none;
}

.cap-bottom {
  display: none;
}

.widget-item-control {
  display: none;
}

.footer-outer {
  display: none;
}

.post-footer {
  color: var(--text-color);
}

.post-footer-line-1 {
  display: none;
}

.status-msg-wrap {
  text-align: center;
  font-size: 200%;
  margin-bottom: 20px;
  padding: 10px 0;
  width: 99%;
  border: dotted 1px #000000;
}

.status-msg-body {
  position: relative;
}

.status-msg-hidden {
  display: none;
}

.status-msg-border {
  display: none;
}

#blog-pager-newer-link {
  float: left;
}

#blog-pager-older-link {
  float: right;
}

#blog-pager {
  margin: 1em 0;
  text-align: center;
  overflow: hidden;
}

@media screen and (max-width: 768px) {
  body {
    min-width: 100%;
    width: 100%;
  }

  body {
    font: normal normal 1.2em Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  }

  .tp-box {
    width: 100%;
    margin: 0 0 0;
    border: none;
  }

  /* .tp-box ul li {
    width: 25%;
  } */

  .tp-box ul {
    padding: 0 !important;
    font-size: 12px;
  }

  .content-outer,
  .content-fauxcolumn-outer,
  .region-inner {
    min-width: 100%;
    max-width: 100%;
    _width: 100%;
    width: 100%;
  }

  .section {
    margin: 0;
  }

  .main-inner .columns {
    padding-left: 0;
    padding-right: 0;
  }

  .Header h1 {
    letter-spacing: 0;
  }

  #layout .content-outer {
    width: 100%;
  }

  .column-right-outer {
    width: 100%;
  }

  .fauxcolumn-outer {
    display: none;
  }

  .fauxcolumn-right-outer {
    display: none;
  }

  .column-right-outer {
    display: none;
  }

  .column-right-inner {
    display: none;
  }

  .footer-outer {
    display: none;
  }

  .main-cap-top .cap-left {
    display: none;
  }
  .columns-inner .column-right-outer {
    display: none !important;
  }
  .columns-inner {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    text-align: center;
  }

  .columns-inner .column-center-outer {
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    /*padding: 1rem;*/
    box-sizing: border-box;
  }

  .columns-inner img {
    max-width: 100%;
    height: auto;
  }

  .main-inner .column-center-inner,
  .main-inner .column-left-inner,
  .main-inner .column-right-inner {
    padding: 0;
  }
  #headerimg h1 {
    margin: 2rem 0;
  }
  .novel-single-container {
    padding: 2rem 1rem;
  }
  /* Story grid list */
  .story-list {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* 4 cột đều nhau */
    gap: 8px !important; /* khoảng cách giữa các cột */
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
  }

  .story-list li {
    text-align: left;
    box-sizing: border-box;
  }
  .tp-box ul li {
      line-height: 200%;
      font-size: 1.4em;
  }
}

@media screen and (min-width: 768px) {
    .story-list {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; /* 4 cột đều nhau */
        gap: 8px ; /* khoảng cách giữa các cột */
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .story-list li {
        text-align: left;
        box-sizing: border-box;
    }
}

/* Box chung cho header, intro, chapter-item */
.novel-box {
  border: 0.5px dashed #000000;
  padding: 20px;
  margin-bottom: 20px;
  background-color: #ffffff;
}
.novel-boxx {
  border: 0.5px dashed #000000;
  padding: 20px;
  margin-bottom: 20px;
}
/* Tiêu đề truyện */
.novel-title {
  font-size: 28px;
  margin: 0;
  text-align: center;
}

/* Danh sách chương */
.chapter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-item {
  margin-bottom: 15px;
}

.chapter-item a {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  color: #333;
}

.chapter-item a:hover {
  color: #0073aa;
}

.novel-intro {
  flex: 1;
  min-width: 0; /* Cho phép flex item co lại */
}

.column-right-outer {
  flex: 0 0 300px; /* Cố định width 300px cho sidebar */
  max-width: 300px;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
  .novel-content-wrapper {
    flex-direction: column;
  }

  .column-right-outer {
    flex: 1;
    max-width: none;
  }
}

/* Container chính của trang category */
.category-page {
  margin: 0 auto;
  padding: 20px;
}

/* Tiêu đề category */
.category-title {
  font-size: 2rem;
  margin: 0;
  font-weight: bold;
}

.category-layout,
.novel-single-container {
  display: flex;
  margin: 0 auto;
  gap: 40px;
}

/* Nội dung chính */
.category-page,
.novel-content-wrapper {
  flex: 3;
}

/* Danh sách bài viết */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 200%;
}

/* Item từng bài viết */
.category-description {
  margin-bottom: 15px;
  border: 0.5px dotted rgba(255, 255, 255, 0.27);
  padding: 15px;
  background-color: var(--main-color);
  transition: background-color 0.2s ease;
}
.post-ite {
  margin-bottom: 15px;
  padding: 15px;
  transition: background-color 0.2s ease;
}
.post-item {
  margin-bottom: 15px;
  padding: 20px;
  border: 0.5px dotted #000000;
  background-color: var(--main-color);
  transition: background-color 0.2s ease;
}

/* Link trong item */
.post-item a {
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  display: block;
  text-shadow: 0.01em 0 currentColor, -0.01em 0 currentColor;
}
.lds-spinner {
  color: #363535; /* màu đen */
  display: inline-block;
  position: relative;
  width: 40px; /* to hơn */
  height: 40px; /* to hơn */
}

.lds-spinner div {
  transform-origin: 20px 20px; /* căn tâm theo size mới */
  animation: lds-spinner 1.2s linear infinite;
}

.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3px;
  left: 18.5px;
  width: 4px; /* thanh dày hơn */
  height: 12px; /* thanh dài hơn */
  border-radius: 20%;
  background: currentColor; /* lấy màu từ .lds-spinner */
}

.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}

@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Container cho các chương được load thêm */
.infinite-chapters-wrapper {
  margin-top: 20px;
}

.infinite-chapters-wrapper article {
  margin-bottom: 20px;
  border-top: 2px solid #eee;
  padding-top: 20px;
}

.infinite-chapters-wrapper article:first-child {
  border-top: none;
  padding-top: 0;
}

/* Styling cho các chương được load */
.infinite-chapters-wrapper .novel-intro {
  margin-bottom: 0;
}

.infinite-chapters-wrapper .novel-intro .intro-title {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.infinite-chapters-wrapper .novel-description {
  line-height: 1.6;
  color: #666;
}

/* Spacing for lists under H3 on index page */
.tp-box ul {
  margin: 10px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* horizontal and vertical gap */
}


.tp-box ul li a {
  display: block;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Clamp 3 lines for excerpts */
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-layout {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-content {
  flex: 3;
  background: var(--main-color);
  padding: 10px;
  border: 1px solid #ddd;
}

.category-sidebar {
  flex: 1;
  background: #fff;
  padding: 20px;
  border: 1px solid #ddd;
}

.category-heade {
  border-bottom: 2px dotted #888;
  margin-bottom: 15px;
  padding-bottom: 10px;
}
.category-header {
  text-align: center;
  margin-bottom: 15px;
  padding: 20px;
  font-size: 2rem;
  font-weight: normal;
  border: dotted 1px #000000;
  transition: background-color 0.2s ease;
}

.category-title {
  text-align: center;
  font-weight: normal;
}

.category-description {
  border: dotted 1px #000000;
  margin-bottom: 20px;
  line-height: 1.6;
}

.category-posts li {
  margin-bottom: 8px;
}

.post-header {
  display: flex;
  justify-content: start;
  align-items: center;
  font-weight: bold;
  font-size: 20px;
}
.post-description {
  font-size: 20px;
}
/* Search results UI */
#category-search-results {
  margin-top: 12px;
}
#category-search-results .category-search-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  max-height: 280px;
  overflow: auto;
  background: #fff;
}
#category-search-results .cat-search-item {
  list-style: none;
}
#category-search-results .cat-search-link {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px dashed #e8e8e8;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
#category-search-results .cat-search-link:hover {
  background: #a1a1a1;
  color: #000000;
}
#category-search-results .cat-search-name {
  font-weight: 600;
}
#category-search-results .cat-search-slug {
  color: #999;
  font-size: 12px;
}
#category-search-results .cat-search-empty {
  margin-top: 10px;
  color: #666;
}

.bsfloating {
  width: 200px;
  position: fixed;
  top: 0;
  z-index: 9999;
  border: dotted 1px #000000;
  padding: 10px;
  line-height: 1.4;
  margin: 3.4rem 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* Khi active thì cố định trên cùng */
.bsfloat.bsfloating {
  position: fixed;
  top: 0;
  z-index: 9999;
}

iframe {
  max-width: 100%;
}

/*bài viết*/
.novel-description p{
        line-height: 1.7;
    font-size: 105%;
}
.intro-title{
    font: normal bold 1.5em Arial, Tahoma, Helvetica, FreeSans, sans-serif;
    margin: 0;
}