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

body.light-theme {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAVBAR */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-box {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.brand-info h1 {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: -0.5px;
}

.brand-info span {
  font-size: 0.7rem;
  color: #64748b;
  display: block;
}

.nav-search {
  flex: 1;
  min-width: 220px;
  max-width: 440px;
}

.nav-search input {
  width: 100%;
  padding: 0.65rem 1.25rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #0f172a;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
}

.nav-search input:focus {
  border-color: #0d9488;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-lg {
  padding: 0.75rem 1.4rem;
  font-size: 0.9rem;
  border-radius: 12px;
}

.btn-primary { 
  background: linear-gradient(135deg, #0d9488, #0284c7); 
  color: #ffffff; 
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}
.btn-primary:hover { 
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}

.btn-kids { background: #ea580c; color: #ffffff; }
.btn-kids:hover { background: #c2410c; }
.btn-school { background: #e0e7ff; color: #4338ca; }
.btn-school:hover { background: #c7d2fe; }
.btn-admin { background: #f1f5f9; border: 1px solid #cbd5e1; color: #334155; }
.btn-admin:hover { background: #e2e8f0; }
.btn-vip { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; }
.btn-outline { background: transparent; border: 1px solid #cbd5e1; color: #475569; }
.btn-outline:hover { background: #f1f5f9; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.78rem; }

/* ==============================================================
   HERO BANNER 3D SHOWCASE & GLOWING AURA
   ============================================================== */
.hero-banner {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 40%, #eff6ff 100%);
  padding: 4rem 1.5rem 4.5rem;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
}

.glow-1 { background: #99f6e4; top: -80px; left: -60px; }
.glow-2 { background: #fed7aa; bottom: -100px; right: -60px; }

.hero-container {
  max-width: 1250px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
  position: relative;
  z-index: 2;
}

.badge-spotlight {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.08);
}

.sparkle-icon { font-size: 1rem; }

.hero-text h2 {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.1rem;
  letter-spacing: -1px;
  color: #0f172a;
}

.gradient-text {
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 60%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.8rem;
  max-width: 620px;
}

.hero-cta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-kids-hero {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.08);
}
.btn-kids-hero:hover {
  background: #ffedd5;
  transform: translateY(-2px);
}

.btn-outline-hero {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.btn-outline-hero:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.hero-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(203, 213, 225, 0.6);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.feat-check {
  width: 20px;
  height: 20px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* 3D SHOWCASE BUKU DI KANAN */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.showcase-stage {
  position: relative;
  width: 320px;
  perspective: 1200px;
}

.book-3d-mockup {
  width: 280px;
  background: linear-gradient(145deg, #ea580c, #c2410c);
  border-radius: 16px;
  position: relative;
  box-shadow: 
    -14px 20px 35px rgba(0, 0, 0, 0.15),
    0 6px 14px rgba(234, 88, 12, 0.35);
  transform: rotate(-3deg) rotateY(12deg);
  transition: transform 0.4s ease;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.book-3d-mockup:hover {
  transform: rotate(0deg) rotateY(0deg) scale(1.02);
}

.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(to right, rgba(255,255,255,0.4), rgba(0,0,0,0.2));
  z-index: 10;
}

.book-cover-front {
  padding: 1.4rem 1.3rem 1.3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
  background: linear-gradient(160deg, #f97316 0%, #ea580c 60%, #c2410c 100%);
  position: relative;
}

.mockup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.mockup-tag {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.mockup-brand { color: #fed7aa; }

.mockup-art {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.2rem 0;
  position: relative;
}

.sun-glow {
  width: 130px;
  height: 130px;
  background: rgba(254, 240, 138, 0.35);
  border-radius: 50%;
  position: absolute;
}

.character-circle {
  width: 100px;
  height: 100px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  position: relative;
  z-index: 2;
}

.character-face { position: relative; width: 50px; height: 50px; }
.character-face .ear {
  width: 14px;
  height: 24px;
  background: #ea580c;
  border-radius: 10px 10px 0 0;
  position: absolute;
  top: -14px;
}
.character-face .ear.left { left: 4px; transform: rotate(-15deg); }
.character-face .ear.right { right: 4px; transform: rotate(15deg); }

.character-face .eye {
  width: 7px;
  height: 7px;
  background: #1e293b;
  border-radius: 50%;
  position: absolute;
  top: 14px;
}
.character-face .eye.left { left: 10px; }
.character-face .eye.right { right: 10px; }

.character-face .nose {
  width: 10px;
  height: 7px;
  background: #f97316;
  border-radius: 5px;
  position: absolute;
  top: 26px;
  left: 20px;
}

.mockup-meta {
  background: #ffffff;
  padding: 1.1rem;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.category-chip {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ea580c;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.mockup-meta h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.mockup-meta p {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.65rem;
}

.mockup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.status-chip.gratis {
  font-size: 0.68rem;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.pages-count { font-size: 0.72rem; color: #64748b; font-weight: 600; }

/* FLOATING BADGES DI SEKITAR BUKU */
.floating-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 20;
  animation: floatAnim 4s ease-in-out infinite;
}

.badge-top-right { top: -15px; right: -30px; }
.badge-bottom-left { bottom: 45px; left: -40px; animation-delay: -1.5s; }
.badge-bottom-right { bottom: -20px; right: -20px; animation-delay: -3s; }

.badge-icon-box {
  width: 32px;
  height: 32px;
  background: #fef08a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.badge-icon-box.sound { background: #e0f2fe; }
.badge-icon-box.book { background: #dcfce7; }

.floating-badge strong { display: block; font-size: 0.82rem; color: #0f172a; }
.floating-badge small { font-size: 0.7rem; color: #64748b; }

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==============================================================
   CONTAINER & TABS
   ============================================================== */
.container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  flex: 1;
  width: 100%;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.section-sub {
  font-size: 0.88rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.stats-badge {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f766e;
}

.tab-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  background: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.doc-type-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.type-tab {
  padding: 0.55rem 1.1rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.type-tab.active { background: #0d9488; color: #ffffff; }
.type-tab.tab-kids.active { background: #ea580c; }

.filter-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.45rem 0.85rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.active { background: #0f766e; color: #ffffff; }

/* ==============================================================
   GRID KARTU BUKU: RAPI, KOKOH & TANPA OVERLAP
   ============================================================== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1.6rem;
}

.book-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s, box-shadow 0.25s;
}

.book-card:hover {
  transform: translateY(-5px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Header Atas Kartu: Terpisah Bersih Kiri vs Kanan */
.card-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.pill-type {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.pill-type.anak { background: #ffedd5; color: #c2410c; }
.pill-type.jurnal { background: #ede9fe; color: #6d28d9; }
.pill-type.buku { background: #e0f2fe; color: #0369a1; }

.pill-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.pill-status.free { background: #dcfce7; color: #15803d; }
.pill-status.vip { background: #fef3c7; color: #b45309; }
.pill-status.price { background: #f1f5f9; color: #0284c7; border: 1px solid #cbd5e1; }

/* Gambar Cover Vektor Murni */
.card-img-wrap {
  height: 220px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.card-img-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Info Detail Bawah Kartu */
.card-info {
  padding: 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tag-category-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.book-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.book-author {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.academic-meta {
  font-size: 0.72rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.physical-pill-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.42rem 0.7rem;
  font-size: 0.74rem;
  color: #64748b;
  margin-bottom: 0.95rem;
}

.physical-pill-box strong { color: #0284c7; }

.card-buttons {
  display: flex;
  gap: 0.5rem;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.7rem;
  box-shadow: 0 20px 45px rgba(0,0,0,0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #94a3b8;
  cursor: pointer;
}

.modal-body {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #475569;
}

footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 2.2rem 1.5rem;
  margin-top: auto;
}

.footer-wrap {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.footer-brand h4 { font-size: 1.1rem; color: #0d9488; margin-bottom: 0.25rem; }
.footer-brand p, .footer-copy p { font-size: 0.78rem; color: #64748b; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text h2 { font-size: 2.3rem; }
  .hero-text p { margin: 0 auto 1.6rem; }
  .hero-cta { justify-content: center; }
  .hero-features-list { justify-content: center; }
  .hero-visual { margin-top: 1.5rem; }
  .nav-search { order: 3; max-width: 100%; width: 100%; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-container { padding: 0.5rem 1rem; gap: 0.6rem; }
  .nav-actions { width: 100%; justify-content: space-between; }
  .nav-actions .btn { flex: 1; padding: 0.4rem; font-size: 0.72rem; }
  .hero-banner { padding: 2.2rem 1rem; }
  .hero-text h2 { font-size: 1.85rem; }
  .hero-cta .btn { width: 100%; }
  .hero-features-list { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .showcase-stage { width: 260px; }
  .book-3d-mockup { width: 230px; }
  .floating-badge { display: none; }
  .container { padding: 1.5rem 1rem; }
  .tab-control-row { flex-direction: column; align-items: stretch; padding: 0.6rem; }
  .doc-type-tabs, .filter-group { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.3rem; }
  .book-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .card-img-wrap { height: 190px; }
  .footer-wrap { flex-direction: column; text-align: center; }
}
