/* styles.css - Desain Premium Mobile First (Parenting Library+) */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* Variables */
:root {
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Color Palette */
  --bg-app: #F8FAFC;
  --bg-card: #FFFFFF;
  --primary: #4F46E5;
  --primary-light: #EEF2FF;
  --accent-blue: #0ea5e9;
  --accent-blue-light: #f0f9ff;
  --accent-green: #10b981;
  --accent-green-light: #ecfdf5;
  --accent-orange: #FF6F3C;
  --accent-orange-hover: #e05320;
  --text-dark: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* Reset Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: #0f172a;
  background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Desktop Mockup Frame Wrapper */
.desktop-wrapper {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: var(--bg-app);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px) {
  .desktop-wrapper {
    height: 880px;
    border-radius: 48px;
    border: 12px solid #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }
  
  /* Notch / Dynamic Island Simulator */
  .desktop-wrapper::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 28px;
    background: #1e293b;
    border-radius: 20px;
    z-index: 9999;
  }
}

/* Main Container (Holds Screens) */
.app-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding-bottom: 90px; /* Space for Sticky CTA */
}

/* Top App Bar */
.app-header {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent-blue));
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-title);
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.logo-text {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--accent-orange);
}

.header-badge {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(14, 165, 233, 0.15);
}

/* Screen Wrapper */
.screen {
  display: none;
  width: 100%;
  animation: fadeIn 0.4s ease-out forwards;
  padding: 20px;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-out {
  animation: slideOut 0.3s ease-in forwards;
}

.slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Welcome Intro Screen Styling */
.intro-hero {
  text-align: center;
  padding: 20px 0 10px 0;
}

.intro-illustration {
  margin: 15px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(238, 242, 255, 1) 0%, rgba(248, 250, 252, 1) 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.intro-illustration::after {
  content: '👶';
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 32px;
  animation: float 3s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-10px) rotate(10deg); }
}

.welcome-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.welcome-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Card list details on Welcome Page */
.info-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.info-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.info-card-blue {
  background: var(--accent-blue-light);
}

.info-card-green {
  background: var(--accent-green-light);
}

.info-card-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.info-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Premium Buttons Styling */
.btn-primary {
  width: 100%;
  min-height: 56px;
  background: linear-gradient(135deg, var(--accent-orange), #f97316);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 20px -8px rgba(255, 111, 60, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 4px 10px -4px rgba(255, 111, 60, 0.4);
}

.btn-secondary {
  width: 100%;
  min-height: 56px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.1);
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-secondary:active {
  transform: scale(0.97);
  background: #e0e7ff;
}

/* Fullscreen Quiz Styling */
.quiz-header {
  margin-bottom: 24px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--primary));
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

.question-container {
  margin-bottom: 30px;
}

.question-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.question-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.option-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.option-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.option-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.option-card.selected .option-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.option-card.selected .option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* AI Analysis Loading Screen */
.analysis-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  text-align: center;
}

.ai-pulse-circle {
  width: 100px;
  height: 100px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 24px;
  position: relative;
  box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.3);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    transform: scale(0.95);
  }
  70% {
    box-shadow: 0 0 0 25px rgba(79, 70, 229, 0);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    transform: scale(0.95);
  }
}

.analysis-checklist {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-top: 30px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.checklist-item.active {
  opacity: 1;
  color: var(--text-dark);
}

.checklist-item.completed {
  opacity: 1;
  color: var(--accent-green);
}

.checklist-item .status-icon {
  font-weight: 700;
  width: 20px;
  display: inline-block;
}

/* Results Screen Styling */
.results-header {
  text-align: center;
  margin-bottom: 24px;
}

.results-badge {
  background: var(--accent-green-light);
  color: var(--accent-green);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.results-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-dark);
  line-height: 1.3;
}

.focus-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.focus-box-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.focus-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.focus-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.focus-icon {
  color: var(--accent-green);
  font-weight: 700;
}

/* Disclaimer text */
.disclaimer-box {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  text-align: center;
  margin: 15px 0 25px 0;
  padding: 10px 15px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Recommended Bundle Section */
.recommend-section {
  margin-bottom: 30px;
}

.recommend-badge-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.recommend-match-pill {
  background: #ffedd5;
  color: #f97316;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
}

/* Horizontal Carousel styling */
.carousel-wrapper {
  margin: 0 -20px 20px -20px;
  padding: 10px 20px 15px 20px;
  overflow-x: auto;
  display: flex;
  gap: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.carousel-wrapper::-webkit-scrollbar {
  display: none;
}

.book-card-mini {
  flex: 0 0 170px;
  scroll-snap-align: start;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.book-card-mini:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.book-cover-mini {
  height: 190px;
  width: 100%;
  padding: 16px 16px 16px 24px; /* extra left padding for the spine mockup */
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  box-shadow: inset 16px 0 25px -10px rgba(0,0,0,0.5), 5px 5px 15px rgba(0,0,0,0.25);
  border-left: 6px solid rgba(0,0,0,0.25);
}

.book-cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.6) 100%);
  box-shadow: inset 14px 0 20px -8px rgba(0,0,0,0.65); /* spine shadow fold on top! */
  z-index: 2; /* higher than the image (z-index 1) */
  pointer-events: none;
}

.book-cover-icon {
  font-size: 32px;
  z-index: 3;
  position: relative;
}

.book-cover-category {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 10px;
  align-self: flex-start;
  z-index: 3;
  position: relative;
}

.book-cover-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  z-index: 3;
  position: relative;
  margin-top: auto;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.book-info-mini {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-pages-mini {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.book-btn-preview {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.book-btn-preview:hover {
  background: var(--primary);
  color: white;
}

/* Recommended Bundle Offer Box */
.offer-box {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #93c5fd;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 30px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.offer-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--accent-blue);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
}

.offer-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 15px;
  margin-top: 5px;
}

.offer-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.offer-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 600;
}

.offer-feature-icon {
  color: var(--accent-blue);
  font-size: 18px;
}

.price-container {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.price-strike {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
}

.price-promo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 26px;
  color: var(--accent-orange);
}

/* Upgrade Section Styling - Parenting Library+ */
.upgrade-section {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  color: white;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.upgrade-section::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: var(--accent-orange);
  opacity: 0.15;
  filter: blur(40px);
  border-radius: 50%;
}

.upgrade-badge {
  background: linear-gradient(135deg, var(--accent-orange), #ea580c);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

.upgrade-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.upgrade-subtitle {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 20px;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.upgrade-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #e2e8f0;
}

.upgrade-feature-icon {
  color: var(--accent-orange);
}

.upgrade-price-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upgrade-price-label {
  font-size: 12px;
  color: #cbd5e1;
}

.upgrade-price-value {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  color: white;
}

.upgrade-price-value span {
  font-size: 13px;
  text-decoration: line-through;
  color: #94a3b8;
  margin-right: 6px;
  font-weight: 400;
}

.upgrade-note {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #fda4af;
  margin-top: 10px;
}

/* Testimonial Section */
.testimonials-section {
  margin-bottom: 30px;
}

.testimonials-header {
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-dark);
}

.testimonial-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
}

.testimonial-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
}

.testimonial-child-age {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.testimonial-rating {
  color: #eab308;
  font-size: 12px;
  margin-bottom: 10px;
}

.testimonial-story {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

/* FAQ Accordion Styling */
.faq-section {
  margin-bottom: 30px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.faq-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding: 0 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 0 solid var(--border-color);
}

.faq-item.active {
  border-color: #cbd5e1;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 20px 16px 20px;
  border-top-width: 1px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

.faq-icon {
  transition: transform 0.2s ease;
  font-size: 12px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Book Reader & Preview Screen */
.reader-screen {
  background: var(--bg-card);
  padding: 0;
}

.reader-header {
  position: sticky;
  top: 64px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 100;
}

.reader-back-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-dark);
  cursor: pointer;
}

.reader-header-info {
  flex: 1;
}

.reader-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
}

.reader-category {
  font-size: 11px;
  color: var(--text-muted);
}

.reader-progress {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 10px;
}

.reader-content {
  padding: 24px 20px;
  line-height: 1.7;
  font-size: 15px;
  color: #334155;
}

.reader-content h3 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-dark);
  margin-top: 24px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary);
  padding-left: 10px;
}

.reader-content p {
  margin-bottom: 16px;
}

.reader-content strong {
  color: var(--text-dark);
  font-weight: 600;
}

.case-study {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 20px 0;
}

.case-study h4 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.dialogue-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 20px 0;
}

.dialogue-title {
  font-size: 13px;
  margin-bottom: 8px;
}

.dialogue-good, .dialogue-bad {
  margin-bottom: 8px !important;
  font-size: 13px;
}

/* Glass Lock Overlay for Teaser */
.reader-lock-overlay {
  position: relative;
  margin-top: -60px;
  padding: 80px 20px 40px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 40%, rgba(255,255,255,1) 100%);
  text-align: center;
  z-index: 200;
}

.lock-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.lock-icon {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 12px;
}

.lock-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.lock-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Dynamic Font Sizer for Reader */
.font-sizer {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
}

.font-size-btn {
  background: transparent;
  border: none;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.font-size-btn.active {
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--primary);
}

/* Sticky CTA Bottom bar */
.sticky-cta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-info {
  display: flex;
  flex-direction: column;
}

.sticky-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.sticky-price {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--accent-orange);
}

.sticky-price span {
  font-size: 11px;
  text-decoration: line-through;
  color: var(--text-light);
  margin-left: 4px;
}

.sticky-btn {
  background: linear-gradient(135deg, var(--accent-orange), #f97316);
  color: white;
  border: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 111, 60, 0.3);
}

/* Modal Checkout Style */
.modal-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  justify-content: flex-end;
  flex-direction: column;
  animation: fadeInModal 0.2s ease-out forwards;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-app);
  width: 100%;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 -10px 25px rgba(0,0,0,0.15);
  animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-dark);
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 20px;
  flex: 1;
}

/* Checkout Step Indicator */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.step-pill {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
}

.step-pill.active {
  background: var(--primary);
}

/* Form Group styling */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  background: white;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary);
}

/* Summary Card */
.summary-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.summary-row.total {
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
  font-weight: 800;
  color: var(--text-dark);
  font-size: 15px;
}

/* QRIS Payment Step */
.qris-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.qris-image {
  max-width: 220px;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}

.qris-instruction {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Exit Intent Popup */
.exit-popup {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.exit-popup.active {
  display: flex;
}

.exit-popup-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.exit-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.exit-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.exit-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.exit-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Library Access (Paid Success Screen) */
.success-hero {
  text-align: center;
  padding: 30px 0 20px 0;
}

.success-badge {
  background: var(--accent-green-light);
  color: var(--accent-green);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px auto;
  box-shadow: var(--shadow-sm);
}

.success-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.success-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.unlocked-books-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.unlocked-book-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.unlocked-book-cover {
  height: 130px;
  padding: 12px 12px 12px 18px; /* extra left padding for the spine mockup */
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  box-shadow: inset 12px 0 18px -8px rgba(0,0,0,0.5), 3px 3px 10px rgba(0,0,0,0.2);
  border-left: 4px solid rgba(0,0,0,0.25);
}

.unlocked-book-icon {
  font-size: 24px;
  z-index: 3;
  position: relative;
}

.unlocked-book-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  z-index: 3;
  position: relative;
}

.unlocked-book-info {
  padding: 10px;
}

.unlocked-book-status {
  font-size: 11px;
  color: var(--accent-green);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Admin Panel Styles */
.admin-screen {
  background: #f1f5f9;
  padding: 0;
}

.admin-header {
  background: #0f172a;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
}

.admin-tabs {
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  padding: 0 10px;
}

.admin-tab {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-body {
  padding: 16px;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.admin-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.admin-card-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Order item list in Admin */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-item {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.order-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.order-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-light);
}

.order-user {
  font-weight: 700;
  font-size: 13px;
}

.order-price {
  font-weight: 800;
  color: var(--accent-orange);
}

.order-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.admin-btn-action {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  border: none;
}

.admin-btn-approve {
  background: var(--accent-green-light);
  color: var(--accent-green);
}

.admin-btn-reject {
  background: #ffe4e6;
  color: #e11d48;
}

.badge-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.badge-pending {
  background: #fef3c7;
  color: #d97706;
}

.badge-approved {
  background: var(--accent-green-light);
  color: var(--accent-green);
}

/* Console logs style for Pixel Event Tracker */
.pixel-logs-console {
  background: #0f172a;
  color: #38bdf8;
  font-family: monospace;
  font-size: 11px;
  padding: 12px;
  border-radius: var(--radius-sm);
  max-height: 250px;
  overflow-y: auto;
  line-height: 1.5;
  text-align: left;
}

.pixel-log-entry {
  border-bottom: 1px solid #1e293b;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.pixel-log-time {
  color: #64748B;
}

.pixel-log-event {
  color: #34d399;
  font-weight: 700;
}

/* Floating CTA button for quick exit popup / test triggers (optional debug) */
.admin-badge-floater {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.4);
  color: rgba(255,255,255,0.7);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 1001;
}

.admin-badge-floater:hover {
  background: rgba(0,0,0,0.6);
  color: white;
}

/* Floating WhatsApp Sticky Support Button */
.whatsapp-sticky-btn {
  position: absolute;
  bottom: 80px; /* Float nicely above the sticky bottom CTA bar */
  right: 15px;
  background: #25d366;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  font-size: 11px;
  font-weight: 700;
  z-index: 1500;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.whatsapp-sticky-btn:hover {
  background: #20ba5a;
  transform: scale(1.05);
}

.whatsapp-icon-bubble {
  font-size: 14px;
}

.whatsapp-text-bubble {
  font-family: var(--font-title);
  color: white;
}

/* Premium Reader Illustrations */
.reader-image-container {
  text-align: center;
  margin: 24px 0;
}

.reader-image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  border: 4px solid white;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.reader-image-container img:hover {
  transform: scale(1.025);
}

/* TOC Click Row States */
.toc-item-row:hover {
  background: rgba(79, 70, 229, 0.04);
}

/* Best Seller Badge for Book Covers */
.badge-bestseller {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: white;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-title);
  pointer-events: none;
}
