/**
 * TruyenFull Theme Main CSS
 * Tu?n th? 100% Design Tokens theo Section 3 c?a SKILL-truyenfull-theme.md & chu?n pixel-perfect truyenfull.live
 */

:root {
  /* ===== Brand & accent (Chu?n 100% truyenfull.live) ===== */
  --tf-brand:        #14425d;   /* xanh navy th??ng hi?u chu?n truyenfull.live */
  --tf-brand-dark:   #2f566d;   /* hover/nav ??m */
  --tf-brand-2:      #1b6089;   /* xanh ph? */
  --tf-hot:          #e74c3c;   /* badge Hot / ch? ?? nh?n */
  --tf-full:         #5cb85c;   /* badge "Full" xanh l? */
  --tf-new:          #337ab7;   /* badge "M?i" / ch??ng m?i */
  --tf-accent:       #f18121;   /* cam ?i?m nh?n */

  /* ===== N?n & b? m?t ===== */
  --tf-bg:           #eaeaea;   /* n?n trang t?ng chu?n truyenfull */
  --tf-surface:      #ffffff;   /* th?/kh?i n?i dung */
  --tf-surface-2:    #f8f8f8;   /* kh?i ph?, sidebar item */
  --tf-border:       #e5e5e5;   /* vi?n m?nh */
  --tf-border-2:     #dcdcdc;

  /* ===== Ch? ===== */
  --tf-text:         #333333;   /* body */
  --tf-text-heading: #4E4E4E;   /* ti?u ?? kh?i */
  --tf-text-soft:    #666666;   /* ph? */
  --tf-text-mute:    #999999;   /* meta, th?i gian */
  --tf-link:         #14425d;   /* link chu?n truyenfull */
  --tf-link-hover:   #0b5e90;

  /* ===== K?ch th??c layout ===== */
  --tf-container:    1170px;    /* b? r?ng t?i ?a container */
  --tf-gap:          16px;
  --tf-radius:       4px;
  --tf-nav-h:        50px;      /* chi?u cao thanh nav */

  /* ===== Typography ===== */
  --tf-font-ui:      "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --tf-fs-base:      14px;
  --tf-lh-base:      1.5;
}

/* Base Reset & Grid */
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  background-color: var(--tf-bg);
  color: var(--tf-text);
  font-family: var(--tf-font-ui);
  font-size: var(--tf-fs-base);
  line-height: var(--tf-lh-base);
}

a {
  color: var(--tf-link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover, a:focus {
  color: var(--tf-link-hover);
  text-decoration: underline;
}

img { max-width: 100%; height: auto; vertical-align: middle; }

.container {
  width: 100%;
  max-width: var(--tf-container);
  margin-right: auto;
  margin-left: auto;
  padding-left: 15px;
  padding-right: 15px;
}

.row {
  margin-left: -10px;
  margin-right: -10px;
}
.row:after, .container:after, .box-header:after, .story-info-header:after, .story-detail-header:after {
  content: ""; display: table; clear: both;
}

.col-xs-12, .col-xs-6, .col-xs-4, .col-sm-12, .col-sm-8, .col-sm-6, .col-sm-4, .col-sm-3, .col-md-12, .col-md-8, .col-md-6, .col-md-4, .col-md-3, .col-md-2 {
  position: relative;
  min-height: 1px;
  padding-left: 10px;
  padding-right: 10px;
  float: left;
}

.col-xs-12 { width: 100%; }
.col-xs-6  { width: 50%; }
.col-xs-4  { width: 33.33333333%; }

@media (min-width: 768px) {
  .col-sm-12 { width: 100%; }
  .col-sm-8  { width: 66.66666667%; }
  .col-sm-6  { width: 50%; }
  .col-sm-4  { width: 33.33333333%; }
  .col-sm-3  { width: 25%; }
}

@media (min-width: 992px) {
  .col-md-12 { width: 100%; }
  .col-md-8  { width: 66.66666667%; }
  .col-md-6  { width: 50%; }
  .col-md-4  { width: 33.33333333%; }
  .col-md-3  { width: 25%; }
  .col-md-2  { width: 16.66666667%; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #888888; }
.pull-left { float: left; }
.pull-right { float: right; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-top: 4px dashed;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

/* ==========================================================================
   HEADER & NAVBAR (CHU?N TRUYENFULL.LIVE)
   ========================================================================== */
.header-spacing { height: 50px; }

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--tf-nav-h);
  background-color: var(--tf-brand);
  border: none;
  z-index: 1030;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--tf-nav-h);
  padding: 0 15px;
}

.navbar-header {
  display: flex;
  align-items: center;
  height: var(--tf-nav-h);
  flex-shrink: 0;
}

.navbar-toggle {
  display: none;
}

.logo-brand {
  height: var(--tf-nav-h);
  padding: 0 15px 0 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.logo-icon {
  color: #ffffff;
  font-size: 20px;
  margin-right: 6px;
}

.navbar-collapse {
  display: flex;
  align-items: center;
  height: var(--tf-nav-h);
  flex: 1;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}

.navbar-nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  height: var(--tf-nav-h);
}

.navbar-nav > li {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--tf-nav-h);
  margin: 0;
  padding: 0;
}

.navbar-nav > li > a {
  display: flex;
  align-items: center;
  height: var(--tf-nav-h);
  line-height: var(--tf-nav-h);
  padding: 0 12px;
  color: #ffffff;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
}

.navbar-nav > li > a:hover,
.navbar-nav > li.open > a {
  background-color: var(--tf-brand-dark);
  text-decoration: none;
}

.navbar-nav > li > a .dashicons {
  margin-right: 4px;
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 16px;
}

/* Search bar in nav */
.search-form {
  display: flex;
  align-items: center;
  height: var(--tf-nav-h);
  margin-left: auto;
  margin-right: 15px;
  position: relative;
  flex-shrink: 0;
}

.search-form .input-group {
  display: flex;
  align-items: center;
  margin: 0;
  position: relative;
  height: 30px;
}

.search-input {
  height: 30px;
  line-height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  border: 1px solid #ccc;
  border-radius: var(--tf-radius) 0 0 var(--tf-radius);
  outline: none;
  width: 200px;
  background: #ffffff;
  color: #333;
}
.search-input:focus {
  border-color: #14425d;
}

.search-btn {
  height: 30px;
  padding: 0 10px;
  background: #ffffff;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 var(--tf-radius) var(--tf-radius) 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-btn:hover {
  background: #f0f0f0;
}
.search-btn .dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
  line-height: 15px;
  color: #555;
}

/* Autocomplete Suggest */
.search-suggest-box {
  position: absolute;
  top: 36px; right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid var(--tf-border-2);
  border-radius: var(--tf-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1050;
  max-height: 380px;
  overflow-y: auto;
}
.suggest-item {
  display: flex;
  padding: 8px 10px;
  border-bottom: 1px solid var(--tf-border);
  align-items: center;
}
.suggest-item:hover { background: var(--tf-surface-2); text-decoration: none; }
.suggest-thumb { width: 36px; height: 48px; object-fit: cover; margin-right: 10px; border-radius: 2px; }
.suggest-info h5 { margin: 0 0 3px; font-size: 13px; color: var(--tf-text); }
.suggest-info small { color: var(--tf-text-soft); font-size: 11px; }

/* Auth Nav Right */
.auth-nav {
  display: flex;
  align-items: center;
  height: var(--tf-nav-h);
  list-style: none;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}
.nav-auth-link {
  display: flex;
  align-items: center;
  height: var(--tf-nav-h);
  line-height: var(--tf-nav-h);
  padding: 0 10px;
  color: #ffffff;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.nav-auth-link:hover {
  background-color: var(--tf-brand-dark);
}
.nav-auth-link .dashicons {
  margin-right: 4px;
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 16px;
}

/* Mega Menu Dropdown */
.mega-menu-content {
  position: absolute;
  top: 50px; left: 0;
  width: 760px;
  background-color: #2f566d;
  border: 1px solid #14425d;
  border-radius: 0 0 var(--tf-radius) var(--tf-radius);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  padding: 8px 0;
  z-index: 1050;
  display: none;
}
.mega-dropdown.open .mega-menu-content { display: block; }

.mega-menu-grid {
  display: flex;
  flex-direction: row;
}
.mega-col {
  flex: 1;
  min-width: 0;
}
.mega-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mega-list li {
  margin: 0;
}
.mega-list li a {
  display: block;
  color: #f2f2f2;
  font-size: 13px;
  padding: 5px 14px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease;
}
.mega-list li a:hover {
  background-color: #14425d;
  color: #ffffff;
  text-decoration: none;
}

/* Standard Dropdown */
.dropdown-menu {
  position: absolute;
  top: 50px; left: 0;
  background-color: #2f566d;
  border: 1px solid #14425d;
  border-radius: 0 0 var(--tf-radius) var(--tf-radius);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  padding: 6px 0;
  min-width: 210px;
  list-style: none;
  margin: 0;
  z-index: 1050;
  display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu li a {
  display: block;
  padding: 7px 16px;
  font-size: 13px;
  color: #f2f2f2;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-menu li a:hover {
  background-color: #14425d;
  color: #ffffff;
}

/* ==========================================================================
   BREADCRUMB (CHU?N TRUYENFULL.LIVE)
   ========================================================================== */
.breadcrumb {
  padding: 6px 0;
  margin: 8px 0 12px;
  list-style: none;
  font-size: 13px;
  color: var(--tf-text-soft);
}
.breadcrumb li { display: inline-block; }
.breadcrumb li + li:before {
  content: "? ";
  padding: 0 5px;
  color: var(--tf-text-mute);
}
.breadcrumb li a { color: #555; }
.breadcrumb li a:hover { color: var(--tf-brand); }
.breadcrumb li.active { color: #333; font-weight: normal; }

/* ==========================================================================
   BOXES & SECTIONS
   ========================================================================== */
.home-box, .story-detail-box, .archive-header-box, .archive-list-box, .sidebar-box {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.box-header, .sidebar-header {
  padding: 8px 15px;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.box-title, .sidebar-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4E4E4E;
}
.box-title a, .sidebar-title { color: #4E4E4E; text-decoration: none; }
.box-title a:hover { color: var(--tf-brand); }
.box-title .item-arrow-header { color: #4E4E4E; font-size: 18px; font-weight: bold; margin-left: 2px; }

.box-body, .sidebar-body { padding: 10px 15px; }

/* ==========================================================================
   HOMEPAGE COMPONENTS
   ========================================================================== */
/* 8 Columns Cards for TRUY?N HOT */
.row-cards { margin-left: -5px; margin-right: -5px; }
.card-truyen-item { padding-left: 5px; padding-right: 5px; margin-bottom: 10px; }

@media (min-width: 992px) {
  .col-lg-card { width: 12.5% !important; float: left; }
}
@media (max-width: 991px) and (min-width: 768px) {
  .col-lg-card { width: 25% !important; float: left; }
}
@media (max-width: 767px) {
  .col-lg-card { width: 50% !important; float: left; }
}

.card-box {
  border: none;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.15s ease;
}
.card-box:hover {
  transform: translateY(-2px);
}
.card-cover {
  position: relative;
  padding-top: 140%;
  overflow: hidden;
  background: #e0e0e0;
  border-radius: 3px;
}
.card-cover img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.card-box:hover .card-cover img {
  transform: scale(1.05);
}

.card-title-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 65%, transparent 100%);
  padding: 20px 6px 6px;
  text-align: center;
  z-index: 2;
}
.card-title-overlay .card-title {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

.badge-card-full {
  position: absolute;
  bottom: 6px; left: 6px;
  background-color: #5cb85c;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  z-index: 3;
  line-height: 12px;
}

/* List item rows (TRUY?N M?I C?P NH?T) */
.list-latest-items {
  margin: 0;
  padding: 0;
}
.list-item-row {
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: 1px dotted #ccc;
  font-size: 13.5px;
  background: #ffffff;
  transition: background 0.15s ease;
  min-height: 38px;
}
.list-item-row:hover {
  background: #f9f9f9;
}
.item-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 8px 10px 8px 0;
  border-right: 1px dotted #ccc;
}
.item-icon-arrow {
  color: #888888;
  font-weight: bold;
  font-size: 15px;
  margin-right: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.story-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  display: inline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-title a {
  color: #333333;
  text-decoration: none;
}
.story-title a:hover {
  color: #14425d;
  text-decoration: underline;
}

.badge-label {
  display: inline-block;
  font-size: 10px;
  padding: 0 4px;
  line-height: 15px;
  margin-left: 5px;
  border-radius: 2px;
  font-weight: 500;
  vertical-align: middle;
  flex-shrink: 0;
}
.badge-label-new {
  border: 1px solid #337ab7;
  color: #337ab7;
  background: #fff;
}
.badge-label-full {
  border: 1px solid #5cb85c;
  color: #5cb85c;
  background: #fff;
}
.badge-label-hot {
  border: 1px solid #d9534f;
  color: #d9534f;
  background: #fff;
}

.item-genres {
  width: 160px;
  color: #666666;
  font-size: 13px;
  padding: 8px 10px;
  border-right: 1px dotted #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.item-genres a {
  color: #666666;
  text-decoration: none;
}
.item-genres a:hover {
  color: #14425d;
  text-decoration: underline;
}

.item-chapter {
  width: 125px;
  font-size: 13px;
  text-align: left;
  padding: 8px 10px;
  border-right: 1px dotted #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.item-chapter a {
  color: #337ab7;
  text-decoration: none;
}
.item-chapter a:hover {
  text-decoration: underline;
}

.item-time {
  width: 100px;
  text-align: right;
  font-size: 12.5px;
  color: #666666;
  padding: 8px 0 8px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 6 Columns Cards for TRUY?N HO?N TH?NH & S?NG T?C */
.row-completed-grid {
  margin-left: -5px;
  margin-right: -5px;
}
.col-completed-item {
  padding-left: 5px;
  padding-right: 5px;
  margin-bottom: 15px;
}

@media (min-width: 992px) {
  .box-truyen-full .col-completed-item,
  .box-truyen-sang-tac .col-completed-item {
    width: 16.66666667% !important;
    float: left;
  }
}
@media (max-width: 991px) and (min-width: 768px) {
  .box-truyen-full .col-completed-item,
  .box-truyen-sang-tac .col-completed-item {
    width: 33.33333333% !important;
    float: left;
  }
}
@media (max-width: 767px) {
  .box-truyen-full .col-completed-item,
  .box-truyen-sang-tac .col-completed-item {
    width: 50% !important;
    float: left;
  }
}

.completed-card {
  text-align: center;
}
.completed-cover {
  position: relative;
  padding-top: 140%;
  overflow: hidden;
  background: #e0e0e0;
  border-radius: 3px;
  margin-bottom: 6px;
}
.completed-cover img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.completed-card:hover .completed-cover img {
  transform: scale(1.05);
}
.completed-title {
  font-size: 12px;
  font-weight: 600;
  color: #333333;
  margin: 0 0 5px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 31px;
}
.completed-card a {
  text-decoration: none;
  color: inherit;
}
.completed-card a:hover .completed-title {
  color: var(--tf-brand);
}

.badge-full-blue {
  display: inline-block;
  background-color: #337ab7;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.2;
}

/* ==========================================================================
   SIDEBAR WIDGETS (CHU?N 100% TRUYENFULL.LIVE)
   ========================================================================== */
/* Widget Truy?n c?ng t?c gi? */
.same-author-box {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 20px;
}
.same-author-body {
  padding: 10px 15px;
}
.same-author-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.same-author-list li {
  padding: 6px 0;
  border-bottom: 1px dotted #e5e5e5;
  font-size: 13.5px;
  display: flex;
  align-items: center;
}
.same-author-list li:last-child {
  border-bottom: none;
}
.same-author-list .item-arrow {
  color: #888;
  font-size: 16px;
  font-weight: bold;
  margin-right: 8px;
  line-height: 1;
}
.same-author-list a {
  color: #333333;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.same-author-list a:hover {
  color: var(--tf-brand);
  text-decoration: underline;
}

/* Sidebar Hot Leaderboard (Tabs Ng?y / Th?ng / All time) */
.hot-tabs-nav {
  display: flex;
  border-bottom: 1px solid #ccc;
  background: #f4f4f4;
}
.hot-tab-btn {
  flex: 1;
  padding: 6px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
}
.hot-tab-btn.active {
  color: #14425d;
  border-bottom-color: #14425d;
  background: #fff;
}
.hot-item-row {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px dotted #e5e5e5;
}
.hot-item-row:last-child {
  border-bottom: none;
}
.hot-rank-badge {
  width: 20px; height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 3px;
  background: #f0f0f0;
  color: #666;
  font-size: 11px;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
}
.rank-1 .hot-rank-badge { background: #e74c3c; color: #fff; }
.rank-2 .hot-rank-badge { background: #5cb85c; color: #fff; }
.rank-3 .hot-rank-badge { background: #1b6089; color: #fff; }

.hot-item-info { flex: 1; min-width: 0; }
.hot-story-title {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hot-story-title a { color: #333333; }
.hot-story-title a:hover { color: #14425d; }
.hot-story-genre { font-size: 11.5px; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-story-genre a { color: #777; }
.hot-story-genre a:hover { color: #14425d; }

/* ==========================================================================
   CHI TI?T TRUY?N (STORY DETAIL PAGE - CHU?N 100% TRUYENFULL.LIVE)
   ========================================================================== */
.story-detail-box {
  padding: 15px 20px 25px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.story-detail-header {
  border-bottom: 1px solid #ccc;
  padding-bottom: 6px;
  margin-bottom: 15px;
}
.story-detail-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4E4E4E;
}

/* 3D Book Cover Effect (Chu?n truyenfull.live) */
.story-cover-col {
  text-align: center;
  margin-bottom: 15px;
}
.book-cover-3d-wrap {
  text-align: center;
  margin-bottom: 15px;
}
.book-cover-3d {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 215px;
  background: #fff;
  border-radius: 2px 4px 4px 2px;
  box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.25), 0 0 2px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  line-height: 0;
}
.book-cover-3d img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}
/* Shading spine overlay on left */
.book-cover-3d::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 14px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.25) 0%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}
/* Subtle right edge shading */
.book-cover-3d::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 6px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.15) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Metadata list directly under the cover */
.story-meta-list {
  text-align: left;
  padding: 0 5px;
}
.story-meta-list .meta-item {
  margin-bottom: 6px;
  font-size: 13.5px;
  color: #333;
  line-height: 1.4;
}
.story-meta-list .meta-item strong {
  color: #333;
  font-weight: 700;
  margin-right: 4px;
}
.story-meta-list .meta-item a {
  color: #333333;
}
.story-meta-list .meta-item a:hover {
  color: #14425d;
  text-decoration: underline;
}
.story-meta-list .text-status-full {
  color: #5cb85c;
  font-weight: 700;
}
.story-meta-list .text-status-ongoing {
  color: #337ab7;
  font-weight: 700;
}

/* Right Column: Title, Star Rating, Story Description */
.story-desc-col {
  padding-left: 15px;
}
.story-main-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4E4E4E;
}

/* Rating Stars */
.story-rating-box {
  margin: 0 0 10px;
}
.rating-stars-wrap {
  font-size: 18px;
  color: #ffba00;
  letter-spacing: 2px;
  display: inline-block;
}
.rating-text-meta {
  font-size: 12.5px;
  color: #777777;
  margin-top: 3px;
}
.rating-text-meta strong {
  color: #555555;
}
.rate-holder {
  cursor: pointer;
}
.star-item.star-on {
  color: #ffba00;
}
.star-item.star-off {
  color: #cccccc;
}

.story-sub-info {
  margin-bottom: 12px;
  color: #777;
  font-size: 12.5px;
}

/* Story Description Box */
.story-description-content {
  position: relative;
  margin-top: 10px;
}
.desc-text {
  font-size: 14px;
  line-height: 1.65;
  color: #333333;
  word-wrap: break-word;
}
.desc-text p {
  margin: 0 0 8px;
}
.desc-text.collapsed {
  max-height: 200px;
  overflow: hidden;
  position: relative;
}
.desc-text.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 100%);
  pointer-events: none;
}
.desc-toggle-btn-wrap {
  text-align: right;
  margin-top: 4px;
}
.btn-showmore {
  background: #f9f9f9;
  border: 1px solid #ccc;
  color: #555555;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 3px;
  cursor: pointer;
  outline: none;
}
.btn-showmore:hover {
  background: #ebebeb;
  color: #333;
}

/* ==========================================================================
   DANH S?CH CH??NG (2 C?T C?N ??I)
   ========================================================================== */
.story-chapters-section {
  margin-top: 30px;
}
.section-title-wrap {
  border-bottom: 1px solid #ccc;
  padding-bottom: 6px;
  margin-bottom: 15px;
}
.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4E4E4E;
}

.list-chapter-grid {
  margin-left: -5px;
  margin-right: -5px;
}
.list-chapter {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-chapter li {
  padding: 4px 0;
  font-size: 13.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}
.list-chapter .chap-bullet {
  color: #555555;
  font-size: 13px;
  margin-right: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.list-chapter a {
  color: #333333;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.list-chapter a:hover {
  color: #14425d;
  text-decoration: underline;
}

/* ==========================================================================
   PH?N TRANG (PAGINATION)
   ========================================================================== */
.pagination-container {
  margin: 25px 0 15px;
  text-align: center;
}
.pagination {
  display: inline-flex;
  padding: 0;
  margin: 0 0 10px;
  list-style: none;
}
.pagination > li > a, .pagination > li > span {
  padding: 5px 10px;
  color: #333333;
  background: #ffffff;
  border: 1px solid #cccccc;
  margin: 0 2px;
  border-radius: 3px;
  font-size: 13px;
  text-decoration: none;
}
.pagination > li > a:hover {
  background: #f0f0f0;
  border-color: #adadad;
}
.pagination > li.active > span {
  background: #14425d;
  border-color: #14425d;
  color: #ffffff;
  font-weight: bold;
}
.pagination > li.disabled > span {
  color: #ccc;
  cursor: not-allowed;
}

.pagination-jump {
  font-size: 13px;
  color: #666;
  margin-top: 5px;
}
.pagination-jump select {
  height: 28px;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
}
.pagination-jump button {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f4f4f4;
  cursor: pointer;
}
.pagination-jump button:hover {
  background: #e5e5e5;
}

/* ==========================================================================
   B?NH LU?N TRUY?N (COMMENTS - CHU?N TRUYENFULL.LIVE)
   ========================================================================== */
.story-comments-section {
  margin-top: 35px;
}

.comment-form-wrap {
  margin-bottom: 25px;
}
.comment-form-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.comment-user-avatar {
  flex-shrink: 0;
}
.avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #888888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
}

.comment-input-box {
  flex: 1;
  min-width: 0;
}
.comment-textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 8px 12px;
  font-size: 13.5px;
  resize: vertical;
  min-height: 65px;
  outline: none;
  font-family: inherit;
}
.comment-textarea:focus {
  border-color: #14425d;
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.turnstile-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dcdcdc;
  background: #fdfdfd;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 12px;
  color: #444;
}
.turnstile-badge .badge-check {
  color: #27ae60;
  font-weight: bold;
  margin-right: 6px;
  font-size: 14px;
}
.turnstile-badge .badge-text {
  font-weight: 500;
  margin-right: 12px;
}
.turnstile-badge .badge-brand {
  font-size: 9px;
  color: #888;
  letter-spacing: 0.5px;
  border-left: 1px solid #eee;
  padding-left: 8px;
}

.btn-submit-comment {
  background: #14425d;
  color: #ffffff;
  border: none;
  padding: 6px 16px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-submit-comment:hover {
  background: #0d2f43;
}

/* Comment List */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.comment-item:last-child {
  border-bottom: none;
}
.comment-item-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.comment-item-avatar {
  flex-shrink: 0;
}
.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
}

.comment-item-content {
  flex: 1;
  min-width: 0;
}
.comment-author-header {
  margin-bottom: 4px;
  font-size: 13px;
}
.comment-author-name {
  color: #333333;
  font-weight: 700;
  margin-right: 8px;
}
.comment-time-ago {
  color: #888888;
  font-size: 12px;
}
.comment-text-body {
  font-size: 13.5px;
  color: #444444;
  line-height: 1.5;
  margin: 4px 0 6px;
  word-wrap: break-word;
}
.comment-text-body p {
  margin: 0;
}
.comment-action-links {
  font-size: 12px;
}
.comment-reply-link {
  color: #888888;
  text-decoration: none;
}
.comment-reply-link:hover {
  color: #14425d;
  text-decoration: underline;
}

/* ==========================================================================
   FOOTER (CHU?N TRUYENFULL.LIVE)
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #dcdcdc;
  padding: 20px 0;
  margin-top: 30px;
  font-size: 13px;
  color: #666666;
  text-align: center;
}
.footer-contact {
  margin-bottom: 8px;
}
.footer-contact a {
  color: #333;
  font-weight: 600;
}
.footer-seo-desc {
  max-width: 750px;
  margin: 0 auto 10px;
  line-height: 1.5;
  font-size: 12.5px;
}
.footer-license {
  margin-top: 8px;
  font-size: 11.5px;
  color: #888;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 767px) {
  .site-header { height: auto; padding: 0; }
  .header-spacing { height: 50px; }
  .header-container { flex-direction: column; height: auto; padding: 5px 15px; }
  .navbar-header { width: 100%; justify-content: space-between; height: 44px; }
  .navbar-toggle {
    display: block !important;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
  }
  .icon-bar { display: block; width: 20px; height: 2px; background: #fff; margin: 4px 0; }
  
  .navbar-collapse {
    display: none !important;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--tf-brand-dark);
    padding: 10px 0;
    height: auto;
  }
  .navbar-collapse.in { display: flex !important; }
  .navbar-nav { flex-direction: column; align-items: stretch; width: 100%; height: auto; }
  .navbar-nav > li > a { height: 38px; line-height: 38px; padding: 0 10px; }
  .auth-nav { margin: 10px 0 0; width: 100%; height: auto; }
  .search-form { width: 100%; margin: 10px 0; height: auto; }
  .search-form .input-group { width: 100%; }
  .search-input { width: 100%; }

  .mega-menu-content {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    padding: 10px;
    border-radius: 4px;
  }
  
  .list-item-row { flex-wrap: wrap; }
  .item-title { width: 100%; flex: none; margin-bottom: 4px; }
  .item-genres, .item-author { display: none; }
  .item-chapter { flex: 1; text-align: left; }
  .item-time { width: auto; }

  .col-truyen-main, .col-truyen-sidebar { width: 100%; float: none; }
  .story-cover-col, .story-desc-col { width: 100%; float: none; padding: 0; }
}
