/* =============================================================================
   ebooks.css — Interactive Chapter-wise E-Book & PDF Slide Learning Stylesheet
   ============================================================================= */

/* ─── 1. Subnav Pill Strip ─── */
.learning-subnav-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}

.btn-learning-subtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #94a3b8;
  border: none;
  outline: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-learning-subtab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.btn-learning-subtab.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
  color: #ffffff;
  border: 1px solid rgba(96, 165, 250, 0.35);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}

/* ─── 2. E-Books Catalog Grid ─── */
.ebooks-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.ebook-card {
  position: relative;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.ebook-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.15);
}

.ebook-card.completed {
  border-color: rgba(16, 185, 129, 0.3);
}

.ebook-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Cover & Spine */
.ebook-cover-wrapper {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  cursor: pointer;
  background: #090d16;
}

.ebook-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ebook-card:hover .ebook-cover-img {
  transform: scale(1.06);
}

.ebook-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.ebook-cover-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.ebook-badge-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.ebook-diff-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.ebook-diff-pill.diff-beginner { color: #34d399; border-color: rgba(52, 211, 153, 0.4); }
.ebook-diff-pill.diff-intermediate { color: #60a5fa; border-color: rgba(96, 165, 250, 0.4); }
.ebook-diff-pill.diff-advanced { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }
.ebook-diff-pill.diff-mastery { color: #f43f5e; border-color: rgba(244, 63, 94, 0.4); }

.ebook-cover-overlay-action {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: rgba(15, 23, 42, 0.6);
  transition: opacity 0.3s ease;
  z-index: 3;
}

.ebook-card:hover .ebook-cover-overlay-action {
  opacity: 1;
}

.ebook-btn-read-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #3b82f6;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.ebook-completed-ribbon {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* Body */
.ebook-content-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ebook-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: #94a3b8;
}

.ebook-category-tag {
  color: #38bdf8;
  font-weight: 600;
}

.ebook-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.4;
  margin: 0 0 8px 0;
  cursor: pointer;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ebook-title:hover {
  color: #38bdf8;
}

.ebook-description {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Progress Track */
.ebook-progress-section {
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 16px;
}

.ebook-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.ebook-progress-header strong {
  color: #f8fafc;
}

.ebook-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.ebook-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.ebook-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ebook-open-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 8px;
}

.ebook-admin-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-admin {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-admin:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn-icon-admin.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* ─── 3. Syllabus & Chapters Drawer Modal ─── */
.eb-syllabus-header-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  background: rgba(15, 23, 42, 0.7);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .eb-syllabus-header-card {
    grid-template-columns: 1fr;
  }
}

.eb-syllabus-cover {
  width: 100%;
  height: 260px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.eb-syllabus-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eb-syllabus-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ebook-cat-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.eb-syllabus-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.eb-syllabus-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.eb-syllabus-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.eb-stat-pill {
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.eb-syllabus-progress-box {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.eb-prog-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.eb-prog-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.eb-prog-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.eb-chapters-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.eb-chapters-list-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.eb-unlock-note {
  font-size: 0.78rem;
  color: #fbbf24;
  font-weight: 600;
}

/* Chapter Cards */
.eb-chapter-card {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 18px;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.eb-chapter-card:hover {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(56, 189, 248, 0.3);
}

.eb-chapter-card.locked {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(255, 255, 255, 0.04);
  opacity: 0.85;
}

.eb-chapter-card.completed {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.04);
}

.eb-ch-num-badge {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #38bdf8;
}

.eb-chapter-card.locked .eb-ch-num-badge {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.eb-chapter-card.completed .eb-ch-num-badge {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

.eb-ch-top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.eb-ch-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #38bdf8;
}

.eb-ch-time {
  font-size: 0.75rem;
  color: #94a3b8;
}

.eb-pdf-pill {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.eb-slides-pill {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.eb-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.eb-status-badge.completed { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.eb-status-badge.locked { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.eb-status-badge.active { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

.eb-ch-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 4px 0;
}

.eb-ch-title-hi {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.eb-ch-summary {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 6px 0;
}

.eb-ch-takeaways-preview {
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #fbbf24;
  margin-top: 6px;
}

.eb-locked-warning-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  margin-top: 6px;
}

.eb-ch-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* ─── 4. Interactive Fullscreen Reader ─── */
.ebook-reader-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #090d16;
  display: flex;
  flex-direction: column;
}

.ebook-reader-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.5), #090d16 80%);
}

.eb-reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.eb-reader-top-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-reader-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reader-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.btn-reader-icon.danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.eb-reader-book-name {
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.eb-reader-chapter-title {
  font-size: 0.98rem;
  color: #f8fafc;
  font-weight: 700;
}

.eb-reader-top-center {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 700;
}

.eb-reader-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eb-reader-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.eb-reader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #34d399);
  transition: width 0.3s ease;
}

.eb-reader-main-stage {
  position: relative;
  flex: 1;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.eb-slide-viewport {
  width: 100%;
  max-width: 900px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

/* Slide Card Deck */
.eb-slide-card {
  display: none;
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: slideFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.eb-slide-card.active {
  display: block;
}

@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.eb-slide-card-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent 70%);
  pointer-events: none;
}

.eb-slide-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.eb-slide-pill {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.eb-slide-ch-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.eb-slide-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
  margin: 0 0 6px 0;
}

.eb-slide-subtitle {
  font-size: 0.95rem;
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 18px;
}

.eb-slide-content-text {
  font-size: 1rem;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 20px;
}

.eb-slide-bullets-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.eb-slide-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: #f1f5f9;
}

.eb-slide-bullet-item i {
  color: #34d399;
  font-size: 1.1rem;
  margin-top: 1px;
}

.eb-slide-pro-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 12px 16px;
  border-radius: 10px;
  color: #fef08a;
  font-size: 0.88rem;
  font-weight: 600;
}

.eb-slide-pro-tip-box i {
  color: #f59e0b;
  font-size: 1.25rem;
}

/* PDF Canvas Container */
.eb-pdf-render-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 10px;
}

.eb-pdf-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #ffffff;
}

/* Bottom Floating Control Bar */
.eb-reader-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.eb-reader-keyboard-hints {
  display: flex;
  align-items: center;
  gap: 14px;
}

@media (max-width: 768px) {
  .eb-reader-keyboard-hints {
    display: none;
  }
}

.eb-key-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.eb-key-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  color: #f8fafc;
}

.eb-btn-complete-nav {
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Side Table of Contents Drawer */
.eb-reader-chapters-drawer {
  position: absolute;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.eb-reader-chapters-drawer.open {
  right: 0;
}

.eb-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eb-drawer-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.eb-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.eb-reader-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.eb-reader-drawer-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.eb-reader-drawer-item.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
}

.eb-drawer-ch-num {
  font-weight: 800;
  color: #38bdf8;
  font-size: 0.85rem;
}

.eb-drawer-ch-title {
  flex: 1;
  font-size: 0.82rem;
  color: #f1f5f9;
  font-weight: 600;
}

/* ─── 5. Celebration Modal ─── */
.eb-celeb-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3), rgba(245, 158, 11, 0.05));
  border: 2px solid rgba(245, 158, 11, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
  animation: trophyBounce 0.8s ease;
}

@keyframes trophyBounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

.eb-celeb-trophy {
  font-size: 2.5rem;
  color: #fbbf24;
}

.eb-celeb-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 10px 0;
}

.eb-celeb-message {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

/* ─── 6. Admin Multi-Step Workflow & Page Builder ─── */
.eb-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 10px;
  border-radius: 12px;
  margin-left: 8px;
}

.eb-flow-guide-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 8px 14px;
  overflow-x: auto;
}

.eb-flow-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.eb-flow-step.active {
  color: #38bdf8;
  font-weight: 700;
}

.eb-flow-step.done {
  color: #10b981;
}

.eb-flow-sep {
  color: #475569;
  font-size: 0.75rem;
}

.eb-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 14px 0;
}

.eb-mode-tab {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.eb-mode-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.eb-mode-tab.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.eb-pages-builder-wrap {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 14px;
}

.eb-pb-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.eb-pb-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.eb-pb-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.eb-pb-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.eb-pb-tab.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.eb-pb-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
}

@media (max-width: 820px) {
  .eb-pb-grid {
    grid-template-columns: 1fr;
  }
}

.eb-pb-editor-col {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
}

.eb-pb-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eb-pb-page-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.eb-pb-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-tool-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.btn-tool-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-tool-icon.danger:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fca5a5;
}

.eb-pb-preview-col {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.eb-pb-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}

.eb-pb-preview-viewport {
  flex: 1;
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
  overflow-y: auto;
  max-height: 480px;
  min-height: 280px;
  position: relative;
}

.eb-slide-img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  margin: 10px 0;
}

