/* ==========================================================================
   OniVerse.SBS — Complete Design System + Mobile First
   ========================================================================== */

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

/* ============================================================
   CSS VARIABLES
============================================================ */
:root {
  --bg-root:    #0d0a1a;
  --bg-sidebar: #100e1e;
  --bg-card:    rgba(20, 18, 35, 0.85);
  --bg-card-solid: #14122c;
  --bg-glass:   rgba(255,255,255,0.04);
  --border:     rgba(255,255,255,0.07);
  --border-purple: rgba(124,58,237,0.4);

  --purple:     #7c3aed;
  --purple-light: #a855f7;
  --purple-glow: rgba(124,58,237,0.35);
  --cyan:       #06b6d4;
  --pink:       #ec4899;
  --gold:       #f59e0b;
  --orange:     #f97316;
  --green:      #22c55e;
  --red:        #ef4444;

  --text:       #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim:   #6b7280;

  --navbar-h:   58px;
  --sidebar-l:  210px;
  --sidebar-r:  250px;
  --bottom-nav: 60px;

  --radius-xl:  20px;
  --radius-lg:  14px;
  --radius-md:  10px;
  --radius-sm:  6px;
  --radius-full: 9999px;

  --shadow-card: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(124,58,237,0.4);
  --transition:  all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-root);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before, body::after {
  content: '';
  position: fixed;
  width: 500px; height: 500px;
  border-radius: 50%;
  filter: blur(160px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
}
body::before { top: -120px; left: -120px; background: radial-gradient(circle, #7c3aed, transparent 70%); }
body::after { bottom: 0; right: -100px; background: radial-gradient(circle, #06b6d4, transparent 70%); }

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 99px; }

/* ============================================================
   TOAST NOTIFICATIONS
============================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--navbar-h) + 12px);
  right: 12px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  background: rgba(20,18,35,0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}

.toast i { font-size: 1rem; flex-shrink: 0; }
.toast.success i { color: var(--green); }
.toast.info i { color: var(--cyan); }
.toast.warning i { color: var(--gold); }

@keyframes toastIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(40px); } }

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--navbar-h);
  background: rgba(13,10,26,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: #fff;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.logo-accent { color: var(--purple-light); }

/* Search */
.nav-search {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%; transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.8rem;
  pointer-events: none;
}

.search-shortcut {
  position: absolute;
  right: 0.85rem;
  top: 50%; transform: translateY(-50%);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  pointer-events: none;
}

.nav-search input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.5rem 2.5rem 0.5rem 2.3rem;
  color: var(--text);
  font-size: 0.82rem;
  transition: var(--transition);
}

.nav-search input::placeholder { color: var(--text-dim); }
.nav-search input:focus {
  outline: none;
  border-color: var(--purple);
  background: rgba(124,58,237,0.08);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.clear-btn {
  position: absolute;
  right: 2.5rem;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted);
  padding: 0;
}

/* Nav Links */
.nav-links {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
}

.nav-item {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-item:hover, .nav-item.active { color: var(--text); background: rgba(124,58,237,0.12); }
.nav-item.active { color: var(--purple-light); }

/* Right Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.nav-icon-btn {
  position: relative;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.nav-icon-btn:hover { color: var(--text); border-color: var(--purple); background: rgba(124,58,237,0.12); }

.notif-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--bg-root);
}

.btn-masuk {
  background: linear-gradient(135deg, var(--purple), #5b21b6);
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 0.35rem;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
  white-space: nowrap;
}

.btn-masuk:hover { transform: translateY(-1px); filter: brightness(1.1); }

.mobile-menu-btn, .mobile-search-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.1rem;
  padding: 0.3rem;
}

/* Mobile Search Expanded */
.mobile-search-expanded {
  position: fixed;
  top: var(--navbar-h);
  left: 0; right: 0;
  z-index: 199;
  background: rgba(13,10,26,0.97);
  backdrop-filter: blur(16px);
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  animation: slideDown 0.2s ease;
}

@keyframes slideDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }

.mobile-search-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.85rem;
}

.mobile-search-inner i { color: var(--text-muted); font-size: 0.85rem; }

.mobile-search-inner input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}

.mobile-search-inner button {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 149;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

/* ============================================================
   PAGE LAYOUT
============================================================ */
.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-l) 1fr var(--sidebar-r);
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - var(--navbar-h));
  align-items: start;
}

/* ============================================================
   SIDEBAR LEFT
============================================================ */
.sidebar-left {
  position: sticky;
  top: var(--navbar-h);
  height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
  padding: 0.75rem 0.6rem 2rem;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 1px; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.sidebar-item i { width: 16px; text-align: center; font-size: 0.85rem; flex-shrink: 0; }
.sidebar-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-item.active { color: var(--purple-light); background: rgba(124,58,237,0.12); font-weight: 600; }
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--purple-light);
  border-radius: 0 3px 3px 0;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--pink);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

/* Reading Stats */
.reading-stats {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  margin-top: 0.5rem;
}

.stats-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple-light);
  margin-bottom: 0.5rem;
}

.stats-header i { font-size: 0.7rem; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
}

.stat-box {
  text-align: center;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.2rem;
}

.stat-val {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.2;
}

.stat-lbl {
  font-size: 0.62rem;
  color: var(--text-dim);
  font-weight: 500;
}

.streak-box .stat-val { color: var(--orange); }
.streak-box .stat-val i { font-size: 0.7rem; margin-left: 1px; }

/* Sidebar Divider */
.sidebar-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0 0.4rem;
  padding: 0 0.4rem;
}

.sidebar-divider span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  white-space: nowrap;
}

.sidebar-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.sidebar-genres { display: flex; flex-direction: column; gap: 1px; }

.sidebar-genre-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.sidebar-genre-item:hover, .sidebar-genre-item.active { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-genre-item i { width: 16px; text-align: center; color: var(--purple-light); font-size: 0.75rem; }

.sidebar-see-all {
  background: none; border: none;
  color: var(--purple-light);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  text-align: left;
  display: flex; align-items: center; gap: 0.4rem;
  transition: var(--transition);
}

.sidebar-see-all:hover { color: var(--purple); }

/* Community Banner */
.sidebar-community {
  margin-top: auto;
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(236,72,153,0.12));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.community-icon {
  width: 40px; height: 40px;
  background: rgba(124,58,237,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--purple-light);
}

.sidebar-community h4 { font-size: 0.85rem; font-weight: 700; }
.sidebar-community p { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }

.btn-discord {
  display: flex; align-items: center; gap: 0.4rem;
  background: #5865f2;
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  width: 100%;
  justify-content: center;
  transition: var(--transition);
}

.btn-discord:hover { background: #4752c4; }

/* ============================================================
   MAIN CONTENT
============================================================ */
.main-content {
  min-width: 0;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ============================================================
   GENRE CHIPS
============================================================ */
.genre-chips-section { margin: 0; }

.genre-chips-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.15rem 0;
}

.genre-chips-scroll::-webkit-scrollbar { display: none; }

.genre-chip {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
  white-space: nowrap;
}

.genre-chip:hover { color: var(--text); border-color: var(--purple); }

.genre-chip.active {
  background: linear-gradient(135deg, var(--purple), #5b21b6);
  border-color: var(--purple);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.genre-chip i { font-size: 0.7rem; }

/* ============================================================
   HERO SLIDER
============================================================ */
.hero-section { margin: 0; }

.hero-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 300px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
}

.hero-trend-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  z-index: 20;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: flex; align-items: center; gap: 0.35rem;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }

.hero-slides { width: 100%; height: 100%; position: relative; }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hero-slide.active { opacity: 1; pointer-events: all; }

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: brightness(0.5) saturate(1.3);
  transition: transform 8s linear;
}

.hero-slide.active .hero-bg { transform: scale(1.06); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(13,10,26,0.95) 0%, rgba(13,10,26,0.7) 45%, rgba(13,10,26,0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem 1.5rem;
}

.hero-info { max-width: 460px; }

.hero-badges {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.badge-star, .badge-chapter, .badge-views {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.badge-star { background: rgba(245,158,11,0.2); color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }
.badge-chapter { background: rgba(255,255,255,0.1); color: var(--text); border: 1px solid var(--border); }
.badge-views { background: rgba(6,182,212,0.12); color: var(--cyan); border: 1px solid rgba(6,182,212,0.25); }

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 12px rgba(0,0,0,0.7);
  letter-spacing: -0.5px;
}

.hero-genres {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.hero-genre-tag {
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.hero-synopsis {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions { display: flex; gap: 0.6rem; }

.btn-baca {
  background: linear-gradient(135deg, var(--purple), #5b21b6);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex; align-items: center; gap: 0.4rem;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
}

.btn-baca:hover { transform: translateY(-2px); filter: brightness(1.15); }

.btn-bookmark-hero {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 0.4rem;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.btn-bookmark-hero:hover { background: rgba(255,255,255,0.18); }
.btn-bookmark-hero.bookmarked { background: rgba(236,72,153,0.2); border-color: rgba(236,72,153,0.4); color: var(--pink); }

/* Slider Controls */
.slider-prev, .slider-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 20;
  background: rgba(13,10,26,0.7);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}

.slider-prev { left: 0.6rem; }
.slider-next { right: 0.6rem; }
.slider-prev:hover, .slider-next:hover { background: var(--purple); border-color: var(--purple); }

.slider-dots {
  position: absolute;
  bottom: 0.7rem;
  left: 50%; transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 0.35rem;
}

.dot {
  width: 6px; height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transition: var(--transition);
  cursor: pointer;
}

.dot.active { background: #fff; width: 18px; border-radius: 3px; }

/* ============================================================
   SECTION COMMON
============================================================ */
.content-section { display: flex; flex-direction: column; gap: 0.85rem; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  display: flex; align-items: center; gap: 0.4rem;
}

.section-title i { font-size: 0.9rem; }
.section-title-wrap { display: flex; align-items: center; gap: 0.6rem; }
.catalog-count { color: var(--text-dim); font-size: 0.75rem; }

.see-all-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--purple-light);
  display: flex; align-items: center; gap: 0.3rem;
  transition: var(--transition);
  white-space: nowrap;
}

.see-all-link:hover { color: var(--purple); }

/* ============================================================
   CONTINUE READING
============================================================ */
.continue-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.continue-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.continue-card:hover { transform: translateY(-3px); border-color: var(--border-purple); box-shadow: var(--shadow-card); }
.continue-card:active { transform: scale(0.97); }

.continue-poster { aspect-ratio: 3/4; position: relative; overflow: hidden; background: #11141e; }
.continue-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.continue-card:hover .continue-poster img { transform: scale(1.06); }

.continue-progress-wrap { padding: 0.5rem 0.55rem; }

.continue-title {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.continue-chapter { font-size: 0.68rem; color: var(--cyan); font-weight: 600; margin-bottom: 0.3rem; }

.progress-bar-wrap { background: rgba(255,255,255,0.08); border-radius: 99px; height: 3px; overflow: hidden; }

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 99px;
  transition: width 0.4s ease;
}

.empty-continue {
  grid-column: 1/-1;
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.empty-continue i { font-size: 1.8rem; color: var(--purple-light); opacity: 0.4; }
.empty-continue p { font-size: 0.8rem; }

/* ============================================================
   TRENDING ROW
============================================================ */
.trending-scroll-wrap { position: relative; }

.trending-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.trending-row::-webkit-scrollbar { display: none; }

.scroll-arrow {
  display: none;
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  background: rgba(13,10,26,0.85);
  border: 1px solid var(--border);
  color: var(--text);
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 0.7rem;
  align-items: center; justify-content: center;
  transition: var(--transition);
}

.scroll-prev-btn { left: -8px; }
.scroll-next-btn { right: -8px; }
.scroll-arrow:hover { background: var(--purple); }

.trending-card {
  flex: 0 0 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  scroll-snap-align: start;
}

.trending-card:hover { transform: translateY(-3px); border-color: var(--border-purple); box-shadow: var(--shadow-card); }
.trending-card:active { transform: scale(0.97); }

.trending-rank {
  position: absolute;
  top: 0.35rem; left: 0.35rem;
  z-index: 5;
  background: rgba(13,10,26,0.85);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  width: 22px; height: 22px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}

.trending-card:nth-child(1) .trending-rank { background: var(--gold); color: #000; border-color: var(--gold); }
.trending-card:nth-child(2) .trending-rank { background: #94a3b8; color: #000; }
.trending-card:nth-child(3) .trending-rank { background: var(--orange); color: #000; }

.trending-poster { aspect-ratio: 3/4; overflow: hidden; background: #11141e; }
.trending-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.trending-card:hover .trending-poster img { transform: scale(1.06); }

.trending-info { padding: 0.45rem 0.5rem; }

.trending-title {
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.trending-rating {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 600;
  display: flex; align-items: center; gap: 0.2rem;
}

.trending-skeleton {
  flex: 0 0 120px;
  aspect-ratio: 3/5;
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(30,35,50,0.6) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ============================================================
   CATALOG FILTERS
============================================================ */
.catalog-filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.select-wrap { position: relative; }

.select-wrap select {
  appearance: none;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.38rem 1.6rem 0.38rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.select-wrap select:focus { outline: none; border-color: var(--purple); }

.select-wrap > i {
  position: absolute;
  right: 0.5rem;
  top: 50%; transform: translateY(-50%);
  font-size: 0.6rem;
  color: var(--text-dim);
  pointer-events: none;
}

/* ============================================================
   UPDATE LIST
============================================================ */
.update-list { display: flex; flex-direction: column; gap: 0.5rem; }

.update-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.update-item:hover { background: rgba(124,58,237,0.08); border-color: var(--border-purple); transform: translateX(3px); }
.update-item:active { transform: scale(0.99); }

.update-thumb {
  width: 48px; height: 62px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: #11141e;
}

.update-info { flex: 1; min-width: 0; }
.update-title { font-size: 0.84rem; font-weight: 700; margin-bottom: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-chapter { font-size: 0.75rem; color: var(--cyan); font-weight: 600; margin-bottom: 0.1rem; }
.update-time { font-size: 0.68rem; color: var(--text-dim); }

.update-new-badge {
  background: var(--green);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  animation: pulse-badge 2s infinite;
}

.update-skeleton {
  height: 74px;
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(30,35,50,0.6) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* Load More */
.load-more-wrap { text-align: center; padding: 0.5rem 0; }

.btn-load-more {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--purple-light);
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: var(--transition);
}

.btn-load-more:hover { background: rgba(124,58,237,0.12); border-color: var(--purple); }

/* ============================================================
   COMIC GRID
============================================================ */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

.comic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.comic-card:hover { transform: translateY(-4px); border-color: var(--border-purple); box-shadow: var(--shadow-card), var(--shadow-glow); }
.comic-card:active { transform: scale(0.97); }

.card-poster { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #11141e; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.comic-card:hover .card-poster img { transform: scale(1.06); }

.poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,10,26,0.85) 0%, transparent 55%);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.4rem;
}

.card-badge { background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); color: var(--purple-light); font-size: 0.6rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.card-rating { background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); color: var(--gold); font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); }

.card-content { padding: 0.6rem; display: flex; flex-direction: column; flex: 1; }
.card-title { font-family: 'Outfit', sans-serif; font-size: 0.82rem; font-weight: 700; margin-bottom: 0.25rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 0.68rem; color: var(--text-muted); }
.card-chapter { color: var(--cyan); font-weight: 600; }

/* ============================================================
   FEATURES BAR
============================================================ */
.features-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.65rem; }

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
}

.feature-icon {
  width: 40px; height: 40px;
  background: rgba(124,58,237,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--purple-light);
  flex-shrink: 0;
}

.feature-item h4 { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.1rem; }
.feature-item p { font-size: 0.68rem; color: var(--text-muted); line-height: 1.3; }

/* ============================================================
   SIDEBAR RIGHT
============================================================ */
.sidebar-right {
  position: sticky;
  top: var(--navbar-h);
  height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
  padding: 0.85rem 0.75rem 2rem;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ranking-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.widget-header h3 { font-family: 'Outfit', sans-serif; font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; gap: 0.35rem; }

.ranking-list { display: flex; flex-direction: column; gap: 0.4rem; }

.ranking-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.ranking-item:hover { background: rgba(255,255,255,0.03); }

.rank-num { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 0.95rem; width: 20px; text-align: center; flex-shrink: 0; color: var(--text-dim); }
.rank-num.top1 { color: var(--gold); }
.rank-num.top2 { color: #94a3b8; }
.rank-num.top3 { color: var(--orange); }

.rank-thumb { width: 36px; height: 48px; border-radius: 4px; object-fit: cover; flex-shrink: 0; background: #11141e; }

.rank-info { flex: 1; min-width: 0; }
.rank-title { font-size: 0.75rem; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; margin-bottom: 0.1rem; }
.rank-chapter { font-size: 0.65rem; color: var(--text-dim); }
.rank-score { font-size: 0.68rem; color: var(--gold); font-weight: 700; display: flex; align-items: center; gap: 0.15rem; }

.ranking-skeleton {
  height: 56px;
  background: linear-gradient(90deg, var(--bg-glass) 25%, rgba(30,35,50,0.3) 50%, var(--bg-glass) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.btn-ranking-full {
  width: 100%;
  margin-top: 0.7rem;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  color: var(--purple-light);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 0.35rem;
  transition: var(--transition);
}

.btn-ranking-full:hover { background: rgba(124,58,237,0.22); border-color: var(--purple); color: #fff; }

.support-widget {
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(236,72,153,0.15));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.support-widget h4 { font-size: 0.88rem; font-weight: 700; }
.support-widget p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }

.btn-donasi {
  background: linear-gradient(135deg, var(--pink), #be185d);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 0.35rem;
  transition: var(--transition);
}

.btn-donasi:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ============================================================
   MODAL
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  position: relative;
  background: #12101f;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  animation: slideUp 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 0.85rem; right: 0.85rem;
  z-index: 10;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
}

.modal-close:hover { background: var(--red); border-color: var(--red); transform: rotate(90deg); }
.modal-body { padding: 1.5rem; }

.detail-grid { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }

.detail-cover { width: 100%; border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,0.6); border: 1px solid var(--border); }

.detail-info h2 { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 800; margin-bottom: 0.2rem; line-height: 1.2; }
.detail-alt { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.7rem; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.7rem; }

.detail-badge { padding: 0.2rem 0.6rem; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; }
.detail-badge.status { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.detail-badge.type { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border); }
.detail-badge.rating { background: rgba(245,158,11,0.12); color: var(--gold); border: 1px solid rgba(245,158,11,0.25); }
.detail-badge.views { background: rgba(6,182,212,0.08); color: var(--cyan); border: 1px solid rgba(6,182,212,0.2); }
.detail-badge.genre { background: rgba(124,58,237,0.1); color: var(--purple-light); border: 1px solid rgba(124,58,237,0.2); }

.detail-synopsis { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.detail-action-row { display: flex; gap: 0.65rem; }

.chapter-section { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.chapter-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem; }

.chapter-search {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-family: inherit;
}

.chapter-search:focus { outline: none; border-color: var(--purple); }

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.chapter-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  font-size: 0.8rem;
}

.chapter-item:hover { background: rgba(124,58,237,0.15); border-color: var(--purple); transform: translateX(3px); }
.ch-num { font-weight: 700; }
.ch-date { font-size: 0.68rem; color: var(--text-dim); }

/* ============================================================
   READER
============================================================ */
.reader-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: #000;
  display: flex;
  flex-direction: column;
}

.reader-header {
  background: rgba(13,10,26,0.97);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.reader-back {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 0.35rem;
  transition: var(--transition);
  white-space: nowrap;
}

.reader-back:hover { background: rgba(255,255,255,0.08); }

.reader-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 0;
  text-align: center;
}

.reader-meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.reader-ch { font-size: 0.7rem; color: var(--purple-light); }

.reader-nav-btns { display: flex; gap: 0.4rem; }

.btn-reader-nav {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 0.3rem;
  transition: var(--transition);
}

.btn-reader-nav:hover:not(:disabled) { background: rgba(124,58,237,0.18); border-color: var(--purple); }
.btn-reader-nav:disabled { opacity: 0.3; cursor: not-allowed; }

/* Reader Progress Bar */
.reader-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.reader-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  width: 0%;
  transition: width 0.15s ease;
}

.reader-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  background: #090909;
}

.reader-images-wrap { max-width: 780px; width: 100%; }
.reader-page-img { width: 100%; height: auto; display: block; background: #11141e; }

.reader-placeholder {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.reader-placeholder i { font-size: 3rem; color: var(--purple-light); opacity: 0.3; }

.reader-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  gap: 0.85rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(124,58,237,0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.reader-footer-nav {
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.reader-nav-row { display: flex; gap: 0.75rem; }

/* ============================================================
   EMPTY STATE
============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.empty-state i { font-size: 2.5rem; color: var(--text-dim); }
.empty-state h3 { font-size: 1rem; }
.empty-state p { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================================
   MOBILE BOTTOM NAV
============================================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 180;
  height: var(--bottom-nav);
  background: rgba(13,10,26,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-around;
  padding: 0 0.25rem;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-size: 0.6rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i { font-size: 1.05rem; transition: var(--transition); }
.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--purple-light); }
.bottom-nav-item.active i { transform: scale(1.15); }

.bottom-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--pink);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 99px;
  min-width: 14px;
  text-align: center;
  line-height: 1.3;
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(13,10,26,0.95);
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
  gap: 1.5rem;
}

.footer-brand p { font-size: 0.78rem; color: var(--text-dim); margin: 0.5rem 0 0.85rem; line-height: 1.6; }

.footer-social { display: flex; gap: 0.4rem; }

.social-link {
  width: 32px; height: 32px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.social-link:hover { color: var(--purple-light); border-color: var(--purple); background: rgba(124,58,237,0.1); }

.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links h5 { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.82rem; margin-bottom: 0.2rem; }
.footer-links a { font-size: 0.78rem; color: var(--text-dim); transition: var(--transition); }
.footer-links a:hover { color: var(--purple-light); }

.footer-stats-wrap { display: flex; gap: 1.25rem; align-items: flex-start; justify-content: flex-end; }
.stat-item { text-align: center; }
.stat-num { display: block; font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--purple-light); line-height: 1; margin-bottom: 0.2rem; }
.stat-label { font-size: 0.68rem; color: var(--text-dim); }

.footer-bottom {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE — TABLET
============================================================ */
@media (max-width: 1200px) {
  :root { --sidebar-l: 190px; --sidebar-r: 220px; }
  .features-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .page-layout { grid-template-columns: var(--sidebar-l) 1fr; }
  .sidebar-right { display: none; }
  .continue-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   RESPONSIVE — MOBILE
============================================================ */
@media (max-width: 768px) {
  :root { --navbar-h: 52px; }

  .page-layout { grid-template-columns: 1fr; }

  /* Sidebar slide-in */
  .sidebar-left {
    position: fixed;
    top: var(--navbar-h);
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    border-right: 1px solid var(--border-purple);
  }

  .sidebar-left.open { transform: translateX(0); }

  /* Navbar mobile */
  .nav-links { display: none; }
  .nav-search { display: none; }
  .mobile-menu-btn, .mobile-search-btn { display: flex; }
  .btn-masuk-text { display: none; }
  .btn-masuk { padding: 0.4rem 0.65rem; }

  /* Hero */
  .hero-slider { height: 240px; border-radius: var(--radius-lg); }
  .hero-title { font-size: 1.4rem; }
  .hero-synopsis { display: none; }
  .hero-content { padding: 1rem; }
  .hero-actions { gap: 0.4rem; }
  .btn-baca { font-size: 0.75rem; padding: 0.4rem 0.85rem; }
  .btn-bookmark-hero { font-size: 0.75rem; padding: 0.4rem 0.75rem; }
  .slider-prev, .slider-next { width: 28px; height: 28px; font-size: 0.65rem; }

  /* Genre chips */
  .genre-chip { padding: 0.3rem 0.6rem; font-size: 0.72rem; }

  /* Sections */
  .continue-grid { grid-template-columns: repeat(3, 1fr); }
  .trending-card { flex: 0 0 110px; }
  .comic-grid { grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
  .features-bar { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .feature-item { padding: 0.65rem; gap: 0.5rem; }
  .feature-icon { width: 34px; height: 34px; font-size: 0.85rem; }
  .feature-item h4 { font-size: 0.75rem; }
  .feature-item p { font-size: 0.62rem; }

  /* Catalog */
  .catalog-filters { display: none; }

  /* Modal */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card { max-height: 92vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-body { padding: 1.25rem; }
  .detail-grid { grid-template-columns: 130px 1fr; gap: 1rem; }
  .detail-info h2 { font-size: 1.2rem; }
  .chapter-grid { grid-template-columns: repeat(2, 1fr); }

  /* Reader */
  .reader-back-text { display: none; }
  .reader-meta > span { max-width: 140px; font-size: 0.75rem; }
  .reader-images-wrap { max-width: 100%; }

  /* Bottom Nav visible */
  .mobile-bottom-nav { display: flex; }

  /* Footer spacing for bottom nav */
  .footer { margin-bottom: var(--bottom-nav); }
  .footer-inner { grid-template-columns: 1fr; padding: 1.5rem 1rem 1rem; }
}

@media (max-width: 480px) {
  .continue-grid { grid-template-columns: repeat(2, 1fr); }
  .comic-grid { grid-template-columns: repeat(2, 1fr); }
  .trending-card { flex: 0 0 100px; }
  .hero-slider { height: 200px; }
  .hero-title { font-size: 1.2rem; }
  .hero-badges { gap: 0.3rem; }
  .badge-star, .badge-chapter, .badge-views { font-size: 0.65rem; padding: 0.15rem 0.4rem; }
  .detail-grid { grid-template-columns: 100px 1fr; gap: 0.75rem; }
  .features-bar { grid-template-columns: 1fr; }
}
