/* ============================================================
   flipbook.css
   Styles untuk halaman Features Detail / Flipbook
   Taruh di: /assets/css/flipbook.css
============================================================ */

:root {
  --primary: #6c63ff;
  --primary-light: #8075ff;
  --dark-bg: #080c18;
  --card-bg: #0d1225;
  --border: rgba(108, 99, 255, 0.2);
  --border-hover: rgba(108, 99, 255, 0.5);
  --text: #f8f9fa;
  --text-muted: rgba(248, 249, 250, 0.55);
  --surface: rgba(255, 255, 255, 0.04);
  --page-bg: #ffffff;
  --page-text: #1a1a2e;
  --page-muted: #555577;
  --page-border: #e0dff5;
  --page-accent: #6c63ff;
  --spine: #c8c5ee;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--dark-bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== TOP NAV ===== */
.top-nav {
  background: rgba(8, 12, 24, 0.92);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary-light);
}

.breadcrumb .sep {
  opacity: 0.3;
}

.breadcrumb .cur {
  color: var(--text);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, #4a42d4 0%, var(--primary-light) 100%);
  padding: 50px 0 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: var(--dark-bg);
  border-radius: 100% 100% 0 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.b1 {
  width: 260px;
  height: 260px;
  top: -80px;
  right: -50px;
}

.b2 {
  width: 180px;
  height: 180px;
  bottom: -60px;
  left: -30px;
}

.header-inner {
  position: relative;
  z-index: 1;
}

.header-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 3px 14px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.header-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.header-sub {
  font-size: 0.85rem;
  opacity: 0.78;
}

/* ===== MAIN ===== */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ===== FLIPBOOK SHELL ===== */
.flipbook-shell {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

/* progress */
.prog-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 2px 2px 0;
}

/* toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-l {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-r {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 12px;
  white-space: nowrap;
}

.page-pill b {
  color: var(--text);
}

.spread-badge {
  font-size: 0.72rem;
  color: var(--primary-light);
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 12px;
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.18s;
  font-family: inherit;
}

.nav-btn:hover:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface);
}

.nav-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

/* ===== BOOK STAGE ===== */
.book-stage {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 2rem 1.5rem 1.75rem;
  background: #10152a;
  min-height: 520px;
  perspective: 2000px;
}

.book {
  display: flex;
  width: 100%;
  max-width: 860px;
  min-height: 600px;
  border-radius: 4px 12px 12px 4px;
  overflow: visible;
  position: relative;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.7))
    drop-shadow(0 4px 12px rgba(108, 99, 255, 0.12));
  transform-style: preserve-3d;
}

.page-left,
.page-right {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, box-shadow, filter;
}

/* left page */
.page-left {
  flex: 1;
  background: var(--page-bg);
  border-radius: 4px 0 0 4px;
  padding: 2rem 1.75rem 2rem 2rem;
  position: relative;
}

.page-left::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--spine);
  box-shadow:
    2px 0 8px rgba(0, 0, 0, 0.08),
    -2px 0 6px rgba(0, 0, 0, 0.05);
}

/* right page */
.page-right {
  flex: 1;
  background: var(--page-bg);
  border-radius: 0 4px 4px 0;
  padding: 2rem 2rem 2rem 1.75rem;
  position: relative;
}

/* spine shadow overlay */
.page-left::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.06), transparent);
  pointer-events: none;
}

.page-right::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.06), transparent);
  pointer-events: none;
  z-index: 1;
}

/* ===== PAGE CONTENT ===== */
.feat-num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--page-accent);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feat-num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--page-border);
}

.feat-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--page-text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.feat-desc {
  font-size: 0.78rem;
  color: var(--page-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

/* mockup image area */
.mockup-wrap {
  background: #f0effe;
  border: 1px solid var(--page-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== ZOOM CURSOR & SMOOTH HOVER ===== */
.mockup-wrap a {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  cursor: zoom-in;
}

.mockup-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition:
    transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.4s ease;
}

.mockup-wrap a:hover img {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(108, 99, 255, 0.2);
}

.mockup-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2rem;
  color: var(--page-accent);
  opacity: 0.45;
  height: 100%;
}

.mockup-placeholder i {
  font-size: 2rem;
}

.mockup-placeholder p {
  font-size: 0.7rem;
  text-align: center;
  color: var(--page-muted);
}

/* highlights */
.highlights-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--page-text);
  margin-bottom: 8px;
}

.highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.highlights-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.72rem;
  color: var(--page-muted);
  line-height: 1.55;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--page-accent);
  flex-shrink: 0;
  margin-top: 5px;
}

/* tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
}

.tag {
  font-size: 0.62rem;
  background: #eeecff;
  color: #5248c0;
  border-radius: 20px;
  padding: 2px 9px;
  font-weight: 500;
}

/* page number footer */
.page-num {
  position: absolute;
  bottom: 14px;
  font-size: 0.65rem;
  color: #bbb;
}

.page-left .page-num {
  left: 1.75rem;
}

.page-right .page-num {
  right: 1.75rem;
}

/* ===== THUMBNAIL STRIP ===== */
.thumb-strip {
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.thumb-strip::-webkit-scrollbar {
  height: 3px;
}

.thumb-strip::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.thumb {
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: all 0.18s;
  background: white;
  width: 52px;
  height: 72px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.thumb:hover {
  border-color: var(--border-hover);
}

.thumb.active {
  border-color: var(--primary);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-ph {
  font-size: 0.6rem;
  color: #999;
  text-align: center;
  padding: 4px;
  line-height: 1.3;
}

.thumb-n {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 3px;
  font-size: 0.55rem;
  color: white;
  padding: 1px 4px;
}

/* ===== KEYBOARD HINT ===== */
.hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.65;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.66rem;
  color: var(--text-muted);
}

/* ===== RELATED ===== */
.related {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.25s;
}

.related-link:hover {
  border-color: var(--border-hover);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.related-link i {
  color: var(--primary);
  font-size: 0.85rem;
}

/* ===== SECTION DIVIDER PAGE ===== */
.book.is-divider .page-left {
  display: none;
}

.book.is-divider .page-right {
  flex: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9ff 100%);
  position: relative;
  overflow: hidden;
}

.divider-page::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.07);
  top: -80px;
  right: -80px;
  pointer-events: none;
}

.divider-page::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.05);
  bottom: -60px;
  left: -40px;
  pointer-events: none;
}

.divider-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--page-accent), #8075ff);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.3);
}

.divider-icon i {
  font-size: 1.6rem;
  color: white;
}

.divider-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--page-accent);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.divider-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--page-text);
  margin-bottom: 14px;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}

.divider-desc {
  font-size: 0.82rem;
  color: var(--page-muted);
  line-height: 1.75;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.divider-line {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--page-accent), #8075ff);
  border-radius: 2px;
  margin: 14px auto;
  position: relative;
  z-index: 1;
}

.divider-page-num {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: #bbb;
}

/* ===== MOBILE ===== */
@media (max-width: 680px) {
  .book {
    flex-direction: column;
    min-height: auto;
  }

  .page-left {
    border-radius: 4px 4px 0 0;
  }

  .page-right {
    border-radius: 0 0 4px 4px;
  }

  .page-left::after {
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 1px;
    box-shadow: none;
  }

  .page-left::before {
    display: none;
  }

  .page-right::before {
    display: none;
  }

  .header-title {
    font-size: 1.4rem;
  }

  .spread-badge {
    display: none;
  }

  .hint {
    display: none;
  }

  .book-stage {
    padding: 1rem 0.75rem 1.25rem;
  }
}
