/* ============================================================
   CYBERPUNK — cyberpunk.css
   Deep space dark + electric cyan + neon pink + acid yellow
   ============================================================ */

:root {
  --cb-bg:           #0a0e1a;
  --cb-bg-2:         #0f1525;
  --cb-bg-3:         #141c30;
  --cb-line:         #1f2a44;
  --cb-cyan:         #00f0ff;
  --cb-cyan-soft:    #4dd0ff;
  --cb-pink:         #ff006e;
  --cb-pink-soft:    #ff4f9a;
  --cb-yellow:       #ffea00;
  --cb-purple:       #8338ec;
  --cb-text:         #e0e6ff;
  --cb-text-soft:    #8a93b8;
  --cb-text-dim:     #4a5680;
  --cb-shadow:       0 0 12px rgba(0,240,255,.35);
  --cb-shadow-pink:  0 0 12px rgba(255,0,110,.4);
  --cb-mono:         'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Consolas', monospace;
  --cb-display:      'Orbitron', 'Rajdhani', 'Bebas Neue', 'Impact', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cb-bg);
  color: var(--cb-text);
  font-family: var(--cb-mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Page-wide scanline overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0,240,255,.025) 0px,
    rgba(0,240,255,.025) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 9999;
}

a { color: var(--cb-cyan); text-decoration: none; transition: all .2s ease; }
a:hover { color: var(--cb-pink); text-shadow: var(--cb-shadow-pink); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--cb-cyan); color: var(--cb-bg); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--cb-bg-2); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--cb-cyan), var(--cb-pink)); border-radius: 0; }

.container { max-width: 1280px; }

/* ============================================================
   HEADER
   ============================================================ */

.cb-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,26,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cb-line);
  box-shadow: 0 2px 24px rgba(0,240,255,.1);
}

.cb-header-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 24px;
}

.cb-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cb-cyan);
  font-family: var(--cb-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(0,240,255,.6);
}

.cb-header-logo::before {
  content: "▶";
  color: var(--cb-pink);
  animation: cbBlink 1.2s infinite;
}

.cb-header-logo span { color: var(--cb-pink); }

.cb-header-nav {
  display: flex;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cb-header-nav::-webkit-scrollbar { display: none; }

.cb-header-nav li a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--cb-text-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  white-space: nowrap;
}

.cb-header-nav li a:hover,
.cb-header-nav li a.active {
  color: var(--cb-cyan);
  background: rgba(0,240,255,.06);
}

.cb-header-nav li a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--cb-cyan);
  box-shadow: var(--cb-shadow);
}

.cb-header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cb-header-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--cb-line);
  color: var(--cb-text-soft);
  font-size: 12px;
  letter-spacing: 1px;
  background: var(--cb-bg-2);
}
.cb-header-search:hover { color: var(--cb-cyan); border-color: var(--cb-cyan); }
.cb-header-search img { width: 16px; height: 16px; filter: invert(85%) sepia(40%) saturate(500%) hue-rotate(160deg); }

.cb-header-burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cb-line);
  background: var(--cb-bg-2);
  color: var(--cb-cyan);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Drawer */
.cb-drawer {
  position: fixed;
  top: 0; left: -300px;
  width: 300px; height: 100%;
  background: var(--cb-bg-2);
  border-right: 1px solid var(--cb-cyan);
  box-shadow: 4px 0 24px rgba(0,240,255,.2);
  z-index: 1000;
  transition: left .3s ease;
  overflow-y: auto;
  padding: 20px;
}
.cb-drawer.is-open { left: 0; }
.cb-drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
  display: none;
}
.cb-drawer-mask.is-open { display: block; }
.cb-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cb-line);
  margin-bottom: 16px;
}
.cb-drawer-head h3 {
  margin: 0;
  font-family: var(--cb-display);
  color: var(--cb-cyan);
  font-size: 16px;
  letter-spacing: 2px;
}
.cb-drawer-close {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--cb-line);
  color: var(--cb-pink);
  cursor: pointer;
  font-size: 16px;
}
.cb-drawer-nav { list-style: none; padding: 0; margin: 0; }
.cb-drawer-nav li a {
  display: block;
  padding: 12px 8px;
  color: var(--cb-text);
  border-bottom: 1px solid var(--cb-line);
  font-size: 13px;
  letter-spacing: 1px;
}
.cb-drawer-nav li a:hover { color: var(--cb-cyan); padding-left: 16px; }

/* ============================================================
   BREADCRUMB
   ============================================================ */

.cb-crumb {
  list-style: none;
  padding: 16px 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--cb-text-soft);
}
.cb-crumb li { display: inline-flex; align-items: center; gap: 8px; }
.cb-crumb li::after { content: "//"; color: var(--cb-text-dim); }
.cb-crumb li:last-child::after { content: ""; }
.cb-crumb a { color: var(--cb-text-soft); }
.cb-crumb a:hover { color: var(--cb-cyan); }
.cb-crumb .cb-crumb-curr { color: var(--cb-pink); }

/* ============================================================
   SECTION HEAD
   ============================================================ */

.cb-section {
  padding: 60px 0;
  position: relative;
}

.cb-section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--cb-line);
  padding-bottom: 16px;
}

.cb-section-no {
  font-family: var(--cb-display);
  font-size: 28px;
  color: var(--cb-pink);
  text-shadow: var(--cb-shadow-pink);
  min-width: 36px;
}

.cb-section-title {
  margin: 0;
  font-family: var(--cb-display);
  font-size: 24px;
  letter-spacing: 4px;
  color: var(--cb-text);
  text-transform: uppercase;
}

.cb-section-en {
  font-size: 12px;
  color: var(--cb-text-soft);
  letter-spacing: 2px;
}

.cb-section-tag {
  margin-left: auto;
  font-size: 11px;
  color: var(--cb-text-soft);
  letter-spacing: 1px;
}
.cb-section-tag::before { content: "> "; color: var(--cb-cyan); }
.cb-section-tag em { color: var(--cb-cyan); font-style: normal; }

/* ============================================================
   1. HERO CAROUSEL
   ============================================================ */

.cb-hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  border-bottom: 1px solid var(--cb-line);
  background: var(--cb-bg-2);
}

.cb-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  display: flex;
  align-items: center;
}
.cb-hero-slide.is-active { opacity: 1; }

.cb-hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,14,26,.95) 0%, rgba(10,14,26,.7) 50%, rgba(10,14,26,.3) 100%);
  z-index: 1;
}

.cb-hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: hue-rotate(15deg) saturate(1.1);
}

.cb-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 40px;
  max-width: 1280px;
  margin: 0 auto;
}

.cb-hero-no {
  font-family: var(--cb-display);
  font-size: 64px;
  color: var(--cb-pink);
  text-shadow: var(--cb-shadow-pink);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: 4px;
}

.cb-hero-cat {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0,240,255,.15);
  border: 1px solid var(--cb-cyan);
  color: var(--cb-cyan);
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.cb-hero-title {
  font-family: var(--cb-display);
  font-size: 48px;
  font-weight: 800;
  color: var(--cb-text);
  margin: 0 0 12px;
  max-width: 700px;
  line-height: 1.2;
  text-shadow: 0 0 24px rgba(0,240,255,.4);
  position: relative;
  display: inline-block;
}

.cb-hero-title::before,
.cb-hero-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.cb-hero-title::before {
  color: var(--cb-pink);
  animation: cbGlitch1 4s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-2px, -1px);
  opacity: .85;
}
.cb-hero-title::after {
  color: var(--cb-cyan);
  animation: cbGlitch2 4s infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(2px, 1px);
  opacity: .85;
}

.cb-hero-meta {
  color: var(--cb-text-soft);
  font-size: 13px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.cb-hero-meta strong { color: var(--cb-cyan); font-weight: 500; }

.cb-hero-desc {
  color: var(--cb-text-soft);
  font-size: 14px;
  max-width: 600px;
  margin-bottom: 24px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cb-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--cb-cyan);
  border: 1px solid var(--cb-cyan);
  font-family: var(--cb-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: all .25s;
}
.cb-hero-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cb-cyan);
  transform: translateX(-100%);
  transition: transform .3s ease;
  z-index: -1;
}
.cb-hero-btn:hover { color: var(--cb-bg); box-shadow: var(--cb-shadow); }
.cb-hero-btn:hover::before { transform: translateX(0); }
.cb-hero-btn::after { content: " →"; }

.cb-hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.cb-hero-dots button {
  width: 30px; height: 3px;
  background: var(--cb-text-dim);
  border: none;
  cursor: pointer;
  transition: all .2s;
}
.cb-hero-dots button.is-active {
  background: var(--cb-cyan);
  box-shadow: var(--cb-shadow);
  width: 50px;
}

.cb-hero-progress {
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cb-cyan), var(--cb-pink));
  z-index: 4;
  animation: cbHeroProgress 6s linear infinite;
}

/* ============================================================
   2. HORIZONTAL SCROLL STRIP (books 6-15)
   ============================================================ */

.cb-strip {
  position: relative;
  background: var(--cb-bg-2);
  padding: 40px 0;
  border-bottom: 1px solid var(--cb-line);
}

.cb-strip-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 40px 0;
  scrollbar-width: none;
}
.cb-strip-track::-webkit-scrollbar { display: none; }

.cb-strip-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: var(--cb-bg-3);
  border: 1px solid var(--cb-line);
  position: relative;
  padding: 16px;
  transition: all .25s;
}
.cb-strip-card:hover {
  border-color: var(--cb-cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,240,255,.2);
}

.cb-strip-num {
  position: absolute;
  top: 0; right: 0;
  z-index: 3;
  font-family: var(--cb-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--cb-pink);
  line-height: 1;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(10,14,26,.85) 0%, rgba(10,14,26,.4) 100%);
  text-shadow: var(--cb-shadow-pink);
  letter-spacing: 1px;
}

.cb-strip-img {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--cb-bg);
  margin-bottom: 12px;
}
.cb-strip-img img { width: 100%; height: 100%; object-fit: cover; }
.cb-strip-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0,240,255,.15));
  pointer-events: none;
}

.cb-strip-title {
  font-size: 14px;
  color: var(--cb-text);
  font-weight: 600;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cb-strip-title a { color: inherit; }
.cb-strip-title a:hover { color: var(--cb-cyan); }

.cb-strip-author { font-size: 12px; color: var(--cb-text-soft); }
.cb-strip-cat {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  background: rgba(255,0,110,.12);
  color: var(--cb-pink);
  font-size: 10px;
  letter-spacing: 1px;
  border: 1px solid rgba(255,0,110,.3);
}

.cb-strip-nav {
  position: absolute;
  top: 50%;
  width: 40px; height: 40px;
  background: var(--cb-bg-3);
  border: 1px solid var(--cb-cyan);
  color: var(--cb-cyan);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 5;
}
.cb-strip-nav:hover { background: var(--cb-cyan); color: var(--cb-bg); }
.cb-strip-prev { left: 8px; }
.cb-strip-next { right: 8px; }

/* ============================================================
   3. TERMINAL LIST (books 16-25)
   ============================================================ */

.cb-terminal {
  background: var(--cb-bg);
  padding: 60px 0;
  border-bottom: 1px solid var(--cb-line);
}

.cb-terminal-frame {
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  font-family: var(--cb-mono);
}

.cb-terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--cb-bg-3);
  border-bottom: 1px solid var(--cb-line);
}
.cb-terminal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.cb-terminal-dot.red { background: var(--cb-pink); }
.cb-terminal-dot.yellow { background: var(--cb-yellow); }
.cb-terminal-dot.green { background: var(--cb-cyan); }
.cb-terminal-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--cb-text-soft);
  letter-spacing: 2px;
}

.cb-terminal-body {
  padding: 24px 28px;
}

.cb-term-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--cb-line);
  font-size: 13px;
}
.cb-term-row:last-child { border-bottom: none; }

.cb-term-idx {
  font-family: var(--cb-display);
  color: var(--cb-cyan);
  letter-spacing: 1px;
  min-width: 50px;
}
.cb-term-idx::before { content: "0x"; opacity: .5; font-size: 11px; }

.cb-term-bin {
  font-size: 10px;
  color: var(--cb-text-dim);
  letter-spacing: 1px;
  min-width: 110px;
  font-family: var(--cb-mono);
}

.cb-term-name {
  flex: 1;
  color: var(--cb-text);
}
.cb-term-name a { color: var(--cb-text); }
.cb-term-name a:hover { color: var(--cb-cyan); text-shadow: var(--cb-shadow); }

.cb-term-meta {
  color: var(--cb-text-soft);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cb-term-meta .cb-term-bar {
  display: inline-block;
  width: 60px;
  height: 4px;
  background: var(--cb-bg);
  position: relative;
}
.cb-term-meta .cb-term-bar::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--cb-cyan), var(--cb-pink));
  width: var(--cb-bar-w, 50%);
}
.cb-term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--cb-cyan);
  animation: cbBlink 1s infinite;
  vertical-align: middle;
  margin-left: 8px;
}

.cb-term-prompt {
  margin-top: 16px;
  font-size: 13px;
  color: var(--cb-text-soft);
}
.cb-term-prompt::before { content: "$ "; color: var(--cb-cyan); }

/* ============================================================
   4. RANKING — huge numbers (books 26-35)
   ============================================================ */

.cb-rank {
  background: linear-gradient(180deg, var(--cb-bg-2) 0%, var(--cb-bg) 100%);
  padding: 60px 0;
  border-bottom: 1px solid var(--cb-line);
}

.cb-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cb-rank-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--cb-bg-3);
  border: 1px solid var(--cb-line);
  position: relative;
  overflow: hidden;
  transition: all .25s;
}
.cb-rank-item:hover { border-color: var(--cb-pink); transform: translateX(4px); }
.cb-rank-item:hover .cb-rank-no { color: var(--cb-pink); text-shadow: var(--cb-shadow-pink); }

.cb-rank-no {
  font-family: var(--cb-display);
  font-size: 96px;
  font-weight: 900;
  line-height: 1;
  color: var(--cb-cyan);
  text-shadow: var(--cb-shadow);
  min-width: 110px;
  text-align: center;
  transition: all .25s;
}
.cb-rank-no::before { content: "#"; font-size: 32px; color: var(--cb-text-dim); vertical-align: top; }

.cb-rank-cover {
  width: 80px; height: 110px;
  background: var(--cb-bg);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--cb-line);
}
.cb-rank-cover img { width: 100%; height: 100%; object-fit: cover; }

.cb-rank-info { flex: 1; min-width: 0; }
.cb-rank-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--cb-text);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cb-rank-name a { color: inherit; }
.cb-rank-name a:hover { color: var(--cb-cyan); }
.cb-rank-author { font-size: 12px; color: var(--cb-text-soft); margin-bottom: 6px; }
.cb-rank-cat {
  display: inline-block;
  padding: 2px 8px;
  background: var(--cb-bg);
  color: var(--cb-cyan);
  font-size: 10px;
  letter-spacing: 1px;
  border: 1px solid var(--cb-line);
  margin-right: 6px;
}
.cb-rank-bar {
  margin-top: 8px;
  height: 3px;
  background: var(--cb-bg);
  position: relative;
  overflow: hidden;
}
.cb-rank-bar::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--cb-cyan), var(--cb-pink));
  width: var(--cb-rank-w, 70%);
  animation: cbShimmer 2s linear infinite;
}

/* ============================================================
   5. LATEST UPLOADS — grid with timestamp (30 books)
   ============================================================ */

.cb-latest {
  background: var(--cb-bg-2);
  padding: 60px 0;
  border-bottom: 1px solid var(--cb-line);
}

.cb-latest-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cb-latest-card {
  background: var(--cb-bg-3);
  border: 1px solid var(--cb-line);
  padding: 12px;
  position: relative;
  transition: all .25s;
}
.cb-latest-card:hover { border-color: var(--cb-yellow); transform: translateY(-3px); }
.cb-latest-card:hover .cb-latest-img img { transform: scale(1.06); }

.cb-latest-img {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--cb-bg);
  margin-bottom: 10px;
}
.cb-latest-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }

.cb-latest-time {
  position: absolute;
  top: 6px; left: 6px;
  padding: 2px 6px;
  background: rgba(10,14,26,.85);
  border-left: 2px solid var(--cb-yellow);
  color: var(--cb-yellow);
  font-size: 10px;
  letter-spacing: 1px;
  font-family: var(--cb-mono);
}

.cb-latest-new {
  position: absolute;
  top: 6px; right: 6px;
  background: var(--cb-pink);
  color: #fff;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 2px 5px;
}

.cb-latest-h {
  font-size: 13px;
  color: var(--cb-text);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cb-latest-h a { color: inherit; }
.cb-latest-h a:hover { color: var(--cb-yellow); }

.cb-latest-meta {
  font-size: 11px;
  color: var(--cb-text-soft);
  display: flex;
  justify-content: space-between;
}
.cb-latest-meta .cb-latest-cat { color: var(--cb-cyan); }

/* ============================================================
   6. CATEGORY SHELF — magazine rows (6 rows × 6 books = 36)
   ============================================================ */

.cb-shelf {
  padding: 60px 0 80px;
  background: var(--cb-bg);
}

.cb-shelf-row {
  display: flex;
  align-items: stretch;
  background: linear-gradient(90deg, var(--cb-bg-2) 0%, var(--cb-bg) 50%, var(--cb-bg-2) 100%);
  border: 1px solid var(--cb-line);
  margin-bottom: 20px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: all .3s;
}
.cb-shelf-row::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cb-cyan), var(--cb-pink));
  transition: width .3s;
}
.cb-shelf-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at left, rgba(0,240,255,.08), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.cb-shelf-row:hover { border-color: var(--cb-cyan); }
.cb-shelf-row:hover::before { width: 8px; }
.cb-shelf-row:hover::after { opacity: 1; }
.cb-shelf-row:hover .cb-shelf-row-no { color: var(--cb-pink); text-shadow: var(--cb-shadow-pink); }
.cb-shelf-row:hover .cb-shelf-row-title { color: var(--cb-cyan); text-shadow: var(--cb-shadow); }
.cb-shelf-row:hover .cb-shelf-row-cta { background: var(--cb-cyan); color: var(--cb-bg); }
.cb-shelf-row:hover .cb-shelf-row-cover { transform: translateY(-6px); }
.cb-shelf-row:hover .cb-shelf-row-cover img { transform: scale(1.08); }
.cb-shelf-row:hover .cb-shelf-row-name { color: var(--cb-cyan); }
.cb-shelf-row:hover .cb-shelf-row-author { color: var(--cb-text-soft); }

.cb-shelf-row-l {
  flex: 0 0 280px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 28px;
  border-right: 1px dashed var(--cb-line);
  position: relative;
  z-index: 1;
}

.cb-shelf-row-no {
  font-family: var(--cb-display);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  color: var(--cb-cyan);
  text-shadow: var(--cb-shadow);
  letter-spacing: 2px;
  transition: all .3s;
  min-width: 90px;
}

.cb-shelf-row-info { flex: 1; min-width: 0; }
.cb-shelf-row-title {
  font-family: var(--cb-display);
  font-size: 24px;
  color: var(--cb-text);
  margin: 0 0 6px;
  letter-spacing: 3px;
  transition: all .3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cb-shelf-row-meta {
  font-size: 12px;
  color: var(--cb-text-soft);
  margin: 0 0 12px;
  letter-spacing: 1px;
}
.cb-shelf-row-cta {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--cb-cyan);
  border: 1px solid var(--cb-cyan);
  transition: all .25s;
}

.cb-shelf-row-r {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 20px 16px;
  gap: 10px;
  align-items: start;
}

.cb-shelf-row-book {
  text-align: center;
  min-width: 0;
}

.cb-shelf-row-cover {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--cb-bg);
  border: 1px solid var(--cb-line);
  margin-bottom: 8px;
  position: relative;
  transition: all .3s;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}
.cb-shelf-row-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.cb-shelf-row-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,240,255,.25));
  opacity: 0;
  transition: opacity .3s;
}
.cb-shelf-row:hover .cb-shelf-row-cover::after { opacity: 1; }

.cb-shelf-row-name {
  font-size: 12px;
  color: var(--cb-text-soft);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
  font-weight: 500;
}

.cb-shelf-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 10px;
  line-height: 1.3;
}
.cb-shelf-row-cat {
  color: var(--cb-cyan);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.cb-shelf-row-author {
  color: var(--cb-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
  text-align: right;
}

/* ============================================================
   BOOK CATEGORY PAGE
   ============================================================ */

.cb-cat-hero {
  background:
    linear-gradient(135deg, rgba(0,240,255,.08) 0%, transparent 50%, rgba(255,0,110,.08) 100%),
    var(--cb-bg-2);
  border-bottom: 1px solid var(--cb-cyan);
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cb-cat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0,240,255,.04) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, rgba(0,240,255,.04) 1px, transparent 1px) 0 0/40px 40px;
  pointer-events: none;
}
.cb-cat-hero-inner { position: relative; z-index: 1; }

.cb-cat-eyebrow {
  display: inline-block;
  font-family: var(--cb-display);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--cb-cyan);
  background: rgba(0,240,255,.1);
  border: 1px solid var(--cb-cyan);
  padding: 4px 14px;
  margin-bottom: 16px;
  text-shadow: var(--cb-shadow);
}
.cb-cat-h1 {
  font-family: var(--cb-display);
  font-size: 42px;
  font-weight: 800;
  color: var(--cb-text);
  margin: 0 0 12px;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(0,240,255,.3);
}
.cb-cat-sub {
  color: var(--cb-text-soft);
  font-size: 14px;
  letter-spacing: 1px;
  max-width: 600px;
  margin: 0 auto;
}
.cb-cat-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--cb-text-soft);
}
.cb-cat-stats strong { color: var(--cb-cyan); font-weight: 500; font-size: 14px; margin-right: 4px; }

.cb-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0 80px;
}

.cb-cat-card {
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all .3s;
  text-decoration: none;
  color: inherit;
}
.cb-cat-card:hover {
  border-color: var(--cb-cyan);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,240,255,.15);
}
.cb-cat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--cb-cyan), var(--cb-pink));
  transition: width .3s;
}
.cb-cat-card:hover::before { width: 100%; }

.cb-cat-card-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--cb-bg);
}
.cb-cat-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.cb-cat-card:hover .cb-cat-card-cover img { transform: scale(1.06); }
.cb-cat-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,14,26,.9));
  pointer-events: none;
}

.cb-cat-card-cat {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 8px;
  background: var(--cb-cyan);
  color: var(--cb-bg);
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 700;
  z-index: 2;
}

.cb-cat-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cb-cat-card-h {
  font-size: 15px;
  color: var(--cb-text);
  margin: 0 0 6px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cb-cat-card:hover .cb-cat-card-h { color: var(--cb-cyan); }

.cb-cat-card-author {
  font-size: 12px;
  color: var(--cb-text-soft);
  margin-bottom: 8px;
}
.cb-cat-card-desc {
  font-size: 12px;
  color: var(--cb-text-dim);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.cb-cat-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px dashed var(--cb-line);
  font-size: 11px;
  color: var(--cb-text-dim);
}
.cb-cat-card-foot .cb-cat-card-date { color: var(--cb-cyan); }

/* ============================================================
   BOOK DETAIL
   ============================================================ */

.cb-detail {
  padding: 40px 0 60px;
}

.cb-detail-main {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  padding: 32px;
  position: relative;
  margin-bottom: 32px;
}
.cb-detail-main::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 40px; height: 40px;
  border-top: 2px solid var(--cb-cyan);
  border-left: 2px solid var(--cb-cyan);
}
.cb-detail-main::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 40px; height: 40px;
  border-bottom: 2px solid var(--cb-pink);
  border-right: 2px solid var(--cb-pink);
}

.cb-detail-cover {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--cb-bg);
  border: 1px solid var(--cb-line);
  position: relative;
}
.cb-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.cb-detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(255,0,110,.2));
  pointer-events: none;
}

.cb-detail-info { min-width: 0; }
.cb-detail-h1 {
  font-family: var(--cb-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--cb-text);
  margin: 0 0 16px;
  line-height: 1.2;
}

.cb-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 0;
  border-top: 1px dashed var(--cb-line);
  border-bottom: 1px dashed var(--cb-line);
  font-size: 12px;
  color: var(--cb-text-soft);
  letter-spacing: 1px;
}
.cb-detail-meta strong { color: var(--cb-cyan); font-weight: 500; margin-left: 4px; }

.cb-detail-desc {
  color: var(--cb-text-soft);
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--cb-bg-3);
  border-left: 3px solid var(--cb-cyan);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cb-detail-tags {
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--cb-text-soft);
}
.cb-detail-tags a {
  display: inline-block;
  padding: 3px 10px;
  background: var(--cb-bg-3);
  border: 1px solid var(--cb-line);
  color: var(--cb-text-soft);
  margin-right: 6px;
  margin-bottom: 6px;
}
.cb-detail-tags a:hover { color: var(--cb-cyan); border-color: var(--cb-cyan); }

.cb-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--cb-cyan);
  color: var(--cb-bg);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--cb-cyan);
  position: relative;
  overflow: hidden;
}
.cb-detail-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cb-pink);
  transform: translateX(-100%);
  transition: transform .3s;
}
.cb-detail-btn span { position: relative; z-index: 1; }
.cb-detail-btn:hover { color: var(--cb-bg); box-shadow: var(--cb-shadow-pink); }
.cb-detail-btn:hover::before { transform: translateX(0); }
.cb-detail-btn::after { content: " ▶"; position: relative; z-index: 1; }

.cb-detail-latest {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--cb-bg-3);
  border-left: 3px solid var(--cb-pink);
  font-size: 13px;
  color: var(--cb-text-soft);
}
.cb-detail-latest a { color: var(--cb-pink); }

/* Detail tab body */
.cb-detail-tab {
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  padding: 32px;
  margin-bottom: 32px;
}

.cb-detail-tab-head {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--cb-line);
}

.cb-detail-tab-head button {
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: var(--cb-text-soft);
  font-family: var(--cb-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  cursor: default;
  margin-bottom: -1px;
}

.cb-detail-tab-head button.active {
  color: var(--cb-cyan);
  border-bottom-color: var(--cb-cyan);
  text-shadow: var(--cb-shadow);
}

.cb-detail-excerpt {
  color: var(--cb-text);
  line-height: 2;
  font-size: 15px;
  max-height: 480px;
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
}
.cb-detail-excerpt::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--cb-bg-2));
  pointer-events: none;
}

.cb-detail-mulu-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cb-line);
}
.cb-detail-mulu-h h2 {
  margin: 0;
  font-family: var(--cb-display);
  font-size: 20px;
  color: var(--cb-cyan);
  letter-spacing: 3px;
}
.cb-detail-mulu-h span { color: var(--cb-text-soft); font-size: 12px; }

.cb-chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.cb-chapter-grid a {
  display: block;
  padding: 10px 14px;
  color: var(--cb-text-soft);
  background: var(--cb-bg-3);
  font-size: 13px;
  border: 1px solid var(--cb-line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all .15s;
}
.cb-chapter-grid a:hover { color: var(--cb-cyan); border-color: var(--cb-cyan); background: rgba(0,240,255,.06); }

.cb-detail-more {
  text-align: center;
  margin-top: 24px;
}
.cb-detail-more a {
  display: inline-block;
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--cb-cyan);
  color: var(--cb-cyan);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.cb-detail-more a:hover { background: var(--cb-cyan); color: var(--cb-bg); box-shadow: var(--cb-shadow); }

/* Sidebar */
.cb-side {
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  padding: 20px;
  margin-bottom: 20px;
}
.cb-side-h {
  font-family: var(--cb-display);
  font-size: 14px;
  color: var(--cb-cyan);
  letter-spacing: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cb-line);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cb-side-h a { color: var(--cb-text-soft); font-size: 11px; }

.cb-side-book {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--cb-line);
  text-decoration: none;
  color: var(--cb-text);
  font-size: 13px;
}
.cb-side-book:hover .cb-side-book-title { color: var(--cb-cyan); }
.cb-side-book-cover {
  width: 50px; height: 70px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--cb-bg);
}
.cb-side-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.cb-side-book-title {
  color: var(--cb-text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cb-side-book-meta { font-size: 11px; color: var(--cb-text-soft); margin-top: 4px; }

.cb-side-tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cb-side-tag-list a {
  display: inline-block;
  padding: 3px 10px;
  background: var(--cb-bg-3);
  color: var(--cb-text-soft);
  font-size: 12px;
  border: 1px solid var(--cb-line);
}
.cb-side-tag-list a:hover { color: var(--cb-cyan); border-color: var(--cb-cyan); }

/* ============================================================
   BOOK CHAPTER (READER)
   ============================================================ */

.cb-reader {
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  padding: 40px 60px;
  margin: 30px 0;
  position: relative;
}

.cb-progress {
  position: absolute;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--cb-cyan), var(--cb-pink));
  box-shadow: var(--cb-shadow);
  z-index: 5;
  transition: width .1s linear;
}

.cb-tb {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}
.cb-tb-btn {
  width: 52px;
  height: 52px;
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-cyan);
  color: var(--cb-cyan);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--cb-mono);
  transition: all .2s;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.cb-tb-btn:hover {
  background: var(--cb-cyan);
  color: var(--cb-bg);
  box-shadow: var(--cb-shadow);
  transform: translateX(-2px);
}
.cb-tb-btn span {
  font-size: 20px;
  line-height: 1;
}
.cb-tb-btn em {
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 2px;
  font-style: normal;
  font-family: var(--cb-mono);
  opacity: .9;
}
.cb-tb-btn:hover em { color: var(--cb-bg); }

/* Overlay */
.cb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 210;
  display: none;
  backdrop-filter: blur(2px);
}
.cb-overlay.active { display: block; }

/* Top progress bar */
.cb-progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: transparent;
  z-index: 199;
}
.cb-progress-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cb-cyan), var(--cb-pink));
  box-shadow: var(--cb-shadow);
  transition: width .1s linear;
}

/* TOC drawer (left slide) */
.cb-read-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 320px; height: 100%;
  background: var(--cb-bg-2);
  border-right: 2px solid var(--cb-cyan);
  box-shadow: 4px 0 32px rgba(0,240,255,.2);
  z-index: 220;
  transform: translateX(-100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}
.cb-read-drawer.active { transform: translateX(0); }
.cb-read-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--cb-bg-3);
  border-bottom: 1px solid var(--cb-cyan);
  box-shadow: 0 2px 8px rgba(0,240,255,.15);
}
.cb-read-drawer-head h4 {
  margin: 0;
  font-family: var(--cb-display);
  font-size: 16px;
  color: var(--cb-cyan);
  letter-spacing: 3px;
  text-shadow: var(--cb-shadow);
}
.cb-read-drawer-head button {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--cb-line);
  color: var(--cb-pink);
  font-size: 22px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.cb-read-drawer-head button:hover {
  border-color: var(--cb-pink);
  background: rgba(255,0,110,.1);
}
.cb-read-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.cb-read-drawer-body a {
  display: block;
  padding: 10px 20px;
  color: var(--cb-text-soft);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px dashed var(--cb-line);
  transition: all .15s;
}
.cb-read-drawer-body a:hover {
  color: var(--cb-cyan);
  background: rgba(0,240,255,.05);
  padding-left: 24px;
}
.cb-read-drawer-body a.active {
  color: var(--cb-bg);
  background: var(--cb-cyan);
  border-color: var(--cb-cyan);
  font-weight: 600;
}

/* Bottom sheet (font/theme panel) */
.cb-bottom-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--cb-bg-2);
  border-top: 2px solid var(--cb-cyan);
  box-shadow: 0 -8px 32px rgba(0,240,255,.2);
  z-index: 220;
  transform: translateY(100%);
  transition: transform .3s ease;
  max-height: 70vh;
}
.cb-bottom-sheet.active { transform: translateY(0); }
.cb-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--cb-bg-3);
  border-bottom: 1px solid var(--cb-cyan);
}
.cb-sheet-head h4 {
  margin: 0;
  font-family: var(--cb-display);
  font-size: 16px;
  color: var(--cb-cyan);
  letter-spacing: 3px;
  text-shadow: var(--cb-shadow);
}
.cb-sheet-head button {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--cb-line);
  color: var(--cb-pink);
  font-size: 22px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.cb-sheet-head button:hover {
  border-color: var(--cb-pink);
  background: rgba(255,0,110,.1);
}
.cb-sheet-body { padding: 20px; }

.cb-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed var(--cb-line);
}
.cb-opt-row:last-child { border-bottom: none; }
.cb-opt-row > span {
  color: var(--cb-text-soft);
  font-size: 13px;
  letter-spacing: 1px;
}
.cb-opt-btns {
  display: flex;
  gap: 8px;
}
.cb-opt-btns button {
  min-width: 48px;
  height: 36px;
  background: var(--cb-bg);
  border: 1px solid var(--cb-line);
  color: var(--cb-text-soft);
  font-family: var(--cb-mono);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.cb-opt-btns button:hover {
  border-color: var(--cb-cyan);
  color: var(--cb-cyan);
}
.cb-opt-btns button.active {
  background: var(--cb-cyan);
  color: var(--cb-bg);
  border-color: var(--cb-cyan);
  box-shadow: var(--cb-shadow);
}

.cb-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.cb-theme-item {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: var(--cb-mono);
  transition: all .2s;
  font-weight: 600;
}
.cb-theme-item:hover { transform: scale(1.05); }
.cb-theme-item.active {
  outline: 2px solid var(--cb-cyan);
  outline-offset: 2px;
  box-shadow: var(--cb-shadow);
}

/* Chapter themes (4 themes) — use data-theme attribute */
.cb-reader[data-theme="sepia"] { background: #2c2418; color: #d9c2a0; }
.cb-reader[data-theme="sepia"] .cb-reader-body { color: #d9c2a0; }
.cb-reader[data-theme="sepia"] .cb-reader-title { color: #f0d9a8; }
.cb-reader[data-theme="sepia"] .cb-reader-meta { color: #a89373; }
.cb-reader[data-theme="sepia"] .cb-reader-page a,
.cb-reader[data-theme="sepia"] .cb-reader-page span { color: #d9c2a0; border-color: #5a4a3a; background: #1f1810; }
.cb-reader[data-theme="sepia"] .cb-reader-page .cb-reader-mulu { color: #ff9b6a; border-color: #ff9b6a; }

.cb-reader[data-theme="light"] { background: #f0e8d0; color: #2a2418; }
.cb-reader[data-theme="light"] .cb-reader-body { color: #2a2418; }
.cb-reader[data-theme="light"] .cb-reader-title { color: #1a1410; }
.cb-reader[data-theme="light"] .cb-reader-meta { color: #6a5a48; }
.cb-reader[data-theme="light"] .cb-reader-page a,
.cb-reader[data-theme="light"] .cb-reader-page span { color: #2a2418; border-color: #c8b896; background: #e8dcc0; }
.cb-reader[data-theme="light"] .cb-reader-page .cb-reader-mulu { color: #8b4513; border-color: #8b4513; }

.cb-reader[data-theme="green"] { background: #1f2e26; color: #b8d9c0; }
.cb-reader[data-theme="green"] .cb-reader-body { color: #b8d9c0; }
.cb-reader[data-theme="green"] .cb-reader-title { color: #d0e8d0; }
.cb-reader[data-theme="green"] .cb-reader-meta { color: #6a8a78; }
.cb-reader[data-theme="green"] .cb-reader-page a,
.cb-reader[data-theme="green"] .cb-reader-page span { color: #b8d9c0; border-color: #3a5a48; background: #15201a; }
.cb-reader[data-theme="green"] .cb-reader-page .cb-reader-mulu { color: #8fc99f; border-color: #8fc99f; }

.cb-reader-h {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--cb-line);
  margin-bottom: 24px;
}
.cb-reader-title {
  font-family: var(--cb-display);
  font-size: 28px;
  color: var(--cb-text);
  margin: 0 0 8px;
  letter-spacing: 2px;
}
.cb-reader-meta {
  font-size: 12px;
  color: var(--cb-text-soft);
  letter-spacing: 1px;
}

.cb-reader-body {
  font-size: 18px;
  line-height: 2;
  color: var(--cb-text);
  max-width: 720px;
  margin: 0 auto;
}
.cb-reader-body p { margin: 0 0 1em; }

.cb-reader-toolbar {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
}
.cb-reader-toolbar button {
  width: 44px; height: 44px;
  background: var(--cb-bg-3);
  border: 1px solid var(--cb-cyan);
  color: var(--cb-cyan);
  cursor: pointer;
  font-size: 16px;
  font-family: var(--cb-mono);
}
.cb-reader-toolbar button:hover { background: var(--cb-cyan); color: var(--cb-bg); }

.cb-reader-page {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px dashed var(--cb-line);
  gap: 12px;
}
.cb-reader-page a, .cb-reader-page span {
  display: inline-block;
  padding: 10px 20px;
  background: var(--cb-bg-3);
  border: 1px solid var(--cb-line);
  color: var(--cb-text);
  font-size: 13px;
  letter-spacing: 1px;
  text-decoration: none;
}
.cb-reader-page a:hover { color: var(--cb-cyan); border-color: var(--cb-cyan); }
.cb-reader-page .cb-reader-mulu { color: var(--cb-pink); border-color: var(--cb-pink); }

/* Reading themes — moved to cb-tb section above. Old duplicates removed. */

/* ============================================================
   SEARCH
   ============================================================ */

.cb-search-hero {
  text-align: center;
  padding: 80px 0 40px;
  background: radial-gradient(ellipse at top, rgba(0,240,255,.1), transparent 60%);
}
.cb-search-h {
  font-family: var(--cb-display);
  font-size: 36px;
  color: var(--cb-cyan);
  letter-spacing: 4px;
  margin: 0 0 12px;
  text-shadow: var(--cb-shadow);
}
.cb-search-sub { color: var(--cb-text-soft); font-size: 13px; letter-spacing: 2px; }

.cb-search-form {
  max-width: 700px;
  margin: 30px auto 0;
  display: flex;
  border: 1px solid var(--cb-cyan);
  background: var(--cb-bg-2);
  box-shadow: var(--cb-shadow);
}
.cb-search-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 20px;
  color: var(--cb-text);
  font-family: var(--cb-mono);
  font-size: 15px;
  outline: none;
  letter-spacing: 1px;
}
.cb-search-form input::placeholder { color: var(--cb-text-dim); }
.cb-search-form button {
  padding: 0 28px;
  background: var(--cb-cyan);
  color: var(--cb-bg);
  border: none;
  font-family: var(--cb-mono);
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 700;
  cursor: pointer;
}
.cb-search-form button:hover { background: var(--cb-pink); }

.cb-search-tags {
  list-style: none;
  padding: 0;
  margin: 24px auto 0;
  max-width: 700px;
  text-align: center;
  font-size: 12px;
}
.cb-search-tags li { display: inline-block; margin: 4px; }
.cb-search-tags a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  color: var(--cb-text-soft);
}
.cb-search-tags a:hover { color: var(--cb-cyan); border-color: var(--cb-cyan); }

.cb-search-results { padding: 40px 0 80px; }

.cb-search-status {
  color: var(--cb-text-soft);
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--cb-bg-2);
  border-left: 3px solid var(--cb-cyan);
}
.cb-search-status strong { color: var(--cb-cyan); }

.cb-search-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--cb-text-soft);
}
.cb-search-empty img { margin: 0 auto 16px; opacity: .6; }

/* ============================================================
   SITEMAP
   ============================================================ */

.cb-sitemap { padding: 40px 0 80px; }
.cb-sitemap-block {
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  padding: 24px;
  margin-bottom: 20px;
}
.cb-sitemap-h {
  font-family: var(--cb-display);
  font-size: 18px;
  color: var(--cb-cyan);
  letter-spacing: 3px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cb-line);
}
.cb-sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cb-sitemap-list a {
  display: inline-block;
  padding: 6px 14px;
  background: var(--cb-bg-3);
  color: var(--cb-text-soft);
  font-size: 12px;
  border: 1px solid var(--cb-line);
  letter-spacing: 1px;
}
.cb-sitemap-list a:hover { color: var(--cb-cyan); border-color: var(--cb-cyan); }

/* ============================================================
   FRIEND LINK REQUEST
   ============================================================ */

.cb-flreq { padding: 60px 0; }
.cb-flreq-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--cb-bg-2);
  border: 1px solid var(--cb-line);
  padding: 32px;
  position: relative;
}
.cb-flreq-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 30px; height: 30px;
  border-top: 2px solid var(--cb-cyan);
  border-left: 2px solid var(--cb-cyan);
}
.cb-flreq-h {
  font-family: var(--cb-display);
  font-size: 22px;
  color: var(--cb-cyan);
  letter-spacing: 3px;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--cb-line);
}

.cb-flreq label {
  display: block;
  color: var(--cb-text-soft);
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.cb-flreq .mb-3 { margin-bottom: 16px; }

.cb-flreq input,
.cb-flreq textarea {
  width: 100%;
  background: var(--cb-bg);
  border: 1px solid var(--cb-line);
  color: var(--cb-text);
  padding: 10px 14px;
  font-family: var(--cb-mono);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.cb-flreq input:focus,
.cb-flreq textarea:focus { border-color: var(--cb-cyan); box-shadow: var(--cb-shadow); }

.cb-flreq button {
  display: inline-block;
  padding: 10px 32px;
  background: var(--cb-cyan);
  color: var(--cb-bg);
  border: 1px solid var(--cb-cyan);
  font-family: var(--cb-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}
.cb-flreq button:hover { background: var(--cb-pink); border-color: var(--cb-pink); box-shadow: var(--cb-shadow-pink); }

.cb-flreq #friendLinkMsgModal .modal-content { background: var(--cb-bg-2); color: var(--cb-text); border: 1px solid var(--cb-cyan); }
.cb-flreq #friendLinkMsgModal .modal-header { border-bottom: 1px solid var(--cb-line); }
.cb-flreq #friendLinkMsgModal .modal-title { color: var(--cb-cyan); }
.cb-flreq #friendLinkMsgModal .btn-close { filter: invert(85%) sepia(40%) saturate(500%) hue-rotate(160deg); }

/* ============================================================
   FOOTER
   ============================================================ */

.cb-footer {
  background: var(--cb-bg-2);
  border-top: 1px solid var(--cb-cyan);
  padding: 40px 0 30px;
  margin-top: 60px;
  color: var(--cb-text-soft);
  font-size: 12px;
  position: relative;
}
.cb-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cb-cyan) 30%, var(--cb-pink) 70%, transparent);
  box-shadow: 0 0 16px rgba(0,240,255,.4);
}

.cb-footer-friend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--cb-line);
  align-items: flex-start;
}
.cb-footer-friend-label {
  color: var(--cb-cyan);
  font-family: var(--cb-display);
  letter-spacing: 2px;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 600;
}
.cb-footer-friend-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  flex: 1;
}
.cb-footer-friend-list a {
  color: var(--cb-text-soft);
  font-size: 12px;
}
.cb-footer-friend-list a:hover { color: var(--cb-cyan); }
.cb-footer-friend-apply {
  padding: 2px 10px;
  background: var(--cb-pink);
  color: #fff !important;
  font-size: 11px;
  letter-spacing: 1px;
}

.cb-footer-meta { text-align: center; line-height: 2; }
.cb-footer-row { color: var(--cb-text-soft); }
.cb-footer-prompt { display: none; }
.cb-footer-output { margin-right: 12px; }
.cb-footer-brand { color: var(--cb-cyan); margin-right: 12px; }
.cb-footer-link { color: var(--cb-text-soft); }
.cb-footer-link:hover { color: var(--cb-cyan); }
.cb-footer-icp { margin-right: 12px; }
.cb-footer-row-sub { font-size: 11px; color: var(--cb-text-dim); }
.cb-footer-row-beian {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.cb-footer-row-beian a { color: var(--cb-text-dim); }

/* ============================================================
   BOOK LIST (used by all sections, includes the default book-list)
   ============================================================ */

.cb-book-mini {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--cb-bg-3);
  border: 1px solid var(--cb-line);
  margin-bottom: 10px;
  transition: all .2s;
}
.cb-book-mini:hover { border-color: var(--cb-cyan); }
.cb-book-mini:hover .cb-book-mini-h { color: var(--cb-cyan); }
.cb-book-mini-cover {
  width: 60px; height: 80px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--cb-bg);
}
.cb-book-mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.cb-book-mini-h {
  font-size: 14px;
  color: var(--cb-text);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cb-book-mini-h a { color: inherit; }
.cb-book-mini-meta { font-size: 11px; color: var(--cb-text-soft); }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes cbBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes cbPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.2); } }
@keyframes cbShimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes cbHeroProgress { 0% { width: 0; } 100% { width: 100%; } }
@keyframes cbGlitch1 {
  0%, 90%, 100% { transform: translate(0, 0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(2px, -1px); }
  96% { transform: translate(-2px, 2px); }
}
@keyframes cbGlitch2 {
  0%, 90%, 100% { transform: translate(0, 0); }
  92% { transform: translate(3px, -1px); }
  94% { transform: translate(-2px, 1px); }
  96% { transform: translate(2px, -2px); }
}

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

@media (max-width: 1100px) {
  .cb-latest-grid { grid-template-columns: repeat(4, 1fr); }
  .cb-shelf-row-l { flex: 0 0 220px; padding: 20px; gap: 14px; }
  .cb-shelf-row-no { font-size: 48px; min-width: 70px; }
  .cb-shelf-row-title { font-size: 20px; letter-spacing: 2px; }
  .cb-shelf-row-r { grid-template-columns: repeat(6, 1fr); padding: 14px 10px; }
  .cb-rank-grid { grid-template-columns: 1fr; }
  .cb-rank-no { font-size: 72px; min-width: 90px; }
  .cb-detail-main { grid-template-columns: 200px 1fr; }
  .cb-chapter-grid { grid-template-columns: repeat(3, 1fr); }
  .cb-reader { padding: 30px 40px; }
  .cb-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .cb-cat-h1 { font-size: 32px; }
}

@media (max-width: 768px) {
  body { font-size: 13px; }
  .cb-cat-hero { padding: 40px 0 30px; }
  .cb-cat-h1 { font-size: 26px; letter-spacing: 2px; }
  .cb-cat-sub { font-size: 12px; }
  .cb-cat-stats { gap: 16px; }
  .cb-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 24px 0 60px; }
  .cb-shelf-row { flex-direction: column; }
  .cb-shelf-row-l { flex: none; border-right: none; border-bottom: 1px dashed var(--cb-line); }
  .cb-shelf-row-r { grid-template-columns: repeat(3, 1fr); padding: 14px 10px; }
  .cb-shelf-row-no { font-size: 36px; min-width: 50px; }
  .cb-shelf-row-title { font-size: 18px; }
  .cb-tb { right: 12px; bottom: 12px; gap: 6px; }
  .cb-tb-btn { width: 44px; height: 44px; }
  .cb-tb-btn span { font-size: 16px; }
  .cb-tb-btn em { font-size: 8px; }
  .cb-read-drawer { width: 280px; }
  .cb-theme-grid { grid-template-columns: repeat(2, 1fr); }
  .cb-header-inner { height: 56px; }
  .cb-header-nav { display: none; }
  .cb-header-burger { display: flex; }
  .cb-header-search { padding: 6px 8px; }
  .cb-header-search span { display: none; }
  .cb-header-logo { font-size: 18px; }

  .cb-hero { height: 380px; }
  .cb-hero-no { font-size: 40px; }
  .cb-hero-title { font-size: 28px; }
  .cb-hero-inner { padding: 0 20px; }
  .cb-hero-desc { font-size: 13px; }

  .cb-section { padding: 40px 0; }
  .cb-section-no { font-size: 22px; }
  .cb-section-title { font-size: 18px; letter-spacing: 2px; }
  .cb-section-tag { display: none; }
  .cb-section-head { flex-wrap: wrap; gap: 8px; }

  .cb-strip { padding: 30px 0; }
  .cb-strip-track { padding: 0 16px 16px; }
  .cb-strip-card { flex: 0 0 180px; }
  .cb-strip-nav { display: none; }

  .cb-terminal-body { padding: 16px; }
  .cb-term-row { flex-wrap: wrap; gap: 8px; font-size: 12px; }
  .cb-term-bin { display: none; }
  .cb-term-meta { width: 100%; }
  .cb-term-idx { min-width: 40px; }

  .cb-rank-item { padding: 16px; gap: 12px; }
  .cb-rank-no { font-size: 56px; min-width: 70px; }
  .cb-rank-cover { width: 60px; height: 84px; }

  .cb-latest-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cb-latest-card { padding: 8px; }
  .cb-latest-h { font-size: 12px; }
  .cb-latest-meta { font-size: 10px; }

  .cb-shelf-grid { grid-template-columns: repeat(3, 1fr); }
  .cb-shelf-head { padding: 10px 14px; }
  .cb-shelf-item { padding: 10px 6px; }
  .cb-shelf-img { width: 56px; height: 80px; }
  .cb-shelf-title { font-size: 11px; }

  .cb-detail { padding: 20px 0 40px; }
  .cb-detail-main { grid-template-columns: 1fr; padding: 20px; }
  .cb-detail-cover { max-width: 180px; margin: 0 auto; }
  .cb-detail-h1 { font-size: 22px; }
  .cb-detail-tab { padding: 20px; }
  .cb-chapter-grid { grid-template-columns: repeat(2, 1fr); }

  .cb-reader { padding: 24px 16px; }
  .cb-reader-title { font-size: 22px; }
  .cb-reader-body { font-size: 16px; }
  .cb-reader-toolbar { right: 12px; bottom: 12px; }
  .cb-reader-toolbar button { width: 36px; height: 36px; font-size: 14px; }
  .cb-reader-page { flex-wrap: wrap; }
  .cb-reader-page a, .cb-reader-page span { padding: 8px 14px; font-size: 12px; }

  .cb-search-h { font-size: 24px; }
  .cb-search-form { flex-direction: column; }
  .cb-search-form button { padding: 12px; }

  .cb-footer-friend { flex-direction: column; gap: 10px; }
  .cb-footer-meta { font-size: 11px; }
}

@media (max-width: 480px) {
  .cb-latest-grid { grid-template-columns: repeat(2, 1fr); }
  .cb-shelf-row-r { grid-template-columns: repeat(2, 1fr); }
  .cb-rank-no { font-size: 44px; min-width: 50px; }
  .cb-rank-cover { display: none; }
  .cb-chapter-grid { grid-template-columns: 1fr; }
}
