/* ══════════════════════════════════════════════
   Manga Theme - Main Styles (Go-Manga Style)
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --primary: #7b00ff;
  --primary-hover: #6500d9;
  --primary-rgb: 123, 0, 255;
  --radius: 8px;
  --radius-sm: 8px;
  --radius-lg: 8px;
}

[data-theme="dark"] {
  --bg-body: #121212;
  --bg-card: #1e1e1e;
  --bg-card-hover: #2a2a2a;
  --bg-input: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #707070;
  --border-color: #2e2e2e;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg-body: #f5f5f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f0;
  --bg-input: #e8e8e8;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;
  --border-color: #dddddd;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: hidden; }

body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  overflow: hidden;
}

/* ── Header (go-manga style) ── */
.th {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.th .centernav {
  margin: 0 auto;
  max-width: 1220px;
  padding: 0 20px;
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: visible;
}
.shme {
  display: none;
}
header {
  margin-right: 20px;
}
.site-logo.logos {
  display: block;
  text-decoration: none;
}
.site-logo.logos img {
  max-height: 70px;
  width: auto;
  display: block;
}

/* ── Search (go-manga style) ── */
.searchx {
  width: 270px;
  max-width: 100%;
  margin-left: auto;
  position: relative;
  flex-shrink: 1;
}
.searchx #form {
  padding: 0;
  position: relative;
  display: flex;
}
.searchx #form #s {
  font-weight: 300;
  background: #17151b;
  box-shadow: none !important;
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  padding-right: 30px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.42857143;
  color: #fff;
  border: 0;
  border-radius: 50px;
  outline: none;
  transition: border-color ease-in-out .15s;
}
.searchx #form #s::placeholder { color: #888; }
.searchx #form #submit {
  position: absolute;
  background: none;
  color: #555;
  cursor: pointer;
  border: 0;
  padding: 0 7px;
  top: 0;
  font-size: medium;
  right: 2px;
  line-height: 36px;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  min-width: 280px;
}
.search-results-dropdown.active { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-item:last-child { border-bottom: none; }

.search-result-cover { width: 40px; height: 56px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.search-result-cover img { width: 100%; height: 100%; object-fit: cover; }

.search-result-info { flex: 1; min-width: 0; }
.search-result-title { display: block; font-weight: 600; font-size: 0.9rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-genres { display: block; font-size: 0.75rem; color: var(--text-muted); }
.search-result-chapter { display: block; font-size: 0.75rem; color: var(--primary); }
.search-result-rating { font-size: 0.8rem; color: #ffc107; white-space: nowrap; }
.search-no-result { padding: 20px; text-align: center; color: var(--text-muted); }

/* ── Mobile search icon ── */
.srcmob {
  display: none;
}
.srcmob.srccls {
  position: absolute;
  top: 0;
  right: 8px;
  width: auto;
  margin: 0;
  font-size: 20px;
  color: #aaa;
  cursor: pointer;
  line-height: 35px;
}

/* ── Theme Toggle (go-manga style) ── */
#thememode {
  position: relative;
  margin-left: 10px;
  line-height: normal;
}
#thememode .xt {
  text-transform: uppercase;
  font-size: 12px;
  display: block;
  color: rgba(255,255,255,.5);
  margin-bottom: 2px;
  text-align: center;
}
#switchtext { display: none; }
.switch {
  position: relative;
  display: inline-block;
  width: 37px;
  height: 17px;
  top: 0;
  cursor: pointer;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.25);
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "\f186";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 11px;
  color: rgba(255,255,255,.25);
  line-height: 15px;
  width: 15px;
  text-align: center;
  left: 2px;
  bottom: 1px;
  background-color: #223a65;
  transition: .4s;
}
input:checked + .slider:before {
  transform: translateX(18px);
  content: "\f185";
}
.slider.round { border-radius: 34px; background: rgba(0,0,0,.1); }
.slider.round:before { border-radius: 50%; }

/* ── Navigation (go-manga style) ── */
.mm {
}
.clear { clear: both; }
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu { display: flex; }
.menu li a {
  display: block;
  padding: 0 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 76px;
  transition: background 0.2s;
  white-space: nowrap;
}
.menu li a:hover {
  background: rgba(0,0,0,.15);
}

/* ── Layout ── */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 24px 0;
  max-width: 100%;
  overflow: hidden;
}

.homepage, .archive-page, .search-page { padding-top: 0; }

/* ── Sections ── */
.section { margin-bottom: 32px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.section-header h1,
.section-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header h1 i,
.section-header h2 i { color: var(--primary); }

.view-all {
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Manga Card Grid (go-manga style) ── */
.listupd { display: flex; flex-wrap: wrap; gap: 10px; }

.bs {
  width: calc(25% - 8px);
  box-sizing: border-box;
}
.bs .bsx {
  position: relative;
  overflow: hidden;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.bs .bsx a { color: var(--text-primary); display: flex; flex-direction: column; flex: 1; }
.bs .bsx .limit {
  padding: 137% 0 0;
  position: relative;
  overflow: hidden;
  background: #111;
  border-radius: 8px;
}
.bs .bsx .limit img {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: absolute;
  object-fit: cover;
  transition: transform .2s;
}
.bs .bsx:hover .limit img { transform: scale(1.05); }

.typename {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 1;
  padding: 2px 7px;
  font-size: 10px;
  text-transform: uppercase;
  border-radius: 3px;
  color: #fff;
  background: #555;
}
.typename.Manhwa { background: #a12e24; }
.typename.Manhua { background: #009688; }
.typename.Manga { background: #2196f3; }
.typename.Comic { background: #7c3db5; }

.bs .bsx .limit .colored {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 5px;
  background: #ebcf04;
  color: rgba(0,0,0,0.7);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}
.bs .bsx .limit .colored .fas { font-size: 10px; }

.bigor { overflow: hidden; display: flex; flex-direction: column; flex: 1; }
.bs.stylefiv .bsx .bigor { }
.bs .bsx .tt {
  font-size: .95em;
  margin: 8px 0;
  margin-bottom: 3px;
  font-weight: 600;
  line-height: 20px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}
.bs .bsx .tt a {
  color: var(--text-primary);
}
.bs .bsx .adds {
  font-size: 13px;
  color: #999;
  margin-top: auto;
}
.bs .bsx .epxs {
  color: var(--primary);
}
.bs .bsx .numscore {
  line-height: normal;
  font-size: 12px;
}

/* ── Chapter list on cards (go-manga chfiv style) ── */
.bs.stylefiv .bsx .chfiv {
  padding: 0;
  margin: 0;
  margin-top: auto;
  list-style: none;
}
.bs.stylefiv .bsx .chfiv li {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-bottom: 5px;
  background: #333;
  border-radius: 20px;
}
.bs.stylefiv .bsx .chfiv li a {
  color: #ddd;
  font-size: 12px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  display: block;
  padding: 6px 10px;
}
.bs.stylefiv .bsx .chfiv li a:hover {
  color: #fff;
}
.bs.stylefiv .bsx .chfiv li .fivchap {
  float: left;
}
.bs.stylefiv .bsx .chfiv li .fivtime {
  color: #999;
  float: right;
  font-size: 11px;
  font-weight: normal;
}
.bs.styletere .bsx .tt {
  font-size: 13px;
}
.bs.styletere .bsx .tt a {
  color: var(--text-primary);
}
.bs.styletere .bsx .tt a:hover {
  color: var(--primary);
}

/* ── Releases header (go-manga style) ── */
.releases {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #312f40;
  padding: 8px 15px;
}
.releases h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.releases .vl {
  background: var(--primary);
  color: #fff;
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
}
.releases .vl:hover {
  opacity: 0.85;
}

.no-cover, .no-cover-lg, .no-cover-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-input);
}

/* ── Status Badge ── */
.status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-ongoing   { background: var(--primary); color: #000; }
.status-completed { background: #3b82f6; color: #fff; }
.status-hiatus    { background: #ef4444; color: #fff; }

/* ── Manga Detail Page (Go-Manga Style) ── */
.main-info {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow);
}

.info-left {
  flex-shrink: 0;
  width: 250px;
}

.thumb {
  width: 250px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.thumb img { width: 100%; display: block; }

.info-right {
  flex: 1;
  min-width: 0;
}

.entry-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.alternative {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.rating-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.rating-num {
  background: var(--primary);
  color: #000;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.btn-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-bookmark:hover { background: var(--primary-hover); }
.btn-bookmark.bookmarked { background: var(--primary); }

.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-input);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-read:hover { background: var(--primary); color: #000; }

/* Synopsis */
.synopsis-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.synopsis-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary);
}

.synopsis-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}
.synopsis-content p { margin-bottom: 8px; }

/* Info Metadata Rows */
.info-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 16px;
}

.imptdt {
  display: flex;
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.imptdt span {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  min-width: 100px;
  flex-shrink: 0;
}

.imptdt i {
  color: var(--text-primary);
  font-style: normal;
  word-break: break-word;
}

/* Genre Tags - Go-Manga Style (green text links) */
.mgen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mgen a {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary);
  color: #000;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: opacity 0.2s;
}
.mgen a:hover { opacity: 0.8; color: #000; }

.manga-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

/* ── Chapter Box ── */
.chbox {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.chbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.chbox-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.chbox-header h2 i { color: var(--primary); }

.ch-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chlist {
  list-style: none;
  max-height: 600px;
  overflow-y: auto;
}

.chlist li {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.chlist li:last-child { border-bottom: none; }

.chlist li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  color: var(--text-primary);
  transition: background 0.2s;
  border-radius: var(--radius-sm);
}
.chlist li a:hover { background: var(--bg-card-hover); color: var(--primary); }

.chnum { font-weight: 600; white-space: nowrap; min-width: 90px; font-size: 0.9rem; }
.chtitle { flex: 1; font-size: 0.88rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chdate { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: var(--primary-hover); color: #000; }

.btn-secondary { background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn.disabled { opacity: 0.4; pointer-events: none; }

.bookmark-btn.bookmarked { background: var(--primary); color: #000; }

/* ── Chapter List ── */
.chapter-list-section { margin-bottom: 32px; }
.chapter-count { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.chapter-list {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: background 0.2s;
}
.chapter-item:hover { background: var(--bg-card-hover); }
.chapter-item:last-child { border-bottom: none; }
.chapter-item.chapter-read { opacity: 0.5; }

.chapter-number { font-weight: 600; white-space: nowrap; min-width: 100px; font-size: 0.9rem; }
.chapter-title { flex: 1; font-size: 0.88rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-date { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

/* ── Chapter Reader ── */
.chapter-reader { background: #000; min-height: 100vh; }

.chapter-nav-bar {
  background: #0a0a0a;
  border-bottom: 1px solid #2e2e2e;
  position: sticky;
  top: 60px;
  z-index: 50;
}

.chapter-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
}

.back-to-manga {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.current-chapter {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.chapter-nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chapter-select {
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #2e2e2e;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.chapter-images {
  max-width: 900px;
  margin: 0 auto;
}

.chapter-page img {
  width: 100%;
  display: block;
}

.chapter-bottom-nav {
  background: #0a0a0a;
  border-top: 1px solid #2e2e2e;
  padding: 16px 0;
}

.chapter-bottom-nav .chapter-nav-buttons {
  justify-content: center;
}

/* ── Popular Slider (go-manga hothome style) ── */
.hotslid {
  margin-top: 20px;
  margin-bottom: 10px;
}
.hothome .releases {
  background: var(--primary);
  border-radius: 5px 5px 0 0;
  border-bottom: none;
}
.hothome .releases h2 {
  color: #fff;
}
.hothome .listupd.popularslider {
  display: flex;
  flex-wrap: wrap;
  overflow-x: hidden;
  padding: 10px;
  gap: 10px;
  background: var(--bg-card);
  border-radius: 0 0 5px 5px;
}
.hothome .listupd.popularslider > .bs {
  width: calc(100% / 6 - 9px);
  flex-shrink: 0;
}
.hothome .listupd.popularslider .bs .bsx .bigor { }
.hothome .listupd.popularslider .bs .bsx .adds {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #999;
}
.hothome .listupd.popularslider .bs .bsx .epxs {
  color: var(--primary);
  font-size: 12px;
}
.hothome .listupd.popularslider .bs .bsx .rt { line-height: normal; }
/* Rating bar */
.rating { display: flex; align-items: center; gap: 4px; }
.rating-prc { display: flex; align-items: center; }
.rtp { width: 55px; height: 8px; background: #333; border-radius: 4px; overflow: hidden; }
.rtb { height: 100%; }
.rtb span { display: block; height: 100%; background: #ffc107; border-radius: 4px; }
.numscore { font-size: 12px; color: #999; font-weight: 600; }

@media (max-width: 768px) {
  .hothome .listupd.popularslider .bs {
    width: calc(100% / 3 - 7px);
  }
}
@media (max-width: 500px) {
  .hothome .listupd.popularslider .bs {
    width: calc(50% - 5px);
  }
}

/* ── Genre Sections (styletwo - go-manga style) ── */
.bixbox {
  margin-bottom: 30px;
}
.utao.styletwo {
  width: calc(50% - 10px);
  display: inline-block;
  vertical-align: top;
  margin: 0 5px 15px;
}
.utao .uta {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 10px;
}
.utao .imgu {
  width: 100px;
  min-width: 100px;
  position: relative;
}
.utao .imgu a { display: block; }
.utao .imgu img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.utao .imgu .typename {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
}
.utao .luf {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.utao .luf a { text-decoration: none; }
.utao .luf h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.utao .luf ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.utao .luf ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.8rem;
  border-bottom: 1px dashed var(--border-color);
}
.utao .luf ul li:last-child { border-bottom: none; }
.utao .luf ul li a {
  color: var(--text-secondary);
  text-decoration: none;
}
.utao .luf ul li a:hover { color: var(--primary); }
.utao .luf ul li span {
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
  margin-left: 8px;
}
.statusind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  width: fit-content;
}
.statusind i { font-size: 0.5rem; }
.statusind.Ongoing { color: #4bdd9e; background: rgba(75,221,158,0.1); }
.statusind.Completed { color: #2196f3; background: rgba(33,150,243,0.1); }
.statusind.Hiatus { color: #ff9800; background: rgba(255,152,0,0.1); }
.bvlcen {
  text-align: center;
  padding: 15px 0;
}
.bvl {
  display: inline-block;
  padding: 8px 24px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.bvl:hover {
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 768px) {
  .utao.styletwo {
    width: 100%;
    margin: 0 0 10px;
  }
}

/* ── Advanced Search Filter (go-manga style) ── */
.advancedsearch { position: relative; margin-bottom: 20px; }
.quickfilter { padding: 9px; }
.quickfilter .filters { position: relative; display: flex; flex-wrap: wrap; }
.quickfilter .filters .filter {
  width: 50%;
  box-sizing: border-box;
  padding: 6px 5px;
  position: relative;
}
.quickfilter .filters .filter button.dropdown-toggle {
  width: 100%;
  color: #ccc;
  padding: 3px 6px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 2px;
  background-color: #333;
  border: 1px solid #333;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  white-space: nowrap;
}
.quickfilter .filters .filter button.dropdown-toggle span {
  margin: 0 4px;
  color: #999;
  font-size: 11px;
}
.quickfilter .filters .filter.open button.dropdown-toggle,
.quickfilter .filters .filter button.dropdown-toggle:hover {
  color: #333;
  background-color: #d0d0d0;
  border-color: #d0d0d0;
}
.quickfilter .filters .filter i {
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}
.quickfilter .filters .filter ul.dropdown-menu {
  width: 500px;
  margin-top: 1px !important;
  padding: 10px !important;
  font-size: 13px;
  position: absolute;
  display: none;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 160px;
  text-align: left;
  background-color: #333;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 3px;
  box-shadow: 0 6px 12px rgba(0,0,0,.175);
  list-style: none;
}
.quickfilter .filters .filter.open ul.dropdown-menu { display: block; }
.quickfilter .filters .filter ul.dropdown-menu li {
  width: 25%;
  float: left;
  padding: 0 !important;
  border: 0 !important;
}
.quickfilter .filters .filter ul.dropdown-menu li input { display: none; }
.quickfilter .filters .filter ul.dropdown-menu li label {
  display: block;
  color: #ccc;
  padding: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  font-size: 12px;
}
.quickfilter .filters .filter ul.dropdown-menu li label:hover { color: #fff; }
/* Checkbox/radio icons */
.quickfilter .filters .filter ul li input + label:before {
  display: inline-block;
  content: '\f14a';
  margin-right: 5px;
  font-family: "Font Awesome 6 Free";
  color: #5d5d5d;
  font-size: 12px;
}
.quickfilter .filters .filter ul.c1 li input + label:before {
  content: '\f111';
  font-size: 10px;
}
.quickfilter .filters .filter ul li input:checked + label:before {
  font-weight: 900;
  color: #28a745 !important;
}
.quickfilter .filters .filter ul li input.include:checked + label:before {
  font-weight: 900;
  color: #28a745;
}
/* c1 = single column dropdown */
.quickfilter .filters .filter ul.dropdown-menu.c1 {
  max-width: 160px;
  width: auto;
}
.quickfilter .filters .filter ul.dropdown-menu.c1 li {
  width: 100%;
  float: none;
}
/* Genre scrollable */
.quickfilter .filters .filter .genrez {
  max-height: 240px;
  overflow: auto;
}
.quickfilter .filters .filter .genrez::-webkit-scrollbar { width: 5px; }
.quickfilter .filters .filter .genrez::-webkit-scrollbar-thumb { background: var(--primary); }
.quickfilter .filters .filter .genrez::-webkit-scrollbar-track { background: none; }
/* Submit button */
.quickfilter .filters .filter.submit {
  width: 100%;
}
.quickfilter .filters .filter.submit .btn-custom-search {
  width: 100%;
  background: var(--primary) !important;
  color: #000 !important;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
}
.quickfilter .filters .filter.submit .btn-custom-search:hover {
  opacity: 0.85;
}
/* Advanced search in full page mode */
.advancedsearch .quickfilter .filters .filter {
  width: 20%;
  position: static;
}
.advancedsearch .quickfilter .filters .filter.submit {
  width: 20%;
}
.advancedsearch .quickfilter .filters .filter ul.dropdown-menu {
  right: 0;
  left: 0;
  top: auto;
  width: auto;
}
.advancedsearch .quickfilter .filters .filter ul.dropdown-menu.c1 {
  max-width: none;
}
.advancedsearch .quickfilter .filters .filter ul.dropdown-menu.c1 li {
  width: 20%;
  float: left;
}
.advancedsearch .quickfilter .filters .filter ul.dropdown-menu li::after {
  content: "";
  display: table;
  clear: both;
}
/* Responsive filter */
@media (max-width: 768px) {
  .advancedsearch .quickfilter .filters .filter,
  .advancedsearch .quickfilter .filters .filter.submit {
    width: 50%;
  }
  .advancedsearch .quickfilter .filters .filter ul.dropdown-menu {
    position: fixed;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 60vh;
    overflow-y: auto;
  }
  .advancedsearch .quickfilter .filters .filter ul.dropdown-menu.c1 li {
    width: 50%;
  }
}
@media (max-width: 480px) {
  .advancedsearch .quickfilter .filters .filter ul.dropdown-menu li {
    width: 50%;
  }
}

/* ── Sidebar ── */
.sidebar { position: sticky; top: 84px; }

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title i { color: #ffc107; }

.ranking-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.ranking-tab {
  flex: 1;
  padding: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.ranking-tab.active, .ranking-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-card);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.ranking-item:last-child { border-bottom: none; }

.rank-number {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg-input);
  color: var(--text-muted);
}
.rank-1 { background: #ffd700; color: #000; }
.rank-2 { background: #c0c0c0; color: #000; }
.rank-3 { background: #cd7f32; color: #fff; }

.rank-cover {
  width: 42px;
  height: 58px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }

.rank-info { flex: 1; min-width: 0; }
.rank-title { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-title:hover { color: var(--primary); }
.rank-meta { display: flex; gap: 8px; font-size: 0.7rem; color: var(--text-muted); }
.rank-rating { color: #ffc107; }
.rank-views { font-size: 0.7rem; color: var(--text-muted); }

/* ── Star Rating ── */
.star-rating { color: #ffc107; font-size: 0.85rem; }
.star-rating .rating-number { color: var(--text-secondary); margin-left: 4px; }

/* ── 404 ── */
.error-404 { padding: 80px 0; text-align: center; }
.error-content h1 { font-size: 6rem; color: var(--primary); margin-bottom: 8px; font-weight: 700; }
.error-content p { color: var(--text-secondary); margin-bottom: 24px; font-size: 1.1rem; }
.error-actions { display: flex; gap: 12px; justify-content: center; }

/* ── No Data ── */
.no-data { text-align: center; color: var(--text-muted); padding: 40px 20px; }
.no-results { text-align: center; padding: 60px 20px; grid-column: 1 / -1; }

/* ── Load More ── */
.load-more-wrapper { text-align: center; margin-top: 24px; }

/* ── Footer ── */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid #2e2e2e;
  padding: 40px 0 0;
  margin-top: 40px;
  color: #e0e0e0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-col h4 { color: #ffffff; }
.footer-col h4 i { color: var(--primary); }
.footer-col p { font-size: 0.85rem; color: #b0b0b0; }

.footer-menu { list-style: none; }
.footer-menu li a { display: block; padding: 4px 0; font-size: 0.85rem; color: #b0b0b0; }
.footer-menu li a:hover { color: var(--primary); }

.footer-genres { display: flex; flex-wrap: wrap; gap: 6px; }

.footer-bottom {
  border-top: 1px solid #2e2e2e;
  padding: 16px 0;
  text-align: center;
  font-size: 0.8rem;
  color: #707070;
}

/* ── Section Heading (new style) ── */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}
.section-heading h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-heading h2 i { color: var(--primary); }
.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.view-all-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Card overlay (rating + views) ── */
.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  border-radius: 0 0 8px 8px;
}
.card-rating {
  font-size: 11px;
  color: #ffc107;
  font-weight: 600;
}
.card-rating i { font-size: 10px; }
.card-views {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
}
.card-views i { font-size: 9px; margin-right: 2px; }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 15px 0;
}
.pagination a, .pagination span {
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}
.pagination span.current { background: var(--primary); color: #000; border-color: var(--primary); font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-card); }
.pagination .prev, .pagination .next { font-size: 0.82rem; }
.pagination .prev i, .pagination .next i { font-size: 0.75rem; }

.nav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}
.nav-links a, .nav-links span {
  padding: 8px 14px;
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.nav-links .current { background: var(--primary); color: #000; font-weight: 600; }
.nav-links a:hover { background: var(--primary-hover); color: #000; }

.result-count { font-size: 0.85rem; color: var(--text-muted); }

/* ══════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════ */
@media (max-width: 992px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-info { gap: 20px; }
}

@media only screen and (max-width: 890px) {
  .shme {
    display: flex;
    align-items: center;
    font-size: 24px;
    margin-right: 10px;
    color: #fff;
    cursor: pointer;
  }
  .mm { display: none; }
  .mm.shwx {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 3;
    width: 100%;
    height: auto;
    background: #222;
  }
  .mm.shwx .menu {
    display: block;
    margin: 15px 20px;
  }
  .mm.shwx .menu li a {
    text-align: left;
    height: auto !important;
    line-height: 36px !important;
    border-radius: 5px;
    font-weight: 400;
    font-size: 15px !important;
    color: #d3d3d3;
    padding: 0 !important;
  }
  .mm.shwx .menu li a:hover { color: #fff; background: none; }
  header { margin-right: 10px; }
  .site-logo.logos img { max-height: 60px; }
}

@media (max-width: 768px) {
  .container { padding: 0; }

  .main-info { flex-direction: column; align-items: center; text-align: center; padding: 16px; gap: 16px; margin: 16px 0; }
  .info-left { width: 200px; }
  .thumb { width: 200px; }
  .info-right { width: 100%; text-align: left; }
  .entry-title { font-size: 1.2rem; text-align: center; word-break: break-word; }
  .alternative { text-align: center; }
  .rating-wrap { justify-content: center; }
  .action-buttons { justify-content: center; }
  .synopsis-content { font-size: 0.85rem; }
  .info-meta { grid-template-columns: 1fr; }
  .imptdt span { min-width: 90px; font-size: 0.78rem; }
  .imptdt i { font-size: 0.82rem; }
  .mgen { justify-content: center; }
  .manga-genres { justify-content: center; }
  .chbox { padding: 14px 16px; margin-bottom: 20px; }
  .chbox-header h2 { font-size: 1rem; }
  .chlist li a { padding: 10px 2px; gap: 8px; }
  .chnum { font-size: 0.82rem; min-width: 75px; }
  .chdate { font-size: 0.72rem; }

  .bs { width: calc(33.3333% - 7px); }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  .chapter-nav-inner { flex-wrap: wrap; padding: 8px 12px; }
  .back-to-manga { flex: 1 1 100%; font-size: 0.8rem; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; }
  .current-chapter { font-size: 0.85rem; }
  .chapter-select { font-size: 0.8rem; padding: 5px 8px; }
  .chapter-images { max-width: 100%; }

  .error-content h1 { font-size: 4rem; }
}

@media only screen and (max-width: 570px) {
  .searchx { display: none; }
  .srcmob {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    background: rgba(0,0,0,.1);
  }
  .searchx.minmbx {
    display: block;
    top: 0;
    left: 0;
    margin-top: 8px !important;
    width: 100% !important;
    position: absolute;
  }
  .searchx.minmbx #form {
    margin-right: 10px;
    margin-left: 10px;
    z-index: 1;
  }
  .srcmob.srccls {
    position: absolute;
    top: 0;
    right: 8px;
    width: auto;
    margin: 0;
    font-size: 20px;
    color: #aaa;
  }
  .searchx #form #submit { display: none; }
}

@media only screen and (max-width: 500px) {
  .bs { width: calc(50% - 5px); }
}

@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .main-info { padding: 12px; gap: 12px; }
  .info-left { width: 170px; }
  .thumb { width: 170px; }
  .entry-title { font-size: 1.05rem; }
  .action-buttons { gap: 6px; }
  .btn-bookmark, .btn-read { padding: 8px 14px; font-size: 0.82rem; }
  .imptdt span { min-width: 80px; font-size: 0.72rem; }
  .imptdt i { font-size: 0.78rem; }
  .mgen a { padding: 3px 10px; font-size: 0.72rem; }

  .bs .bsx .tt { font-size: 0.8em; }
  .site-logo.logos img { max-height: 55px; }
  .entry-title { font-size: 1rem; }

  .section-header h2 { font-size: 1rem; }

  .chapter-item { padding: 10px 12px; }
  .chapter-number { font-size: 0.78rem; min-width: 70px; }
  .chapter-title { font-size: 0.78rem; }
  .chapter-date { font-size: 0.68rem; }
}

/* ── Genre Widget (go-manga style) ── */
.genre-widget .releases {
  padding: 8px 0;
  margin-bottom: 10px;
}
.genre-widget .releases h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
ul.genre {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
ul.genre li {
  width: 50%;
  box-sizing: border-box;
}
ul.genre li a {
  display: block;
  padding: 5px 8px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: color 0.2s, background 0.2s;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
ul.genre li a:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
