/*
Theme Name: TruyenHay - Manga & Novel Reader
Theme URI: https://truyenhay.vn
Author: TruyenHay Team
Description: WordPress theme chuyên dụng cho trang đọc truyện tranh, light novel, web novel với đầy đủ tính năng: quản lý chapter, theo dõi truyện, bình luận, báo lỗi. Tối ưu SEO và responsive toàn thiết bị.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: truyenhay
Tags: manga, novel, reading, dark, responsive, seo
*/

/* ============================================================
   CSS VARIABLES & BASE RESET
   ============================================================ */
:root {
  --bg-primary: #0d0f14;
  --bg-secondary: #141720;
  --bg-card: #1a1d27;
  --bg-card-hover: #1f2235;
  --bg-sidebar: #12151f;
  --accent: #f0a500;
  --accent-hover: #ffb800;
  --accent-soft: rgba(240,165,0,0.12);
  --accent-red: #e05252;
  --accent-green: #4caf82;
  --accent-blue: #4a9eff;
  --text-primary: #e8eaf0;
  --text-secondary: #8b90a7;
  --text-muted: #555c78;
  --border: #252840;
  --border-light: #2e3350;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-reading: 'Merriweather', serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================================
   UTILITIES
   ============================================================ */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid { display: grid; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-red { background: rgba(224,82,82,0.12); color: var(--accent-red); }
.badge-green { background: rgba(76,175,130,0.12); color: var(--accent-green); }
.badge-blue { background: rgba(74,158,255,0.12); color: var(--accent-blue); }
.badge-gray { background: rgba(139,144,167,0.12); color: var(--text-secondary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 600; transition: all var(--transition); cursor: pointer;
  border: 1.5px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: #000; border-color: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--text-primary); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--border-light); }
.btn-danger { background: rgba(224,82,82,0.15); color: var(--accent-red); border-color: rgba(224,82,82,0.3); }
.btn-danger:hover { background: rgba(224,82,82,0.25); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { width: 100%; }

.section-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ''; display: block; width: 4px; height: 22px;
  background: var(--accent); border-radius: 2px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.view-all { font-size: 13px; color: var(--text-secondary); }
.view-all:hover { color: var(--accent); }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(13,15,20,0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 64px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--text-primary) !important;
  letter-spacing: -0.5px; flex-shrink: 0;
}
.site-logo span { color: var(--accent); }

.main-nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-item a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.nav-item a:hover, .nav-item.current-menu-item a {
  color: var(--text-primary); background: rgba(255,255,255,0.07);
}
.nav-item.has-dropdown { position: relative; }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px; min-width: 200px;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transform: translateY(-8px); transition: all var(--transition);
  z-index: 100;
}
.nav-item.has-dropdown:hover .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px; width: 100%;
}
.nav-dropdown a:hover { background: var(--accent-soft); color: var(--accent); }

.header-search { flex: 1; max-width: 320px; position: relative; }
.header-search input {
  width: 100%; background: var(--bg-secondary);
  border: 1.5px solid var(--border); border-radius: 50px;
  padding: 8px 16px 8px 38px; color: var(--text-primary);
  font-size: 13px; transition: all var(--transition);
}
.header-search input:focus {
  outline: none; border-color: var(--accent);
  background: var(--bg-card);
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; font-size: 15px;
}
.search-results-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  max-height: 400px; overflow-y: auto; z-index: 200;
  display: none;
}
.search-results-dropdown.active { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; transition: background var(--transition);
  cursor: pointer;
}
.search-result-item:hover { background: var(--accent-soft); }
.search-result-item img { width: 36px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { font-size: 11px; color: var(--text-secondary); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-notify-btn, .header-theme-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); color: var(--text-secondary);
  font-size: 16px; transition: all var(--transition); position: relative;
}
.header-notify-btn:hover, .header-theme-btn:hover {
  background: rgba(255,255,255,0.1); color: var(--text-primary);
}
.notify-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; background: var(--accent-red);
  border-radius: 50%; border: 2px solid var(--bg-primary);
}
.user-avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 5px 10px; cursor: pointer; transition: all var(--transition);
  position: relative;
}
.user-avatar-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--border-light); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #000; overflow: hidden; flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px; min-width: 200px;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transform: translateY(-8px); transition: all var(--transition); z-index: 100;
}
.user-avatar-btn:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-header { padding: 8px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.user-dropdown-name { font-weight: 700; font-size: 14px; }
.user-dropdown-email { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  transition: all var(--transition);
}
.user-dropdown a:hover { background: var(--accent-soft); color: var(--accent); }
.user-dropdown .logout-link { color: var(--accent-red) !important; }
.user-dropdown .logout-link:hover { background: rgba(224,82,82,0.1) !important; }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 8px 0; }

.mobile-menu-btn {
  display: none; width: 38px; height: 38px;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 20px; flex-shrink: 0;
}

/* ============================================================
   HERO / SLIDER
   ============================================================ */
.hero-slider {
  position: relative; overflow: hidden;
  background: var(--bg-secondary);
  height: 420px;
}
.hero-slides { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94); }
.hero-slide {
  min-width: 100%; height: 100%; position: relative;
  display: flex; align-items: flex-end;
}
.hero-slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.4);
}
.hero-slide-content {
  position: relative; z-index: 1; padding: 40px;
  max-width: 600px;
}
.hero-slide-genres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-slide-title {
  font-family: var(--font-display); font-size: 32px; font-weight: 800;
  line-height: 1.2; color: #fff; margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-slide-desc { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 20px; line-height: 1.7; }
.hero-slide-actions { display: flex; gap: 10px; }
.hero-controls {
  position: absolute; bottom: 20px; right: 40px;
  display: flex; align-items: center; gap: 10px; z-index: 10;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.3); cursor: pointer; transition: all var(--transition);
}
.hero-dot.active { background: var(--accent); width: 24px; border-radius: 4px; }
.hero-prev, .hero-next {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; cursor: pointer;
  transition: all var(--transition); border: 1px solid rgba(255,255,255,0.2);
}
.hero-prev:hover, .hero-next:hover { background: var(--accent); }

/* ============================================================
   STORY CARD
   ============================================================ */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.story-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border); overflow: hidden;
  transition: all var(--transition); position: relative;
}
.story-card:hover {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(240,165,0,0.12);
}
.story-card-thumb {
  position: relative; aspect-ratio: 2/3; overflow: hidden;
}
.story-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.story-card:hover .story-card-thumb img { transform: scale(1.05); }
.story-card-status {
  position: absolute; top: 8px; left: 8px; z-index: 2;
}
.story-card-chapter {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  padding: 20px 10px 8px;
  font-size: 11px; color: rgba(255,255,255,0.8);
}
.story-card-body { padding: 12px; }
.story-card-title {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
}
.story-card-views { display: flex; align-items: center; gap: 3px; }
.story-card-rating { color: var(--accent); font-weight: 600; }

/* Large card for featured */
.story-card-lg {
  display: grid; grid-template-columns: 120px 1fr;
  gap: 0; background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border); overflow: hidden;
  transition: all var(--transition);
}
.story-card-lg:hover { border-color: var(--accent); }
.story-card-lg .story-card-thumb { aspect-ratio: unset; height: 100%; min-height: 120px; }
.story-card-lg .story-card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.story-card-lg .story-card-title { font-size: 15px; -webkit-line-clamp: 1; }
.story-card-lg .story-card-desc {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.story-card-lg .story-card-genres { display: flex; gap: 4px; flex-wrap: wrap; }
.story-card-lg .story-card-chapters { font-size: 12px; color: var(--text-muted); }
.story-card-lg .story-card-latest {
  font-size: 13px; color: var(--accent); font-weight: 600;
}

/* ============================================================
   HOMEPAGE SECTIONS
   ============================================================ */
.home-main { padding: 32px 0; }
.home-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.home-section { margin-bottom: 36px; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--bg-secondary); padding: 4px; border-radius: var(--radius-sm); width: fit-content; }
.tab-btn {
  padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
}
.tab-btn.active { background: var(--accent); color: #000; }
.tab-btn:hover:not(.active) { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Ranking List */
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; background: var(--bg-card); border-radius: var(--radius-sm);
  border: 1px solid var(--border); transition: all var(--transition);
}
.rank-item:hover { border-color: var(--border-light); }
.rank-num {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; font-family: var(--font-display);
}
.rank-num.top1 { background: linear-gradient(135deg,#f0a500,#ff6b00); color: #000; }
.rank-num.top2 { background: linear-gradient(135deg,#c0c0c0,#a0a0a0); color: #000; }
.rank-num.top3 { background: linear-gradient(135deg,#cd7f32,#a0522d); color: #fff; }
.rank-num.other { background: var(--bg-secondary); color: var(--text-muted); }
.rank-thumb { width: 36px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.rank-info { flex: 1; min-width: 0; }
.rank-title { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.rank-views { font-size: 12px; color: var(--text-secondary); font-weight: 600; flex-shrink: 0; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.sidebar-widget-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-widget-header .icon { color: var(--accent); }
.sidebar-widget-body { padding: 14px 16px; }
.genre-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-tag {
  padding: 5px 12px; border-radius: 50px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary); transition: all var(--transition);
  cursor: pointer;
}
.genre-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ============================================================
   STORY DETAIL PAGE
   ============================================================ */
.story-detail { padding: 28px 0; }
.story-detail-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; }
.story-cover { position: relative; }
.story-cover img { width: 100%; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.story-cover-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.story-info { display: flex; flex-direction: column; gap: 20px; }
.story-title {
  font-family: var(--font-display); font-size: 30px; font-weight: 800;
  line-height: 1.2; color: var(--text-primary);
}
.story-alt-title { font-size: 14px; color: var(--text-secondary); }
.story-meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.story-meta-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.story-meta-item:nth-child(odd) { padding-right: 20px; border-right: 1px solid var(--border); }
.story-meta-item:nth-child(even) { padding-left: 20px; }
.story-meta-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.story-meta-value { font-size: 14px; color: var(--text-primary); font-weight: 600; }
.story-meta-value a { color: var(--accent); }
.story-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.story-genre-tag {
  padding: 4px 12px; border-radius: 50px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary); transition: all var(--transition);
}
.story-genre-tag:hover { border-color: var(--accent); color: var(--accent); }
.story-stats { display: flex; gap: 20px; }
.story-stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.story-stat .icon { color: var(--accent); }
.story-desc-box { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 16px; }
.story-desc-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; font-weight: 600; }
.story-desc-text { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
.story-desc-text.collapsed { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.read-more-btn { font-size: 13px; color: var(--accent); cursor: pointer; margin-top: 6px; background: none; border: none; font-family: inherit; }
.story-action-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.follow-btn.following { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* Chapter List */
.chapter-list-section { margin-top: 28px; }
.chapter-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chapter-search { position: relative; }
.chapter-search input {
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px 8px 36px;
  color: var(--text-primary); font-size: 13px; width: 220px; transition: all var(--transition);
}
.chapter-search input:focus { outline: none; border-color: var(--accent); }
.chapter-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.chapter-list { display: flex; flex-direction: column; gap: 2px; max-height: 480px; overflow-y: auto; }
.chapter-list::-webkit-scrollbar { width: 4px; }
.chapter-list::-webkit-scrollbar-track { background: var(--bg-secondary); }
.chapter-list::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
.chapter-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: var(--radius-sm);
  transition: background var(--transition); cursor: pointer;
}
.chapter-item:hover { background: var(--bg-secondary); }
.chapter-item.read { opacity: 0.6; }
.chapter-item-left { display: flex; align-items: center; gap: 10px; }
.chapter-item-num { font-size: 14px; font-weight: 700; color: var(--accent); font-family: var(--font-display); min-width: 60px; }
.chapter-item-name { font-size: 13px; color: var(--text-primary); }
.chapter-item-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.chapter-item-date { font-size: 11px; color: var(--text-muted); }
.chapter-report-btn { font-size: 12px; color: var(--text-muted); cursor: pointer; }
.chapter-report-btn:hover { color: var(--accent-red); }
.chapter-pagination { display: flex; gap: 4px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.chapter-page-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; transition: all var(--transition);
  color: var(--text-secondary);
}
.chapter-page-btn.active, .chapter-page-btn:hover { background: var(--accent); border-color: var(--accent); color: #000; }

/* ============================================================
   READING PAGE
   ============================================================ */
.reading-page { background: var(--bg-primary); min-height: 100vh; }
.reading-navbar {
  position: sticky; top: 0; z-index: 900;
  background: rgba(13,15,20,0.97); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 10px 0;
}
.reading-nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.reading-story-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reading-story-title { font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reading-chapter-name { font-size: 12px; color: var(--text-muted); }
.reading-nav-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chapter-nav-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px;
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.chapter-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.chapter-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chapter-select {
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px; color: var(--text-primary);
  font-size: 13px; cursor: pointer; max-width: 200px;
}
.chapter-select:focus { outline: none; border-color: var(--accent); }
.reading-settings-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 17px; cursor: pointer;
  transition: all var(--transition);
}
.reading-settings-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Reading settings panel */
.reading-settings-panel {
  position: fixed; top: 70px; right: 20px; z-index: 800;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px; width: 280px;
  box-shadow: var(--shadow-lg); display: none;
}
.reading-settings-panel.open { display: block; }
.settings-section { margin-bottom: 18px; }
.settings-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; font-weight: 600; }
.font-size-control { display: flex; align-items: center; gap: 10px; }
.font-size-control button {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); font-size: 18px; cursor: pointer;
  transition: all var(--transition);
}
.font-size-control button:hover { border-color: var(--accent); color: var(--accent); }
.font-size-display { font-size: 14px; font-weight: 700; min-width: 40px; text-align: center; }
.font-family-options { display: flex; gap: 6px; flex-wrap: wrap; }
.font-option {
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  font-size: 12px; color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition);
}
.font-option.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.line-height-slider, .width-slider {
  width: 100%; accent-color: var(--accent);
}
.theme-options { display: flex; gap: 6px; }
.theme-option {
  flex: 1; padding: 8px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); cursor: pointer; font-size: 12px;
  text-align: center; font-weight: 600; transition: all var(--transition);
}
.theme-option[data-theme="dark"] { background: #0d0f14; color: #e8eaf0; }
.theme-option[data-theme="sepia"] { background: #f5f0e8; color: #3d3028; }
.theme-option[data-theme="white"] { background: #ffffff; color: #1a1a1a; }
.theme-option.active { border-color: var(--accent); }

/* Reading content */
.reading-content-wrap {
  max-width: 820px; margin: 0 auto; padding: 32px 20px;
}
.chapter-title-display {
  text-align: center; margin-bottom: 32px;
  padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.chapter-title-display h1 {
  font-family: var(--font-display); font-size: 22px; font-weight: 800;
  color: var(--text-primary); margin-bottom: 6px;
}
.chapter-title-display p { font-size: 13px; color: var(--text-muted); }
.reading-text {
  font-family: var(--font-reading); font-size: 18px; line-height: 1.9;
  color: #d0d3e0; letter-spacing: 0.01em;
}
.reading-text p { margin-bottom: 1.4em; }
.reading-text-sans { font-family: var(--font-body); }
.reading-text-serif { font-family: var(--font-reading); }
.reading-text-mono { font-family: 'Courier New', monospace; }

/* Image reading (manga/manhwa) */
.reading-images { max-width: 900px; margin: 0 auto; }
.reading-image { display: block; width: 100%; margin: 0 auto; }

/* Bottom nav for reading */
.reading-bottom-bar {
  position: sticky; bottom: 0; z-index: 900;
  background: rgba(13,15,20,0.97); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border); padding: 12px 0;
}
.reading-bottom-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.reading-progress { flex: 1; }
.reading-progress-bar {
  height: 4px; background: var(--bg-secondary); border-radius: 2px; overflow: hidden;
}
.reading-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.1s; }
.reading-progress-text { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-align: right; }
.reading-report-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px;
  background: rgba(224,82,82,0.1); border: 1.5px solid rgba(224,82,82,0.3);
  border-radius: var(--radius-sm); color: var(--accent-red); font-size: 12px;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.reading-report-btn:hover { background: rgba(224,82,82,0.2); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; visibility: hidden; transition: all 0.25s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); transform: translateY(16px);
  transition: transform 0.25s; overflow: hidden;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.modal-close {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); color: var(--text-secondary);
  cursor: pointer; font-size: 18px; transition: all var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================================
   AUTH MODAL
   ============================================================ */
.auth-tabs { display: flex; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; padding: 12px; text-align: center; font-size: 14px; font-weight: 700;
  color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all var(--transition);
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input {
  width: 100%; background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text-primary);
  font-size: 14px; transition: all var(--transition);
}
.form-input:focus { outline: none; border-color: var(--accent); background: var(--bg-card); }
.form-input::placeholder { color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--accent-red); margin-top: 4px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 12px; margin: 16px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.social-login { display: flex; gap: 10px; }
.social-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  color: var(--text-primary); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.social-btn:hover { border-color: var(--border-light); background: var(--bg-card); }

/* ============================================================
   REPORT MODAL
   ============================================================ */
.report-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.report-option {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.report-option:hover, .report-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.report-option input[type="radio"] { accent-color: var(--accent); }
.report-option-label { font-size: 13px; color: var(--text-primary); }

/* ============================================================
   USER DASHBOARD
   ============================================================ */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 28px 0; }
.dashboard-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; height: fit-content; }
.dashboard-avatar { text-align: center; padding: 16px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.dashboard-avatar-img {
  width: 72px; height: 72px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
  font-size: 28px; font-weight: 800; color: #000; overflow: hidden;
}
.dashboard-avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-username { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.dashboard-email { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.dashboard-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
  margin-bottom: 2px;
}
.dashboard-nav-item:hover, .dashboard-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.dashboard-nav-item .icon { width: 18px; text-align: center; }
.dashboard-main { display: flex; flex-direction: column; gap: 24px; }
.dashboard-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.dashboard-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dashboard-card-body { padding: 20px; }
.following-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  background: var(--bg-secondary); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.history-item-thumb { width: 36px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.history-item-info { flex: 1; min-width: 0; }
.history-item-title { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item-chapter { font-size: 12px; color: var(--text-muted); }
.history-item-date { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; margin: 28px 0; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 14px; cursor: pointer;
  transition: all var(--transition); font-weight: 600;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #000; }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.page-dots { color: var(--text-muted); padding: 0 4px; }

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

/* ============================================================
   COMMENT SECTION
   ============================================================ */
.comment-section { margin-top: 36px; }
.comment-form { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 20px; margin-bottom: 24px; }
.comment-form textarea {
  width: 100%; background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text-primary);
  font-size: 14px; resize: vertical; min-height: 100px; font-family: inherit;
  transition: all var(--transition);
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item { display: flex; gap: 12px; }
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #000; overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-content { flex: 1; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.comment-date { font-size: 11px; color: var(--text-muted); }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.comment-actions { display: flex; gap: 10px; margin-top: 8px; }
.comment-action-btn { font-size: 12px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.comment-action-btn:hover { color: var(--accent); }
.comment-replies { margin-top: 14px; margin-left: 24px; display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); margin-top: 48px; }
.footer-main { padding: 40px 0 28px; display: grid; grid-template-columns: 1fr repeat(3, auto); gap: 40px; }
.footer-brand { max-width: 280px; }
.footer-brand .site-logo { font-size: 24px; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 15px; transition: all var(--transition);
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-col-title { font-size: 13px; font-weight: 800; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: var(--text-secondary); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { padding: 16px 0; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-copy { font-size: 12px; color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 14px; }
.footer-bottom-links a { font-size: 12px; color: var(--text-muted); }
.footer-bottom-links a:hover { color: var(--accent); }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  font-size: 14px; min-width: 280px; max-width: 360px;
  animation: slideInRight 0.3s ease; color: var(--text-primary);
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent-blue); }
.toast.warning { border-left: 3px solid var(--accent); }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   LOADING / SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-card { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.skeleton-thumb { aspect-ratio: 2/3; }
.skeleton-line { height: 12px; margin: 8px 0; }

/* ============================================================
   404 & EMPTY STATES
   ============================================================ */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 60px; margin-bottom: 16px; opacity: 0.3; }
.empty-state-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-state-desc { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .home-layout { grid-template-columns: 1fr; }
  .story-detail-layout { grid-template-columns: 200px 1fr; }
  .dashboard-layout { grid-template-columns: 200px 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 900px) {
  .story-detail-layout { grid-template-columns: 1fr; }
  .story-detail-layout .story-cover { max-width: 220px; }
  .story-meta-grid { grid-template-columns: 1fr; }
  .story-meta-item:nth-child(odd) { border-right: none; padding-right: 0; }
  .story-meta-item:nth-child(even) { padding-left: 0; }
  .hero-slider { height: 320px; }
  .hero-slide-title { font-size: 22px; }
  .hero-slide-content { padding: 24px; }
  .reading-settings-panel { right: 10px; left: 10px; width: auto; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .header-search { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-slider { height: 260px; }
  .hero-slide-desc { display: none; }
  .story-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .dashboard-avatar { display: none; }
  .footer-main { grid-template-columns: 1fr; }
  .reading-story-info { display: none; }
  .chapter-select { max-width: 120px; }
  .container { padding: 0 14px; }
}

@media (max-width: 480px) {
  .story-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .story-card-body { padding: 8px; }
  .story-card-title { font-size: 11px; }
  .reading-content-wrap { padding: 20px 14px; }
  .reading-text { font-size: 16px; }
  .btn { padding: 9px 16px; font-size: 13px; }
  .hero-slide-content { padding: 16px; }
  .hero-slide-actions { flex-direction: column; }
  .modal-box { border-radius: var(--radius-md); }
}

/* ============================================================
   MOBILE MENU OVERLAY
   ============================================================ */
.mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0,0,0,0.7); opacity: 0; visibility: hidden; transition: all 0.25s;
}
.mobile-menu-overlay.open { opacity: 1; visibility: visible; }
.mobile-menu-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: 300px; max-width: 85vw;
  background: var(--bg-sidebar); border-right: 1px solid var(--border);
  padding: 24px 16px; overflow-y: auto;
  transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}
.mobile-menu-overlay.open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.mobile-search { margin-bottom: 20px; position: relative; }
.mobile-search input {
  width: 100%; background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px 10px 36px;
  color: var(--text-primary); font-size: 14px;
}
.mobile-search input:focus { outline: none; border-color: var(--accent); }
.mobile-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.mobile-nav-item a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 15px; font-weight: 600;
  transition: all var(--transition);
}
.mobile-nav-item a:hover { background: var(--accent-soft); color: var(--accent); }
.mobile-nav-divider { height: 1px; background: var(--border); margin: 10px 0; }

/* ============================================================
   GENRE / SEARCH ARCHIVE PAGE
   ============================================================ */
.archive-header { padding: 24px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.archive-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.archive-desc { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-label { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.filter-select {
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 30px 7px 12px; color: var(--text-primary);
  font-size: 13px; cursor: pointer; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b90a7' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed; bottom: 80px; right: 24px; z-index: 500;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; font-size: 18px;
  box-shadow: var(--shadow-md); transition: all var(--transition);
  opacity: 0; visibility: hidden;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ============================================================
   SEO SCHEMA / HIDDEN HELPERS
   ============================================================ */
.schema-hidden { display: none; }
