/* EXROMAN — Exact ExNovels-Inspired Obsidian & Crimson Design System */
:root {
  --color-bg: #0d0908;
  --color-surface: #14100f;
  --color-surface-2: #1e1918;
  --color-surface-3: #282322;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --color-accent: #ED1C24;
  --color-accent-hover: #ff2b33;
  --color-accent-text: #ff5a5f;
  --color-text: #f5f5f5;
  --color-muted: #968c8b;
  --color-success: #22c55e;
  --color-discord: #5865F2;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Times New Roman", Cambria, serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.hidden { display: none !important; }
.muted-text { color: var(--color-muted); font-size: 0.92rem; line-height: 1.5; }

/* Progress Bar */
.read-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, #ED1C24, #ff5a5f);
  z-index: 200;
  transition: width 0.08s linear;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(13, 9, 8, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
}
.brand-text { color: #ffffff; }
.brand-accent { color: var(--color-accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: var(--color-surface-2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 11px;
  color: var(--color-muted);
  pointer-events: none;
}
.search-box input {
  width: 210px;
  height: 36px;
  padding: 0 12px 0 34px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 9px;
  color: var(--color-text);
  font-size: 0.88rem;
  transition: width 0.2s, border-color 0.15s;
}
.search-box input:focus {
  outline: none;
  width: 260px;
  border-color: rgba(237, 28, 36, 0.55);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 7px 14px; font-size: 0.84rem; border-radius: 8px; }
.btn-accent {
  background: var(--color-accent);
  color: #ffffff;
}
.btn-accent:hover { background: var(--color-accent-hover); }
.btn-discord {
  background: var(--color-discord);
  color: #ffffff;
}
.btn-discord:hover { filter: brightness(1.1); }
.btn-surface {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-surface:hover {
  background: var(--color-surface-3);
  border-color: var(--color-border-strong);
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-outline:hover { background: var(--color-surface-2); }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--color-surface-3); border-color: var(--color-border-strong); }

/* Homepage Hero Cover Strip (Exact ExNovels style) */
.hero-section { padding: 24px 0 18px; }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.hero-card {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 13px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.hero-card:hover {
  transform: translateY(-4px);
  border-color: rgba(237, 28, 36, 0.55);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-rating-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(13, 9, 8, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
}
.hero-rating-pill .star { color: var(--color-accent); }
.hero-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 42px 14px 14px;
  background: linear-gradient(180deg, rgba(13, 9, 8, 0) 0%, rgba(13, 9, 8, 0.88) 60%, rgba(13, 9, 8, 0.98) 100%);
}
.hero-card-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: #d6cecd;
}
.hero-badge-red {
  background: var(--color-accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

/* 2-Column Action Strip (Discord | Report Issue) */
.action-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 12px 0 24px;
}
.action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 8px;
}
.action-item h3 { margin: 0 0 3px; font-size: 0.96rem; font-weight: 700; }
.action-item p { margin: 0; font-size: 0.82rem; color: var(--color-muted); }

/* Announcement Card (Exact ExNovels Crimson Glow Box) */
.announcement-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}
.announcement-card {
  width: 100%;
  max-width: 680px;
  padding: 22px 28px;
  border-radius: 14px;
  background: radial-gradient(120% 140% at 50% 0%, rgba(237, 28, 36, 0.14), rgba(20, 16, 15, 0.95) 68%);
  border: 1px solid rgba(237, 28, 36, 0.38);
  text-align: left;
  box-shadow: 0 10px 30px rgba(237, 28, 36, 0.08);
}
.announcement-card h3 {
  margin: 0 0 8px;
  color: var(--color-accent-text);
  font-size: 1.08rem;
  font-weight: 800;
}
.announcement-card p {
  margin: 0 0 10px;
  color: #e4dedd;
  font-size: 0.9rem;
  line-height: 1.5;
}
.announcement-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-accent-text);
  font-weight: 600;
}
.announcement-dots {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}
.announcement-dots span {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--color-surface-3);
}
.announcement-dots span.active {
  width: 24px;
  background: var(--color-accent);
}

/* Section Headers */
.section-block { margin-bottom: 38px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-controls { display: flex; align-items: center; gap: 8px; }

/* Horizontal Cover Carousel */
.cover-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(175px, 195px);
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.cover-carousel::-webkit-scrollbar { display: none; }
.mini-cover-card {
  position: relative;
  display: block;
  border-radius: 11px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform 0.18s, border-color 0.18s;
}
.mini-cover-card:hover {
  transform: translateY(-3px);
  border-color: rgba(237, 28, 36, 0.5);
}
.mini-cover-img-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}
.mini-cover-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mini-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}
.mini-cover-body { padding: 10px 11px 12px; }
.mini-cover-title {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mini-cover-sub { font-size: 0.76rem; color: var(--color-muted); }

/* Latest Updates Grid (Exact ExNovels 3-Column Card Layout!) */
.updates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.update-card {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border-radius: 13px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color 0.18s, background 0.18s;
}
.update-card:hover {
  border-color: var(--color-border-strong);
  background: #171211;
}
.update-thumb {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  overflow: hidden;
  background: var(--color-surface-2);
}
.update-thumb img { width: 100%; height: 100%; object-fit: cover; }
.update-right { display: flex; flex-direction: column; min-width: 0; }
.update-title {
  margin: 2px 0 4px;
  font-size: 0.98rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.update-title:hover { color: var(--color-accent-text); }
.update-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.update-rating .star { color: var(--color-accent); }
.update-chapters { display: flex; flex-direction: column; gap: 5px; }
.update-ch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--color-surface-2);
  border: 1px solid transparent;
  font-size: 0.81rem;
  transition: background 0.14s, border-color 0.14s;
}
.update-ch-row:hover {
  background: var(--color-surface-3);
  border-color: rgba(237, 28, 36, 0.35);
}
.update-ch-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #ede8e7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--color-accent);
  flex-shrink: 0;
}
.update-ch-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  font-size: 0.73rem;
  color: var(--color-muted);
}
.pill-new {
  padding: 1.5px 6px;
  border-radius: 4px;
  background: rgba(237, 28, 36, 0.18);
  color: var(--color-accent-text);
  font-weight: 800;
  font-size: 0.68rem;
}

/* Editor's Pick Spotlight Card */
.editor-pick-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #171211 0%, #14100f 65%, rgba(237, 28, 36, 0.08) 100%);
  border: 1px solid var(--color-border);
  align-items: center;
}
.editor-pick-cover {
  aspect-ratio: 2 / 3;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.editor-pick-cover img { width: 100%; height: 100%; object-fit: cover; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.status-pill.ongoing {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.28);
}
.status-pill.novel {
  background: var(--color-surface-2);
  color: #e4dedd;
  border: 1px solid var(--color-border);
}
.genre-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}
.genre-pill {
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: #d6cecd;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.genre-pill:hover, .genre-pill.active {
  background: rgba(237, 28, 36, 0.16);
  border-color: rgba(237, 28, 36, 0.5);
  color: #ffffff;
}

/* Series Detail Page (Exact ExNovels Blurred Hero + 3-Column Layout) */
.series-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 36px;
  border-bottom: 1px solid var(--color-border);
}
.series-hero-bg {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.28) saturate(1.1);
  transform: scale(1.06);
  z-index: 0;
}
.series-hero-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 9, 8, 0.45) 0%, rgba(13, 9, 8, 0.96) 92%, #0d0908 100%);
  z-index: 1;
}
.series-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr) 210px;
  gap: 28px;
  align-items: start;
}
.series-cover-col { display: flex; flex-direction: column; gap: 10px; }
.series-cover-box {
  aspect-ratio: 2 / 3;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
.series-cover-box img { width: 100%; height: 100%; object-fit: cover; }

.series-main-title { margin: 0 0 4px; font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; }
.series-orig-title { margin: 0 0 14px; font-size: 0.96rem; color: var(--color-muted); }
.series-rating-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.series-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  text-transform: uppercase;
  margin: 14px 0 6px;
}
.series-synopsis { margin: 0; font-size: 0.95rem; line-height: 1.7; color: #e6e0df; }

.series-meta-panel {
  background: rgba(20, 16, 15, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: 13px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.meta-kv label { display: block; font-size: 0.75rem; color: var(--color-muted); margin-bottom: 4px; }
.meta-kv strong { font-size: 0.9rem; font-weight: 700; }

/* Series Content Tabs */
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
  margin: 26px 0 18px;
}
.tab-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  color: var(--color-muted);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: #ffffff; }
.tab-btn.active { color: #ffffff; border-bottom-color: var(--color-accent); }

.chapter-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.chapter-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.chapter-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 11px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color 0.16s, background 0.16s;
}
.chapter-row-card:hover {
  background: var(--color-surface-2);
  border-color: rgba(237, 28, 36, 0.45);
}
.chapter-row-card.read { opacity: 0.68; }
.ch-row-left { min-width: 0; }
.ch-row-num { font-weight: 800; font-size: 0.92rem; color: #fff; margin-bottom: 2px; }
.ch-row-sub {
  font-size: 0.8rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-row-right { flex-shrink: 0; text-align: right; font-size: 0.76rem; color: var(--color-muted); }

/* Glossary Grid */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.glossary-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.glossary-orig { font-size: 0.78rem; color: var(--color-muted); margin-bottom: 3px; }
.glossary-tr { font-size: 0.94rem; font-weight: 700; color: #ffffff; }

/* ===================== DISTRACTION-FREE NOVEL READER ===================== */
.reader-shell {
  min-height: 100vh;
  background: var(--color-bg);
  padding-bottom: 80px;
}
.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 95;
  height: 52px;
  background: rgba(13, 9, 8, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 14px;
}
.reader-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--color-muted);
}
.reader-crumb a:hover { color: #ffffff; }
.reader-crumb .current { color: #ffffff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-progress-pill {
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  font-size: 0.78rem;
  font-weight: 700;
  color: #e4dedd;
  flex-shrink: 0;
}

.reader-stage {
  padding: 28px 16px 24px;
}
.r-novel {
  margin: 0 auto;
  max-width: 720px;
  padding: 42px 46px 52px;
  border-radius: 14px;
  background: #0d0908;
  color: #f2efee;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.82;
  transition: background 0.2s, color 0.2s, max-width 0.15s;
}
.r-novel.r-novel--sepia {
  background: #f4ecd8;
  color: #433422;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.r-novel.r-novel--light {
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.r-novel.font-sans { font-family: var(--font-sans); }
.r-novel.font-mono { font-family: var(--font-mono); }

.r-chapter-header {
  text-align: center;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(150, 140, 139, 0.22);
}
.r-chapter-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: 8px;
}
.r-chapter-title {
  margin: 0 0 10px;
  font-size: 1.65em;
  line-height: 1.25;
  font-weight: 800;
}
.r-chapter-meta {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  opacity: 0.68;
}
.r-novel p {
  margin: 0 0 1.25em;
  text-align: left;
  word-break: break-word;
}

/* Floating Right Control Dock (Exact ExNovels .r-desktop-panel) */
.r-desktop-panel {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 92;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.r-dock-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #cfc6c5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.r-dock-btn:hover:not(:disabled) { background: var(--color-surface-2); color: #ffffff; }
.r-dock-btn.active { background: rgba(237, 28, 36, 0.22); color: var(--color-accent-text); }
.r-dock-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.r-scroll-top-fab {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 92;
  width: 44px;
  height: 44px;
  border-radius: 99px;
  border: none;
  background: var(--color-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(237, 28, 36, 0.45);
  transition: transform 0.15s, background 0.15s;
}
.r-scroll-top-fab:hover { transform: translateY(-2px); background: var(--color-accent-hover); }

/* Reader Below-Article Nav & Comments */
.reader-below {
  max-width: 760px;
  margin: 26px auto 0;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.reader-nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.reader-nav-bar .nav-prev { justify-self: start; }
.reader-nav-bar .nav-next { justify-self: end; }

.reactions-card, .comments-card {
  padding: 20px;
  border-radius: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.reactions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 99px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}
.react-btn.active { border-color: var(--color-accent); background: rgba(237, 28, 36, 0.16); }

/* Slide-Over Drawer (Settings / Chapters / Glossary) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 140;
}
.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 92vw;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  z-index: 150;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 22px;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.65);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}
.drawer-head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }

.setting-group { margin-bottom: 20px; }
.setting-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 0.88rem;
  color: #d6cecd;
  font-weight: 600;
}
.setting-val { color: var(--color-accent-text); font-weight: 800; }
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.seg-btn {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: #d6cecd;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.seg-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}
.swatch {
  width: 13px;
  height: 13px;
  border-radius: 99px;
  border: 1px solid rgba(150, 150, 150, 0.5);
  display: inline-block;
}
.range-slider {
  width: 100%;
  accent-color: var(--color-accent);
  cursor: pointer;
}

/* Browse & Genres Pages */
.browse-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 20px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* Comments */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 18px;
}
.comment-form input, .comment-form textarea, .modal-form input, .modal-form textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 9px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.9rem;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none;
  border-color: rgba(237, 28, 36, 0.55);
}
.comment-item {
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
}
.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 4px;
}
.comment-body { margin: 0; font-size: 0.9rem; color: #e2dbda; line-height: 1.55; }

/* Footer */
.site-footer {
  margin-top: 52px;
  background: #0a0706;
  border-top: 1px solid var(--color-border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 40px 20px 32px;
}
.footer-tagline { color: var(--color-muted); font-size: 0.9rem; margin: 10px 0 16px; }
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #ffffff;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 0.88rem;
  color: var(--color-muted);
}
.footer-col a:hover { color: var(--color-accent-text); }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 16px 0;
  font-size: 0.82rem;
  color: var(--color-muted);
}
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; }

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 460px;
  padding: 22px;
  border-radius: 15px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head h3 { margin: 0; }
.modal-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 220;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--color-surface-3);
  border: 1px solid rgba(237, 28, 36, 0.45);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
  .updates-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
  .series-hero-grid { grid-template-columns: 190px minmax(0, 1fr); }
  .series-meta-panel { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .search-box input { width: 140px; }
  .action-strip { grid-template-columns: 1fr; }
  .editor-pick-card { grid-template-columns: 1fr; }
  .series-hero-grid { grid-template-columns: 1fr; }
  .chapter-list, .glossary-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .r-novel { padding: 26px 20px 36px; }
  .r-desktop-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: row;
    justify-content: space-around;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
  .r-scroll-top-fab { bottom: 70px; right: 14px; }
}

/* ===================== AUTH, USER MENU & ADMIN PANEL ===================== */
.user-menu-wrap { position: relative; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 6px;
  border-radius: 99px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.user-chip:hover { background: var(--color-surface-3); }
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  color: #ffffff;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 215px;
  padding: 8px;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.user-dropdown-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}
.user-dropdown-head strong { display: block; font-size: 0.9rem; }
.user-dropdown-head span { font-size: 0.75rem; color: var(--color-muted); }
.user-drop-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #e4dedd;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-drop-item:hover { background: var(--color-surface-2); color: #ffffff; }
.user-drop-item.danger { color: #ff6b6f; }

.auth-modal-card { max-width: 410px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--color-surface-2);
  border-radius: 10px;
  margin: 10px 0 14px;
}
.auth-tab {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--color-accent);
  color: #ffffff;
}
.field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #d6cecd;
  margin-bottom: -4px;
}
.auth-error {
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(237, 28, 36, 0.16);
  border: 1px solid rgba(237, 28, 36, 0.45);
  color: #ff8084;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.job-row {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  margin-bottom: 6px;
  font-size: 0.8rem;
}

/* ===================== ROLE BADGES, THREADED COMMENTS & ADMIN DASHBOARD ===================== */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.role-badge.admin { background: rgba(237, 28, 36, 0.22); color: #ff6b6f; border: 1px solid rgba(237, 28, 36, 0.45); }
.role-badge.co_admin { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.role-badge.mod { background: rgba(34, 197, 94, 0.18); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.role-badge.reader { background: rgba(255, 255, 255, 0.07); color: #968c8b; border: 1px solid rgba(255, 255, 255, 0.1); }

.comment-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.comment-card {
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}
.comment-card.reply {
  margin-left: 28px;
  padding-left: 14px;
  border-left: 2px solid var(--color-surface-3);
  border-top: none;
  padding-top: 8px;
  padding-bottom: 8px;
}
.comment-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.comment-author-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.comment-act-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 3px 9px;
  color: var(--color-muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.comment-act-btn:hover { background: var(--color-surface-2); color: #ffffff; }
.comment-act-btn.liked { border-color: rgba(237, 28, 36, 0.5); color: #ff6b6f; background: rgba(237, 28, 36, 0.12); }
.comment-act-btn.danger:hover { border-color: #ef4444; color: #ff6b6f; }
.spoiler-box {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--color-surface-2);
}
.spoiler-box.blurred .comment-body {
  filter: blur(6px);
  user-select: none;
}
.spoiler-tag {
  font-size: 0.74rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 4px;
  display: inline-block;
}
.spoiler-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-muted);
  cursor: pointer;
}

/* Admin Dashboard Page (/yonetim) */
.admin-shell { padding: 28px 0 60px; }
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.admin-kpi {
  padding: 16px;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.admin-kpi label { display: block; font-size: 0.76rem; color: var(--color-muted); margin-bottom: 6px; }
.admin-kpi strong { font-size: 1.55rem; font-weight: 900; color: #ffffff; }

.admin-panel-card {
  padding: 22px;
  border-radius: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: 18px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--color-border);
}
.admin-table th { color: var(--color-muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-select {
  background: var(--color-surface-2);
  color: #ffffff;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.84rem;
  font-weight: 700;
}
.seo-endpoint-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.seo-pill-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}
.seo-pill-card:hover { border-color: rgba(237, 28, 36, 0.5); }

@media (max-width: 900px) {
  .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .seo-endpoint-grid { grid-template-columns: 1fr; }
}
