/* ============================================================
   MANGA THEME — MAIN STYLESHEET
   Version: 1.0 | White Base | Yellow Accent
   WordPress Theme: manga-theme
   ============================================================ */

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

/* === CSS VARIABLES === */
:root {
  --primary:         #FFD100;
  --primary-hover:   #E5BC00;
  --primary-light:   #FFFBE5;
  --primary-dark:    #C9A000;
  --nav-bg:          #1A1A1A;
  --nav-text:        rgba(255,255,255,0.85);
  --white:           #FFFFFF;
  --bg:              #F5F5F5;
  --card-bg:         #FFFFFF;
  --text:            #1A1A1A;
  --text-sec:        #555555;
  --text-muted:      #999999;
  --border:          #E8E8E8;
  --red:             #FF3B3B;
  --orange:          #FF8C00;
  --green:           #00C058;
  --shadow-sm:       0 1px 4px rgba(0,0,0,0.07);
  --shadow:          0 2px 12px rgba(0,0,0,0.09);
  --shadow-lg:       0 8px 32px rgba(0,0,0,0.14);
  --radius-sm:       4px;
  --radius:          8px;
  --radius-lg:       14px;
  --transition:      0.2s ease;
  --container:       1200px;
  --font:            'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
h1,h2,h3,h4,h5,h6 { line-height: 1.3; }

/* === CONTAINER === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* === SKIP LINK (Accessibility) === */
.skip-link {
  position: absolute; top: -40px; left: 6px;
  background: var(--primary); color: var(--nav-bg);
  padding: 6px 12px; border-radius: 0 0 4px 4px;
  font-size: 13px; font-weight: 700; z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  background: var(--nav-bg);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.header-inner {
  display: flex; align-items: center;
  height: 56px; gap: 20px;
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
}
/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-text {
  background: var(--primary); color: var(--nav-bg);
  font-weight: 900; font-size: 20px;
  padding: 3px 10px; border-radius: 5px;
  letter-spacing: -0.5px;
}
/* Main Nav */
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav > a {
  color: var(--nav-text); font-size: 14px;
  padding: 6px 11px; border-radius: var(--radius-sm);
  transition: var(--transition); white-space: nowrap; position: relative;
}
.main-nav > a:hover { color: var(--primary); }
.main-nav > a.active { color: var(--primary); }
.hot-tag {
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 1px 4px; border-radius: 3px;
  vertical-align: super; margin-left: 1px;
  line-height: 1.4;
}
/* Search */
.header-search { flex: 1; max-width: 240px; margin-left: auto; position: relative; }
.header-search input {
  width: 100%;
  background: rgba(255,255,255,0.11);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff; padding: 7px 36px 7px 14px;
  border-radius: 18px; font-size: 13px;
  transition: var(--transition);
}
.header-search input::placeholder { color: rgba(255,255,255,0.45); }
.header-search input:focus {
  outline: none;
  background: rgba(255,255,255,0.17);
  border-color: var(--primary);
}
.search-btn {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.55); font-size: 15px;
  display: flex; align-items: center;
}
/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions a {
  color: rgba(255,255,255,0.8); font-size: 13px;
  white-space: nowrap; transition: var(--transition);
}
.header-actions a:hover { color: var(--primary); }
.btn-vip {
  background: linear-gradient(135deg, #FFD100 0%, #FF8C00 100%);
  color: var(--nav-bg) !important; font-weight: 700;
  padding: 5px 13px; border-radius: 14px; font-size: 12px;
}
.header-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #444; border: 2px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); font-size: 13px; overflow: hidden;
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Mobile menu button */
.mobile-menu-btn {
  display: none; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); font-size: 22px; padding: 4px;
}

/* ============================================================
   MOBILE NAV DRAWER
   ============================================================ */
.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden;
  transition: 0.25s ease;
}
.mobile-nav-overlay.active { opacity: 1; visibility: visible; }
.mobile-nav {
  position: absolute; top: 0; left: 0; bottom: 0; width: 260px;
  background: var(--nav-bg); padding: 16px 0; overflow-y: auto;
  transform: translateX(-100%); transition: 0.28s cubic-bezier(.4,0,.2,1);
}
.mobile-nav-overlay.active .mobile-nav { transform: translateX(0); }
.mobile-nav .logo-wrap { padding: 0 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 8px; }
.mobile-nav a {
  display: block; padding: 12px 24px;
  color: rgba(255,255,255,0.82); font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.04); color: var(--primary); }

/* ============================================================
   GENRE SUB-NAV
   ============================================================ */
.genre-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 56px; z-index: 100;
}
.genre-nav-inner {
  display: flex; gap: 0; overflow-x: auto;
  scrollbar-width: none; max-width: var(--container); margin: 0 auto; padding: 0 20px;
}
.genre-nav-inner::-webkit-scrollbar { display: none; }
.genre-nav a {
  padding: 11px 15px; font-size: 14px; color: var(--text-sec);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.genre-nav a:hover { color: var(--primary); }
.genre-nav a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 18px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 9px;
}
.section-title::before {
  content: ''; display: block;
  width: 4px; height: 20px;
  background: var(--primary); border-radius: 2px;
}
.section-more {
  font-size: 13px; color: var(--text-muted); transition: var(--transition);
}
.section-more:hover { color: var(--primary); }

/* ============================================================
   MANGA CARD
   ============================================================ */
.manga-card { position: relative; }
.manga-card__link { display: block; }
.manga-card__cover {
  position: relative; padding-top: 133%;
  border-radius: var(--radius); overflow: hidden;
  background: #ebebeb;
}
.manga-card__cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.32s ease;
}
.manga-card__link:hover .manga-card__cover img { transform: scale(1.06); }
.manga-card__badge {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px;
  line-height: 1.4;
}
.badge-yellow { background: var(--primary); color: var(--nav-bg); }
.badge-red    { background: var(--red); color: #fff; }
.badge-green  { background: var(--green); color: #fff; }
.badge-gray   { background: rgba(0,0,0,0.45); color: #fff; }
.manga-card__views {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  padding: 18px 7px 6px;
  color: rgba(255,255,255,0.92); font-size: 11px;
  display: flex; align-items: center; gap: 3px;
}
.manga-card__info { padding: 7px 2px 0; }
.manga-card__title {
  font-size: 13px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 3px;
}
.manga-card__meta { font-size: 11px; color: var(--text-muted); }

/* Manga Grid */
.manga-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px 14px;
}
.manga-grid-5 { grid-template-columns: repeat(5, 1fr); }
.manga-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: var(--transition); border: none;
  font-family: var(--font);
}
.btn-primary { background: var(--primary); color: var(--nav-bg); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #e52e2e; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-icon { gap: 5px; }

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero { position: relative; overflow: hidden; background: var(--nav-bg); height: 320px; }
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 60px;
  opacity: 0; transition: opacity 0.5s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  filter: brightness(0.38);
}
.hero-slide__content { position: relative; z-index: 1; max-width: 500px; }
.hero-slide__badge {
  background: var(--primary); color: var(--nav-bg);
  font-size: 11px; font-weight: 700; padding: 2px 9px;
  border-radius: 3px; display: inline-block; margin-bottom: 12px;
}
.hero-slide__title {
  font-size: 28px; font-weight: 900; color: #fff;
  margin-bottom: 10px; line-height: 1.25;
}
.hero-slide__desc {
  font-size: 13px; color: rgba(255,255,255,0.68);
  margin-bottom: 22px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px; z-index: 2;
}
.hero-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.38); cursor: pointer;
  transition: var(--transition);
}
.hero-dot.active { background: var(--primary); width: 22px; border-radius: 4px; }
.hero-arrows {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; display: flex; justify-content: space-between;
  padding: 0 12px; z-index: 2; pointer-events: none;
}
.hero-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); font-size: 16px;
  cursor: pointer; pointer-events: auto; transition: var(--transition);
}
.hero-arrow:hover { background: rgba(0,0,0,0.7); color: var(--primary); }

/* ============================================================
   TABS
   ============================================================ */
.tab-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-item {
  padding: 6px 16px; border-radius: 20px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--border); color: var(--text-sec);
  transition: var(--transition);
}
.tab-item:hover { border-color: var(--primary); color: var(--primary); }
.tab-item.active {
  background: var(--primary); border-color: var(--primary);
  color: var(--nav-bg); font-weight: 700;
}

/* ============================================================
   RANKING WIDGET
   ============================================================ */
.rank-list { display: flex; flex-direction: column; gap: 2px; }
.rank-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  transition: var(--transition); cursor: pointer;
}
.rank-item:hover { background: var(--bg); }
.rank-num {
  width: 20px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.rank-1  { background: #FF3B3B; color: #fff; }
.rank-2  { background: #FF8C00; color: #fff; }
.rank-3  { background: var(--primary); color: var(--nav-bg); }
.rank-n  { color: var(--text-muted); }
.rank-cover {
  width: 42px; height: 56px; border-radius: 4px;
  overflow: hidden; flex-shrink: 0; background: var(--border);
}
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { flex: 1; min-width: 0; }
.rank-title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-meta  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.rank-hot   { font-size: 11px; color: var(--red); }

/* ============================================================
   FILTER PANEL (Category)
   ============================================================ */
.filter-panel {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 20px;
  overflow: hidden;
}
.filter-row {
  display: flex; align-items: flex-start;
  padding: 10px 20px; gap: 14px;
  border-bottom: 1px solid var(--border);
}
.filter-row:last-child { border-bottom: none; }
.filter-label {
  width: 42px; flex-shrink: 0; font-size: 13px;
  color: var(--text-muted); padding-top: 5px;
}
.filter-opts { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-opt {
  padding: 4px 13px; border-radius: 4px; font-size: 13px;
  cursor: pointer; color: var(--text-sec); transition: var(--transition);
}
.filter-opt:hover { color: var(--primary); }
.filter-opt.active { background: var(--primary); color: var(--nav-bg); font-weight: 700; border-radius: 4px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 30px 0;
}
.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 14px;
  border: 1px solid var(--border); color: var(--text);
  transition: var(--transition); background: var(--white);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--nav-bg); font-weight: 700; }
.page-btn.disabled { color: var(--text-muted); pointer-events: none; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted); padding: 12px 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ============================================================
   VIP MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.62);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: 0.22s ease;
  backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.vip-modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 460px; max-width: 100%;
  overflow: hidden; position: relative;
  transform: scale(0.93) translateY(16px);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.active .vip-modal { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 13px; right: 15px; z-index: 1;
  color: rgba(255,255,255,0.55); font-size: 24px; line-height: 1;
  cursor: pointer; transition: var(--transition);
}
.modal-close:hover { color: #fff; }
.vip-modal__top {
  background: linear-gradient(135deg, #1C1C1C 0%, #2E2E2E 100%);
  padding: 28px 28px 22px; text-align: center; position: relative;
}
.vip-crown { font-size: 40px; margin-bottom: 8px; }
.vip-modal__top h2 { color: var(--primary); font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.vip-modal__top p { color: rgba(255,255,255,0.6); font-size: 13px; }
.vip-modal__body { padding: 22px 24px; }
.vip-benefits {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 18px;
}
.vip-benefit {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text-sec);
}
.vip-benefit::before { content: '✓'; color: var(--green); font-weight: 900; flex-shrink: 0; }
.vip-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.vip-plan {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; cursor: pointer;
  transition: var(--transition); position: relative;
}
.vip-plan:hover { border-color: var(--primary); }
.vip-plan.selected { border-color: var(--primary); background: var(--primary-light); }
.vip-plan__tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 9px;
  border-radius: 10px; white-space: nowrap;
}
.vip-plan__name { font-size: 12px; color: var(--text-muted); margin-bottom: 7px; }
.vip-plan__price { font-size: 26px; font-weight: 900; color: var(--text); }
.vip-plan__price sub { font-size: 14px; font-weight: 400; }
.vip-plan__save { font-size: 11px; color: var(--red); margin-top: 4px; height: 16px; }
.vip-modal__cta {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #FFD100 0%, #FF8C00 100%);
  color: var(--nav-bg); font-size: 16px; font-weight: 900;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: var(--transition); font-family: var(--font);
  letter-spacing: 0.5px;
}
.vip-modal__cta:hover { opacity: 0.9; transform: translateY(-1px); }
.vip-modal__note { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* ============================================================
   MANGA DETAIL PAGE
   ============================================================ */
.detail-header { background: var(--white); padding: 28px 0; border-bottom: 1px solid var(--border); }
.detail-layout { display: flex; gap: 28px; align-items: flex-start; }
.detail-cover {
  width: 200px; flex-shrink: 0;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-cover img { width: 100%; display: block; }
.detail-info { flex: 1; }
.detail-title { font-size: 26px; font-weight: 900; margin-bottom: 6px; line-height: 1.2; }
.detail-authors { font-size: 14px; color: var(--text-sec); margin-bottom: 14px; }
.detail-authors a { color: var(--primary); }
.detail-stats {
  display: flex; gap: 20px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 14px; flex-wrap: wrap;
}
.detail-stat { display: flex; align-items: center; gap: 4px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-tag {
  background: var(--bg); color: var(--text-sec);
  font-size: 12px; padding: 3px 10px; border-radius: 3px;
}
.detail-desc {
  font-size: 14px; color: var(--text-sec); line-height: 1.8; margin-bottom: 20px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.detail-desc.expanded { -webkit-line-clamp: unset; }
.desc-toggle { color: var(--primary); font-size: 13px; cursor: pointer; margin-bottom: 20px; display: inline-block; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Chapter Section */
.chapter-section {
  background: var(--white); border-radius: var(--radius);
  margin-top: 16px; overflow: hidden; border: 1px solid var(--border);
}
.chapter-head {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.chapter-head h2 { font-size: 16px; font-weight: 700; }
.chapter-tabs { display: flex; gap: 6px; }
.chapter-tab {
  padding: 4px 12px; border-radius: 4px; font-size: 13px;
  cursor: pointer; color: var(--text-muted);
  border: 1px solid var(--border); transition: var(--transition);
}
.chapter-tab:hover { border-color: var(--primary); color: var(--primary); }
.chapter-tab.active { background: var(--primary); border-color: var(--primary); color: var(--nav-bg); font-weight: 700; }
.chapter-count { font-size: 12px; color: var(--text-muted); }
.chapter-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 14px 20px; gap: 2px;
}
.chapter-item {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px;
  color: var(--text-sec); transition: var(--transition); cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.chapter-item:hover { background: var(--bg); }
.chapter-item.free:hover { color: var(--primary); }
.chapter-item.locked { color: var(--text-muted); }
.chapter-item.locked:hover { background: var(--bg); }
.icon-fire { color: var(--red); font-size: 11px; }
.icon-lock { color: var(--primary); font-size: 11px; }

/* Comments */
.comments-section {
  background: var(--white); border-radius: var(--radius);
  margin-top: 16px; border: 1px solid var(--border); overflow: hidden;
}
.comments-head { padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 700; }
.comment-item {
  display: flex; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.c-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg); overflow: hidden;
}
.c-avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-body { flex: 1; }
.c-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.c-name { font-size: 13px; font-weight: 700; }
.c-date { font-size: 12px; color: var(--text-muted); }
.c-text { font-size: 14px; color: var(--text-sec); line-height: 1.7; }
.c-footer { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.c-like { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.c-like:hover { color: var(--primary); }
.c-reply { font-size: 12px; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.c-reply:hover { color: var(--primary); }

/* Sidebar */
.content-sidebar-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-block { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.sidebar-block__head {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; font-weight: 700;
}
.sidebar-block__head a { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.sidebar-block__head a:hover { color: var(--primary); }
.sidebar-manga-list { padding: 12px 14px; display: flex; flex-direction: column; gap: 13px; }
.sm-item { display: flex; gap: 10px; }
.sm-cover {
  width: 60px; height: 80px; border-radius: 5px;
  overflow: hidden; flex-shrink: 0; background: var(--border);
}
.sm-cover img { width: 100%; height: 100%; object-fit: cover; }
.sm-info { flex: 1; min-width: 0; }
.sm-title { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.sm-author { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.sm-views { font-size: 12px; color: var(--text-muted); }
.qa-list { padding: 8px 14px; }
.qa-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.qa-item:last-child { border-bottom: none; }
.qa-tag { font-size: 11px; background: var(--primary-light); color: var(--primary-dark); padding: 1px 6px; border-radius: 3px; margin-right: 4px; }
.qa-q { font-size: 13px; font-weight: 500; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qa-a { font-size: 12px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   READER PAGE
   ============================================================ */
.reader-page { background: #111; min-height: 100vh; }
.reader-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 50px; background: rgba(0,0,0,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.reader-title {
  color: rgba(255,255,255,0.75); font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.reader-progress-bar {
  position: fixed; top: 50px; left: 0; right: 0; height: 3px; z-index: 200;
  background: rgba(255,255,255,0.08);
}
.reader-progress-fill {
  height: 100%; background: var(--primary); width: 0%;
  transition: width 0.1s linear;
}
.reader-nav { display: flex; align-items: center; gap: 8px; }
.reader-nav select {
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 5px 10px; border-radius: 4px; font-size: 13px;
  font-family: var(--font);
}
.reader-nav-btn {
  color: rgba(255,255,255,0.7); font-size: 13px;
  padding: 5px 12px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.18);
  transition: var(--transition);
}
.reader-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.reader-content {
  max-width: 800px; margin: 0 auto;
  padding: 53px 0 80px;
}
.reader-chapter-label {
  text-align: center; padding: 24px 0 4px;
  color: rgba(255,255,255,0.4); font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.reader-chapter-label:first-child { border-top: none; }
.reader-img { width: 100%; display: block; user-select: none; }
/* VIP lock in reader */
.reader-lock-wrap { position: relative; margin-top: -120px; }
.reader-lock-blur {
  height: 140px; overflow: hidden;
  filter: blur(8px) brightness(0.6);
  pointer-events: none;
}
.reader-lock-blur img { width: 100%; }
.reader-lock-panel {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 0%, rgba(17,17,17,0.9) 35%, #111 60%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: 36px; text-align: center;
}
.reader-lock-icon { font-size: 34px; margin-bottom: 8px; }
.reader-lock-title { color: #fff; font-size: 19px; font-weight: 900; margin-bottom: 6px; }
.reader-lock-sub { color: rgba(255,255,255,0.6); font-size: 13px; margin-bottom: 20px; }
/* Floating toolbar */
.reader-toolbar {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 150;
}
.toolbar-btn {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(40,40,40,0.92); border: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.75); font-size: 11px; gap: 3px;
  cursor: pointer; transition: var(--transition);
}
.toolbar-btn:hover { background: rgba(60,60,60,0.95); color: var(--primary); border-color: var(--primary); }
.toolbar-icon { font-size: 17px; }

/* ============================================================
   AUTH PAGES (Login / Register)
   ============================================================ */
.auth-page {
  min-height: 100vh; background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 20px;
}
.auth-card {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 420px;
  padding: 40px; box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .logo-text { font-size: 26px; }
.auth-title { font-size: 22px; font-weight: 900; text-align: center; margin-bottom: 6px; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-sec); }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--bg);
  transition: var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--primary); background: var(--white);
  box-shadow: 0 0 0 3px rgba(255,209,0,0.14);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--red); }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; display: none; }
.form-control.error + .form-error { display: block; }
.form-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-sec); cursor: pointer; }
.form-check input[type="checkbox"] { accent-color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.form-check a { color: var(--primary); }
.auth-link { font-size: 13px; color: var(--primary); }
.auth-link:hover { text-decoration: underline; }
.auth-submit {
  width: 100%; padding: 13px;
  background: var(--primary); color: var(--nav-bg);
  font-size: 15px; font-weight: 900; border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font); margin-top: 10px;
  transition: var(--transition);
}
.auth-submit:hover { background: var(--primary-hover); }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text-muted); margin: 20px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.social-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); font-size: 13px;
  cursor: pointer; transition: var(--transition); background: var(--white);
  font-family: var(--font);
}
.social-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.social-icon { font-size: 18px; }
.auth-footer { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 22px; }
.auth-footer a { color: var(--primary); font-weight: 700; }
.auth-footer a:hover { text-decoration: underline; }
.password-field { position: relative; }
.password-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); cursor: pointer; font-size: 15px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--nav-bg); color: rgba(255,255,255,0.55);
  padding: 40px 0 0; margin-top: 50px;
}
.footer-grid {
  display: grid; grid-template-columns: 260px 1fr;
  gap: 40px; padding-bottom: 36px;
}
.footer-brand .logo-text { font-size: 22px; display: inline-block; margin-bottom: 14px; }
.footer-brand p { font-size: 12px; line-height: 1.9; color: rgba(255,255,255,0.4); max-width: 220px; }
.footer-brand .footer-socials { display: flex; gap: 12px; margin-top: 14px; }
.footer-social-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5); font-size: 16px; transition: var(--transition);
}
.footer-social-icon:hover { background: var(--primary); color: var(--nav-bg); }
.footer-links-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.footer-col h4 { color: rgba(255,255,255,0.88); font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.footer-col a {
  display: block; color: rgba(255,255,255,0.45);
  font-size: 12px; margin-bottom: 9px; transition: var(--transition);
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0; text-align: center; font-size: 12px;
  color: rgba(255,255,255,0.3);
}
.footer-bottom a { color: rgba(255,255,255,0.35); margin: 0 6px; transition: var(--transition); }
.footer-bottom a:hover { color: var(--primary); }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.section { padding: 28px 0; }
.section-inner { background: var(--white); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-16 { margin-bottom: 16px; }
.text-muted  { color: var(--text-muted); }
.text-red    { color: var(--red); }
.text-primary-c { color: var(--primary); }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }
.ellipsis    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px; line-height: 1.5;
}
.bt-yellow { background: var(--primary); color: var(--nav-bg); }
.bt-red    { background: var(--red); color: #fff; }
.bt-green  { background: var(--green); color: #fff; }
.bt-gray   { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.img-cover { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet: ≤1024px */
@media (max-width: 1024px) {
  .manga-grid { grid-template-columns: repeat(5, 1fr); }
  .content-sidebar-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-links-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { height: 270px; }
}

/* Mobile: ≤768px */
@media (max-width: 768px) {
  html { font-size: 13px; }
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hide-mobile { display: none !important; }
  .header-search { max-width: 160px; }

  .manga-grid { grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
  .manga-grid-4 { grid-template-columns: repeat(3, 1fr); }

  .hero { height: 200px; }
  .hero-slide { padding: 0 20px; }
  .hero-slide__title { font-size: 20px; }
  .hero-slide__desc { display: none; }

  .detail-layout { flex-direction: column; }
  .detail-cover { width: 150px; }
  .detail-actions { flex-wrap: wrap; }

  .chapter-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-links-grid { grid-template-columns: repeat(2, 1fr); }
  .vip-benefits { grid-template-columns: 1fr; gap: 6px; }
  .reader-toolbar { right: 10px; }
  .toolbar-btn { width: 44px; height: 44px; }
  .auth-card { padding: 28px 20px; }
  .social-btns { grid-template-columns: 1fr; }
  .section-title { font-size: 16px; }
  .filter-row { flex-wrap: wrap; }
}

/* Small mobile: ≤480px */
@media (max-width: 480px) {
  .manga-grid { grid-template-columns: repeat(3, 1fr); gap: 8px 6px; }
  .hero { height: 168px; }
  .hero-slide__title { font-size: 16px; }
  .genre-nav a { padding: 10px 11px; font-size: 13px; }
  .chapter-grid { grid-template-columns: repeat(1, 1fr); }
  .vip-plans { grid-template-columns: 1fr; gap: 16px; }
  .vip-plan .vip-plan__tag { top: -9px; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; }
  .header-search { display: none; }
}

/* Chapter update tag in manga cards */
.chapter-update {
  color: var(--orange) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}
