/* My Dad Reads - Custom Styles - Light Theme */

/* ----- Override Bootstrap Dark Theme ----- */
body {
  background-color: #FAF9F6 !important;
  color: #2D2D2D !important;
}

.navbar, .navbar-light {
  background-color: #F1F5F9 !important;
  border-bottom: 1px solid #E5E7EB !important;
}

.navbar-brand, .navbar-nav .nav-link {
  color: #2D2D2D !important;
}

.carousel-inner, .carousel-item {
  background-color: #FFFFFF !important;
}

.card {
  background-color: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  color: #2D2D2D !important;
}

.footer {
  background-color: #F1F5F9 !important;
  color: #5F6368 !important;
  border-top: 1px solid #E5E7EB !important;
}

/* Override any remaining dark theme styles */
.bg-dark {
  background-color: #FFFFFF !important;
  color: #2D2D2D !important;
}

.text-white {
  color: #2D2D2D !important;
}

.text-light {
  color: #5F6368 !important;
}

.text-muted {
  color: #5F6368 !important;
}

/* Override white buttons to use light grey */
.btn-light {
  background-color: #F1F5F9 !important;
  border-color: #F1F5F9 !important;
  color: var(--mdr-text-primary) !important;
}

.btn-light:hover {
  background-color: #E5E7EB !important;
  border-color: #E5E7EB !important;
  color: var(--mdr-text-primary) !important;
}

/* Ensure carousel controls are visible */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1);
}

/* Force light theme on all elements */
* {
  color: inherit !important;
}

/* Button Loading State Improvements */
.btn.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn .spinner-border {
  color: currentColor !important;
  border-color: currentColor transparent currentColor transparent !important;
}

.btn-bedtime .spinner-border {
  border-color: white transparent white transparent !important;
}

.btn-primary .spinner-border {
  border-color: white transparent white transparent !important;
}

.btn-success .spinner-border {
  border-color: white transparent white transparent !important;
}

/* ----- Light Theme Variables ----- */
:root {
  /* Light Theme Color Palette */
  --mdr-bg-main: #FAF9F6;           /* Soft warm white, like a children's book */
  --mdr-bg-section: #F1F5F9;        /* Light grey-blue for contrast between blocks */
  --mdr-bg-card: #FFFFFF;           /* Pure white, clean UI container */
  --mdr-text-primary: #2D2D2D;      /* Clean charcoal for maximum readability */
  --mdr-text-secondary: #5F6368;    /* Subtle gray for supporting text */
  --mdr-primary: #8B9DE0;           /* Lighter softer indigo – calm, confident, modern dad tone */
  --mdr-secondary: #FDBA74;         /* Peach-orange – warm, friendly, playful */
  --mdr-btn-text: #FFFFFF;          /* For buttons with coloured backgrounds */
  --mdr-border: #E5E7EB;            /* Soft neutral for outlines and card edges */
  --mdr-success: #22C55E;           /* Soft green for confirmations */
  --mdr-warning: #FACC15;           /* Warm yellow for alerts */
  
  /* Legacy support - keeping old names for compatibility */
  --mdr-bedtime-blue: #8B9DE0;      /* Updated to primary */
  --mdr-soft-purple: #8B9DE0;       /* Updated to primary */
  --mdr-warm-yellow: #FDBA74;       /* Updated to secondary */
  --mdr-story-green: #22C55E;       /* Updated to success */
  
  /* Font sizes */
  --mdr-font-size-sm: 0.875rem;
  --mdr-font-size-base: 1rem;
  --mdr-font-size-lg: 1.25rem;
  --mdr-font-size-xl: 1.5rem;
  --mdr-font-size-xxl: 2rem;
}

/* ----- Global Styles ----- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--mdr-bg-main);
  color: var(--mdr-text-primary);
}

main {
  flex: 1 0 auto;
}

.navbar-brand {
  font-weight: bold;
  font-size: var(--mdr-font-size-lg);
  color: var(--mdr-text-primary);
}

.footer {
  margin-top: auto;
  padding: 1.5rem 0;
  background-color: var(--mdr-bg-section);
  color: var(--mdr-text-secondary);
}

/* Button Styles */
.btn-light-grey {
  background-color: #F1F5F9;
  border-color: #F1F5F9;
  color: var(--mdr-text-primary);
  font-weight: 600;
}

.btn-light-grey:hover {
  background-color: #E5E7EB;
  border-color: #E5E7EB;
  color: var(--mdr-text-primary);
  transform: translateY(-1px);
}

.btn-bedtime {
  background-color: #8B9DE0;
  border: none;
  color: white;
  font-weight: normal;
}

.btn-bedtime:hover {
  background-color: #7B8DD8;
  color: white;
  transform: translateY(-1px);
}

.btn-story {
  background-color: #F59E0B;
  border: none;
  color: white;
  font-weight: 600;
}

.btn-story:hover {
  background-color: #D97706;
  color: white;
  transform: translateY(-1px);
}

.btn-primary {
  background-color: #8B9DE0;
  border: none;
  color: white;
  font-weight: normal;
}

.btn-primary:hover {
  background-color: #7B8DD8;
  color: white;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: none;
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border: none;
  color: white;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  color: white;
}

/* Card Styles */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--mdr-bg-card);
  border: 1px solid var(--mdr-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: var(--mdr-text-primary);
}

/* Story Option Cards */
.story-option-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-width: 2px !important;
}

.story-option-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* Pricing Card Header Colors - Lightened */
.pricing-card .bg-primary {
  background-color: #6B82E5 !important; /* Lighter blue */
}

.pricing-card .bg-success {
  background-color: #48CC65 !important; /* Lighter green */
}

.pricing-card .bg-warning {
  background-color: #F59E0B !important; /* Lighter orange */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.story-card {
  cursor: pointer;
  height: 100%;
}

.story-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.card-title {
  color: var(--mdr-text-primary);
}

.card-text {
  color: var(--mdr-text-secondary);
}

/* ----- Home Page ----- */
.hero-section {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--mdr-primary) 0%, var(--mdr-secondary) 100%);
  color: var(--mdr-btn-text);
  border-radius: 0 0 20px 20px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  font-size: var(--mdr-font-size-xxl);
  margin-bottom: 1rem;
  color: var(--mdr-btn-text);
  font-weight: 800;
}

.hero-section .lead {
  color: var(--mdr-btn-text);
  font-weight: 500;
}

.hero-section.animate {
  animation: fadeInUp 1s ease-out;
}

/* ----- Hero Banner Section ----- */
.hero-banner-section {
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
}

.hero-banner-image {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
}

/* Desktop positioning to show full heads */
@media (min-width: 769px) {
  .hero-banner-img {
    object-position: 30% 20%;
  }
}

.hero-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.02) 0%,
    rgba(0, 0, 0, 0.02) 60%,
    rgba(0, 0, 0, 0.15) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  color: #FFFFFF !important;
  padding: 1rem 1rem 2rem 1rem;
}

.hero-banner-content {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15) 0%, rgba(253, 186, 116, 0.15) 100%);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 800px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Legacy mobile styles - will be overridden by newer responsive design below */

.hero-banner-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8);
  line-height: 1.1;
  color: #FFFFFF !important;
}

.hero-banner-subtitle {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.95) !important;
  line-height: 1.3;
}

.hero-banner-subtitle .text-primary {
  color: #000000 !important;
}

.hero-banner-description {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  line-height: 1.5;
  color: #FFFFFF !important;
}

.hero-banner-age-range {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #FFFF00 !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  font-style: italic;
}



.hero-banner-pricing {
  font-size: 0.95rem;
  font-weight: 400;
  margin-top: 1.5rem;
  color: #FFFFFF !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
}

.hero-banner-pricing .gift-icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.hero-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.btn-hero-white {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #000000 !important;
  font-weight: 600;
  padding: 1rem 1.5rem !important;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  width: 280px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-hero-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 1);
  color: #000000 !important;
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #000000 !important;
  font-weight: 600;
  padding: 1rem 1.5rem !important;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  width: 280px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  color: #000000 !important;
  transform: translateY(-2px);
}

.btn-hero-primary {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF !important;
  font-weight: 700;
  padding: 1.25rem 1.5rem !important;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
  width: 290px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.6);
  background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
  color: #FFFFFF !important;
  text-decoration: none !important;
}

.btn-hero-primary i {
  margin-right: 0.5rem;
}

.hero-cta-section {
  margin-bottom: 1.5rem;
  margin-top: -0.5rem;
}

.hero-cta-subtext {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9) !important;
  margin-top: 0.75rem;
  margin-bottom: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  font-weight: 400;
}

.hero-pricing {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  font-weight: 500;
  margin-top: 1.5rem;
}

/* Mobile Responsiveness for tablets and large mobile */
@media (max-width: 768px) {
  .hero-banner-image {
    height: 100vh;
    min-height: 650px;
  }
  
  .hero-banner-overlay {
    align-items: center;
    padding: 2rem 1rem;
  }
  
  .hero-banner-content {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
    border-radius: 20px;
  }
  
  .hero-banner-title {
    font-size: 2.8rem !important;
    line-height: 1.1;
    margin-bottom: 0.75rem;
  }
  
  .hero-banner-subtitle {
    font-size: 1.5rem !important;
    line-height: 1.2;
    margin-bottom: 1.25rem;
  }
  
  .hero-banner-description {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 1.25rem;
    max-width: 100%;
  }
  
  .hero-banner-age-range {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
  }
  
  .hero-cta-section {
    margin-top: -0.75rem;
  }

  .btn-hero-white,
  .btn-hero-secondary,
  .btn-hero-primary {
    width: 100% !important;
    max-width: 290px !important;
    padding: 1.1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap !important;
  }
  
  .hero-pricing {
    font-size: 0.95rem;
    margin-top: 1.25rem;
  }
}

/* iPhone 15 and similar large mobile screens (390px-430px) */
@media (max-width: 430px) {
  .hero-banner-image {
    height: 100vh;
    min-height: 700px;
  }
  
  .hero-banner-overlay {
    align-items: center;
    padding: 1.5rem 0.75rem;
  }
  
  .hero-banner-content {
    padding: 2rem 1.25rem;
    margin: 0 0.75rem;
    border-radius: 18px;
  }
  
  .hero-banner-title {
    font-size: 2.4rem !important;
    line-height: 1.1;
    margin-bottom: 0.75rem;
  }
  
  .hero-banner-subtitle {
    font-size: 1.3rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-banner-description {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
  }
  
  .hero-banner-age-range {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
  }
  
  .hero-cta-section {
    margin-top: -1rem;
  }

  .btn-hero-white,
  .btn-hero-secondary,
  .btn-hero-primary {
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
  }
  
  .hero-pricing {
    font-size: 0.9rem;
    margin-top: 1rem;
  }
  
  .hero-cta-subtext {
    font-size: 0.85rem;
    margin-top: 0.5rem;
  }
}

/* Smaller mobile screens */
@media (max-width: 375px) {
  .hero-banner-image {
    height: 100vh;
    min-height: 650px;
  }
  
  .hero-banner-overlay {
    align-items: center;
    padding: 1.25rem 0.5rem;
  }
  
  .hero-banner-content {
    padding: 1.75rem 1rem;
    margin: 0 0.5rem;
    border-radius: 15px;
  }
  
  .hero-banner-title {
    font-size: 2rem !important;
    line-height: 1.1;
    margin-bottom: 0.5rem;
  }
  
  .hero-banner-subtitle {
    font-size: 1.1rem !important;
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }
  
  .hero-banner-description {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .hero-banner-age-range {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
  }
  
  .hero-cta-section {
    margin-top: -1rem;
  }

  .btn-hero-white,
  .btn-hero-secondary,
  .btn-hero-primary {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }
  
  .hero-pricing {
    font-size: 0.85rem;
    margin-top: 0.75rem;
  }
  
  .hero-cta-subtext {
    font-size: 0.8rem;
    margin-top: 0.5rem;
  }
}



.feature-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 0.75rem;
  background-color: var(--mdr-bedtime-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.testimonial {
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  background-color: rgba(200, 200, 255, 0.1);
}

/* ----- Dashboard ----- */
.dashboard-header {
  margin-bottom: 2rem;
}

.weekly-story-card {
  margin-bottom: 2rem;
  border-color: var(--mdr-warm-yellow);
}

.weekly-story-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--mdr-warm-yellow);
  color: #333;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: var(--mdr-font-size-sm);
  font-weight: bold;
}

/* ----- Story Page ----- */
.story-header {
  margin-bottom: 2rem;
  text-align: center;
}

.story-image {
  max-width: 100%;
  text-align: center;
  margin-bottom: 1.5rem;
}

.story-image img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.story-content {
  line-height: 1.8;
  font-size: var(--mdr-font-size-lg);
  margin-bottom: 2rem;
  text-align: left;
  color: #2D2D2D !important;
}

.story-paragraph {
  margin-bottom: 1.5rem;
  text-align: left;
  line-height: 1.7;
  font-size: 1.125rem;
  color: #2D2D2D !important;
  font-weight: 500 !important;
}

.story-paragraph:last-child {
  margin-bottom: 0;
}

/* Enhanced paragraph spacing for better readability */
.story-content p {
  margin-bottom: 1.5rem;
  text-align: left;
  line-height: 1.7;
  color: #2D2D2D !important;
  font-weight: 500 !important;
}

/* Swipeable Storybook Container */
.storybook-container {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  user-select: none;
}

.page-navigation-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.page-nav-btn {
  background: #FF8C00;
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
}

.page-nav-btn:hover:not(:disabled) {
  background: #e67d00;
  transform: scale(1.1);
}

.page-nav-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

.page-indicator {
  font-weight: 600;
  color: #FF8C00;
  font-size: 1.1rem;
  text-align: center;
  min-width: 100px;
}

.pages-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  height: 600px; /* Increased by 20% for better mobile viewing */
}

.pages-wrapper {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: pan-y;
  height: 100%;
}

/* Page sections for stories with page numbers */
.page-section {
  min-width: 100%;
  width: 100%; /* Ensure full width */
  flex-shrink: 0;
  padding: 2rem;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.05) 0%, rgba(255, 165, 0, 0.03) 100%);
  border-left: 4px solid #FF8C00;
  position: relative;
  overflow-y: auto; /* Allow scrolling within the page if content is long */
  height: 100%;
}

.page-section:not(:last-child) {
  border-right: 1px solid rgba(255, 140, 0, 0.2);
}

.page-header {
  color: #FF8C00;
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  text-align: center;
  text-shadow: 0 1px 3px rgba(255, 140, 0, 0.3);
}

.page-section .story-paragraph {
  margin-bottom: 1.2rem;
  line-height: 1.8;
  font-size: 1.1rem;
}

.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  color: #999;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .page-section {
    padding: 1.5rem;
  }
  
  .pages-container {
    height: 480px; /* Increased by 20% for better mobile viewing */
  }
  
  .swipe-hint {
    display: flex;
  }
  
  .page-nav-btn {
    display: none;
  }
}

/* Desktop-specific styles */
@media (min-width: 769px) {
  .swipe-hint {
    display: none;
  }
  
  .pages-container {
    height: 600px; /* Increased by 20% for better viewing */
  }
}

.story-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ----- Create Story ----- */
.theme-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.theme-suggestion {
  background-color: rgba(200, 200, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: var(--mdr-font-size-sm);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.theme-suggestion:hover {
  background-color: var(--mdr-bedtime-blue);
  color: white;
}

/* ----- Profile Page ----- */
.profile-header {
  margin-bottom: 2rem;
}

.child-card {
  margin-bottom: 1.5rem;
}

.child-info {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.child-info i {
  width: 24px;
  margin-right: 0.5rem;
  color: var(--mdr-bedtime-blue);
}

/* ----- Subscription Page ----- */
.subscription-plan {
  border: 2px solid var(--mdr-bedtime-blue);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.price {
  font-size: var(--mdr-font-size-xxl);
  font-weight: bold;
  color: var(--mdr-bedtime-blue);
  margin: 1rem 0;
}

.price small {
  font-size: var(--mdr-font-size-base);
  font-weight: normal;
}

.feature-list {
  text-align: left;
  margin: 1.5rem 0;
}

.feature-list li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
}

.feature-list i {
  color: var(--mdr-story-green);
  margin-right: 0.5rem;
}

/* ----- Animations ----- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Responsive Adjustments ----- */
@media (max-width: 767.98px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .story-content {
    font-size: var(--mdr-font-size-base);
  }
  
  .story-actions {
    flex-direction: column;
  }
  
  .story-actions .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* PWA install button */
#install-button {
  display: none; /* Hidden by default, shown by JS when installable */
}

/* Loading spinner */
/* Unified Loading Spinner Styles */
.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 5px solid rgba(74, 109, 167, 0.2);
  border-top-color: var(--mdr-bedtime-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Unified Button Loading State */
.btn-loading {
  position: relative;
}

.btn-loading .spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: -0.125em;
  border: 0.125em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

/* Ensure Bootstrap spinner animation works */
@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Smaller spinner variant */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.125em;
}

/* Unified Processing Indicator Styles */
#unified-processing-indicator .modal-content {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#unified-processing-indicator .progress {
  border-radius: 10px;
  background-color: rgba(74, 109, 167, 0.1);
}

#unified-processing-indicator .progress-bar {
  border-radius: 10px;
  background: linear-gradient(45deg, var(--mdr-bedtime-blue), var(--mdr-primary));
}

/* Story Loading Page Unified Styles */
.story-loading-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
}

.story-loading-container .card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.story-loading-container .progress {
  border-radius: 12px;
  background-color: rgba(74, 109, 167, 0.1);
  overflow: hidden;
}

.story-loading-container .progress-bar {
  border-radius: 12px;
  background: linear-gradient(45deg, var(--mdr-bedtime-blue), var(--mdr-primary));
  transition: width 0.6s ease;
}

.story-loading-container .spinner-border {
  color: var(--mdr-primary);
}

/* Consistent styling for all story details boxes */
.story-details-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid rgba(74, 109, 167, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.story-details-box h6 {
  color: var(--mdr-primary);
  margin-bottom: 0.75rem;
}

/* Premium teaser consistent styling */
.premium-teaser {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(255, 140, 90, 0.05) 100%);
  border: 1px solid rgba(255, 107, 53, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.premium-teaser h6 {
  color: var(--mdr-orange);
  margin-bottom: 0.75rem;
}

/* Offline indicator */
.offline-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--mdr-danger);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: var(--mdr-font-size-sm);
  z-index: 1000;
  display: none;
}

.offline .offline-indicator {
  display: block;
}

/* Sample Stories Carousel Styling */
.sample-image-container {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
}

.sample-image-container:hover {
  transform: scale(1.02);
}

.sample-image-container img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sample-image-container .position-absolute {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sample-image-container:hover .position-absolute {
  opacity: 1;
}

.sample-story-details {
  background-color: rgba(33, 37, 41, 0.9);
  border-radius: 8px;
  height: 100%;
  padding: 1.5rem;
  max-height: 550px;
  overflow-y: auto;
}

.story-excerpt {
  max-height: 280px;
  overflow-y: auto;
  line-height: 1.6;
  font-size: 1.05rem;
}

.story-feature {
  margin-bottom: 0.5rem;
}

.story-excerpt {
  height: 350px;
  overflow-y: auto;
  font-style: italic;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  line-height: 1.8;
  font-size: 1.1rem;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}

.carousel-item {
  padding: 20px;
}

@media (max-width: 767px) {
  .sample-story-details {
    margin-top: 1rem;
  }
  
  .story-excerpt {
    max-height: 120px;
  }
}

/* Enhanced Cinematic Story Image Animations */

/* Base animation for all story images */
.story-img-animated {
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, filter;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Force hardware acceleration for better performance */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* 1. Cinematic Float - Dramatic 3D floating with depth */
@keyframes cinematicFloat {
  0%, 100% { 
    transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) scale(1);
    filter: brightness(1) saturate(1) hue-rotate(0deg);
  }
  25% { 
    transform: translate3d(-30px, -40px, 50px) rotateX(5deg) rotateY(-8deg) scale(1.15);
    filter: brightness(1.3) saturate(1.4) hue-rotate(15deg);
  }
  50% { 
    transform: translate3d(0, -60px, 80px) rotateX(0deg) rotateY(10deg) scale(1.25);
    filter: brightness(1.5) saturate(1.6) hue-rotate(30deg);
  }
  75% { 
    transform: translate3d(30px, -30px, 40px) rotateX(-3deg) rotateY(5deg) scale(1.1);
    filter: brightness(1.2) saturate(1.3) hue-rotate(10deg);
  }
}

.story-img-animated.cinematic-float {
  animation: cinematicFloat 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  transform-style: preserve-3d;
}

/* 2. Parallax Zoom - Dramatic zoom with focus shifts */
.story-img-animated.parallax-zoom {
  animation: parallaxZoom 4s cubic-bezier(0.42, 0, 0.58, 1) infinite;
  transform-style: preserve-3d;
}

@keyframes parallaxZoom {
  0%, 100% { 
    transform: scale(1) translate3d(0, 0, 0) rotateZ(0deg);
    filter: contrast(1) saturate(1) brightness(1);
  }
  20% { 
    transform: scale(1.4) translate3d(-8%, -6%, 60px) rotateZ(3deg);
    filter: contrast(1.4) saturate(1.6) brightness(1.3);
  }
  40% { 
    transform: scale(1.6) translate3d(6%, -10%, 100px) rotateZ(-2deg);
    filter: contrast(1.6) saturate(1.8) brightness(1.5);
  }
  60% { 
    transform: scale(1.5) translate3d(-3%, 8%, 80px) rotateZ(1deg);
    filter: contrast(1.5) saturate(1.7) brightness(1.4);
  }
  80% { 
    transform: scale(1.2) translate3d(10%, -3%, 40px) rotateZ(-1deg);
    filter: contrast(1.2) saturate(1.3) brightness(1.1);
  }
}



/* 3. Breathing Life - Dramatic organic pulsing */
.story-img-animated.breathing-life {
  animation: breathingLife 4s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

@keyframes breathingLife {
  0%, 100% { 
    transform: scale(1) rotateZ(0deg);
    filter: brightness(1) saturate(1) contrast(1) hue-rotate(0deg);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
  }
  50% { 
    transform: scale(1.3) rotateZ(2deg);
    filter: brightness(1.4) saturate(1.6) contrast(1.3) hue-rotate(20deg);
    box-shadow: 0 0 60px rgba(255,100,100,0.4);
  }
}

/* 4. Cinematic Sweep - Dramatic movie-style movement */
.story-img-animated.cinematic-sweep {
  animation: cinematicSweep 6s cubic-bezier(0.23, 1, 0.32, 1) infinite;
  transform-style: preserve-3d;
}

@keyframes cinematicSweep {
  0%, 100% { 
    transform: scale(1) rotate3d(1, 0, 1, 0deg) translate3d(0, 0, 0);
    filter: brightness(1) contrast(1) sepia(0);
  }
  16% { 
    transform: scale(1.2) rotate3d(1, 0, 1, 8deg) translate3d(-8%, 0, 40px);
    filter: brightness(1.2) contrast(1.2) sepia(0.3);
  }
  33% { 
    transform: scale(1.4) rotate3d(1, 1, 0, -5deg) translate3d(0, -12%, 80px);
    filter: brightness(1.4) contrast(1.4) sepia(0.5);
  }
  50% { 
    transform: scale(1.3) rotate3d(0, 1, 1, 12deg) translate3d(12%, 0, 60px);
    filter: brightness(1.3) contrast(1.3) sepia(0.4);
  }
  66% { 
    transform: scale(1.5) rotate3d(1, 0, 0, -3deg) translate3d(-5%, 8%, 100px);
    filter: brightness(1.5) contrast(1.5) sepia(0.6);
  }
  83% { 
    transform: scale(1.1) rotate3d(0, 0, 1, 4deg) translate3d(4%, -4%, 20px);
    filter: brightness(1.1) contrast(1.1) sepia(0.2);
  }
}

/* 5. Gentle Sway - Enhanced organic movement */
.story-img-animated.gentle-sway {
  animation: gentleSway 5s cubic-bezier(0.36, 0, 0.66, -0.56) infinite;
}

@keyframes gentleSway {
  0%, 100% { 
    transform: rotate(0deg) translateX(0) scale(1);
    filter: saturate(1) brightness(1) hue-rotate(0deg);
  }
  25% { 
    transform: rotate(6deg) translateX(25px) scale(1.15);
    filter: saturate(1.3) brightness(1.2) hue-rotate(15deg);
  }
  50% { 
    transform: rotate(0deg) translateX(0) scale(1.25);
    filter: saturate(1.5) brightness(1.4) hue-rotate(30deg);
  }
  75% { 
    transform: rotate(-6deg) translateX(-25px) scale(1.15);
    filter: saturate(1.3) brightness(1.2) hue-rotate(15deg);
  }
}

/* Enhanced hover effects for better interactivity */
.story-img-animated:hover {
  transform: scale(1.02) translateZ(10px) !important;
  filter: brightness(1.05) saturate(1.1) contrast(1.05) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Performance optimizations */
.story-img-animated {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
/* Animation Test */ 
.animation-test { color: red; }


