/* ========================================
   COURSE STAGE 3 — Holographic Book (Syllabus)
   ======================================== */

.book-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 2500px;
  direction: rtl;
}

/* The Book Object */
.holo-book {
  position: relative;
  width: 800px;
  height: 550px;
  transform-style: preserve-3d;
  transform: rotateX(10deg);
  transition: transform 0.5s ease;
}

/* Spine */
.book-spine {
  position: absolute;
  right: 50%;
  top: 0;
  bottom: 0;
  width: 50px;
  background: #0f172a;
  border-left: 2px solid var(--course-border);
  border-right: 2px solid var(--course-border);
  transform: translateX(50%) translateZ(-5px);
  border-radius: 6px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  z-index: 0;
}

/* Pages Container */
.pages-container {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Single Page */
.book-page {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  transform-origin: center left;
  transform-style: preserve-3d;
  z-index: 10;
}

/* Front Face */
.page-front {
  position: absolute;
  inset: 0;
  background: #0f172a;
  border: 1px solid var(--course-border);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0 16px 16px 0;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backface-visibility: hidden;
  box-shadow: inset 15px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

/* Back Face */
.page-back {
  position: absolute;
  inset: 0;
  background: #0a0e19;
  border: 1px solid var(--course-border);
  border-radius: 16px 0 0 16px;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset -15px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Content Styles */
.chapter-num {
  font-family: var(--course-font-mono);
  font-size: 0.75rem;
  color: var(--course-accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--course-border);
  padding-bottom: 16px;
}

.page-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--course-border);
}

.page-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  color: #fff;
  font-family: var(--course-font-head);
}

.page-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #cbd5e1;
  font-weight: 300;
}

.page-desc .highlight {
  color: #f97316 !important;
  -webkit-text-fill-color: #f97316 !important;
  font-weight: 600;
}

.big-num {
  font-family: var(--course-font-mono);
  font-size: 10rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.03);
  line-height: 0;
}

.annotation {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-family: var(--course-font-mono);
  font-size: 0.65rem;
  color: #64748b;
  border: 1px dashed #334155;
  padding: 3px 7px;
  border-radius: 4px;
  transform: rotate(-2deg);
}

/* Cover */
.page-front.cover-design {
  background: radial-gradient(circle at 0% 50%, #1e293b 0%, #020617 100%);
  align-items: center;
  text-align: center;
  border-left: 2px solid var(--course-accent);
}

.cover-title {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 12px;
  color: #fff;
  font-family: var(--course-font-head);
  font-weight: 900;
}

/* Outcome Line */
.outcome-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 10px;
}

.outcome-line i {
  color: #22c55e;
  font-size: 1rem;
  flex-shrink: 0;
}

.outcome-line span {
  color: #22c55e;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Bonus Page */
.page-front.bonus-page {
  background: #0f172a;
  background-image: radial-gradient(circle at 100% 0%, #11182e 0%, #0f172a 60%);
}

.bonus-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bonus-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--course-border);
  border-radius: 10px;
  transition: border-color 0.3s ease;
}

.bonus-item:hover {
  border-color: var(--course-accent);
}

.bonus-item i {
  color: var(--course-accent);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.bonus-item strong {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.bonus-item span {
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.3;
}

/* Mobile Hint */
.mobile-hint {
  display: none;
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  color: #64748b;
  font-size: 0.85rem;
  align-items: center;
  gap: 8px;
  animation: hintBounce 1.5s infinite;
}

.mobile-hint svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@keyframes hintBounce {
  0%, 100% {
    transform: translateX(-50%) translateX(0);
  }
  50% {
    transform: translateX(-50%) translateX(-10px);
  }
}

/* ========================================
   MOBILE
   ======================================== */
@media (max-width: 900px) {
  .book-wrapper {
    perspective: 1500px;
  }

  .holo-book {
    width: 85vw;
    height: 55vh;
    transform: rotateX(0deg);
  }

  .book-page {
    width: 100%;
    right: 0;
    left: 0;
    margin: auto;
    transform-origin: center left;
  }

  .page-front {
    border-radius: 4px 16px 16px 4px;
    padding: 20px;
  }

  .page-back {
    border-radius: 16px 4px 4px 16px;
  }

  .book-spine {
    display: none;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .page-desc {
    font-size: 0.9rem;
  }

  .cover-title {
    font-size: 2.5rem;
  }

  .big-num {
    font-size: 6rem;
  }

  .outcome-line {
    padding: 8px 10px;
    gap: 8px;
    margin-top: 10px;
  }

  .outcome-line span {
    font-size: 0.8rem;
  }

  .bonus-list {
    gap: 10px;
  }

  .bonus-item {
    padding: 10px;
    gap: 10px;
  }

  .bonus-item strong {
    font-size: 0.85rem;
  }

  .bonus-item span {
    font-size: 0.75rem;
  }

  .mobile-hint {
    display: flex;
  }
}
