/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Splash Screen Styles - Only for index page */
body:not(.adult-page):not(.classic-page):not(.personalised-page) .splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

body:not(.adult-page):not(.classic-page):not(.personalised-page) .splash-screen.fade-in {
  opacity: 1;
}

body:not(.adult-page):not(.classic-page):not(.personalised-page) .splash-screen.fade-out {
  opacity: 0;
}

body:not(.adult-page):not(.classic-page):not(.personalised-page) .splash-logo {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
  animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Main content - Only hide on index page */
body:not(.adult-page):not(.classic-page):not(.personalised-page) .main-content {
  display: none;
}

body:not(.adult-page):not(.classic-page):not(.personalised-page) .main-content.show {
  display: block;
}

/* Individual element fade-in effects - Only for index page */
body:not(.adult-page):not(.classic-page):not(.personalised-page) .scene,
body:not(.adult-page):not(.classic-page):not(.personalised-page) .intro-header,
body:not(.adult-page):not(.classic-page):not(.personalised-page) .container,
body:not(.adult-page):not(.classic-page):not(.personalised-page) .sec {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

body:not(.adult-page):not(.classic-page):not(.personalised-page) .scene.fade-in,
body:not(.adult-page):not(.classic-page):not(.personalised-page) .intro-header.fade-in,
body:not(.adult-page):not(.classic-page):not(.personalised-page) .container.fade-in,
body:not(.adult-page):not(.classic-page):not(.personalised-page) .sec.fade-in {
  opacity: 1;
}

body {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f0520 0%, #2d117e 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

.container {
  width: 100%;
  margin: 0;
  padding: 0;
  padding-top: 100px; /* Account for fixed header */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Intro Section styles */
.intro-section {
  border-radius: 0;
  margin: 0;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.intro-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 5, 32, 0.7) 0%, rgba(45, 17, 126, 0.7) 100%);
  z-index: 1;
}

.intro-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.intro-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="0.8" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

/* Header with logo and menu - overlaying the banner */
.intro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  padding: 20px 80px;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.cloud-logo {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.logo-img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  margin-right: 20px;
}

.hamburger-menu:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
  width: 35px;
  height: 4px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Navigation Menu Styles */
.nav-menu {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100vh;
  background: url('../images/boysitting.png') center center/cover no-repeat;
  z-index: 1001;
  transition: top 0.4s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
}

.nav-menu-open {
  top: 0;
  opacity: 1;
  visibility: visible;
}

.nav-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-family: 'Modak', cursive;
  font-size: 3.2rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 20px 40px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Navigation Close Button */
.nav-close {
  position: absolute;
  top: 30px;
  right: 30px;
  cursor: pointer;
  z-index: 1002;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.nav-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.close-icon {
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Centered content */
.intro-content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  z-index: 60;
  width: 100%;
  padding: 0 80px;
}

.intro-text {
  text-align: left;
  color: white;
  max-width: 600px;
  margin-left: 100px;
}

.welcome-text {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 3px;
  margin-bottom: 20px;
  color: white;
  text-transform: uppercase;
}

.brand-title {
  font-family: 'Modak', cursive;
  font-size: 9rem;
  font-weight: 400;
  margin-bottom: 30px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.intro-subtitle {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.6rem;
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.2;
  letter-spacing: 1px;
  margin-bottom: 0;
  white-space: nowrap;
}

/* Scroll down effect */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  opacity: 0.8;
  animation: bounce 2s infinite;
}

.scroll-text {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.7;
}

.scroll-arrow {
  font-size: 1.5rem;
  animation: float 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* About Section styles */
.about-section {
  padding: 120px 0;
  margin: 0;
  width: 100%;
  position: relative;
  z-index: 2;
}

.about-content {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 0 200px;
}

.about-text {
  color: white;
}

.about-title {
  font-family: 'Modak', cursive;
  font-size: 4rem;
  font-weight: 400;
  color: white;
  margin-bottom: 30px;
  line-height: 1.2;
}

.about-body {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: italic;
  color: white;
  line-height: 1.8;
}

.about-body p {
  margin-bottom: 20px;
  font-size: 1.8rem;
  font-weight: 300;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

/* Header styles */
.hero {
  text-align: center;
  margin-bottom: 80px;
  padding: 80px 0;
}

.hero h1 {
  font-size: 3rem;
  color: white;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

.page-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.page-header h1 {
  font-size: 2.5rem;
  color: white;
  margin-left: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.back-btn {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 10px 15px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Main content */
.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 60px;
  margin: 80px 200px; 
}


.option-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.option-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.option-card h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #333;
}

.option-card p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 25px;
}

/* Classic Stories Button specific styling */
.option-card.classic {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/boylookinguppink.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  padding: 80px 40px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.option-card.classic:hover {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/boylookinguppink.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.option-card.classic h2 {
  font-family: 'Modak', cursive;
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 15px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.option-card.classic p {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: italic;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Personalised Stories Button specific styling */
.option-card.personalised {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/boylookingupblue.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  padding: 80px 40px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.option-card.personalised:hover {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/boylookingupblue.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.option-card.personalised h2 {
  font-family: 'Modak', cursive;
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 15px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.option-card.personalised p {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: italic;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Grown-Up Stories Button specific styling */
.option-card.adult {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/boylookingupyellow.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  padding: 80px 40px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.option-card.adult:hover {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/boylookingupyellow.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.option-card.adult h2 {
  font-family: 'Modak', cursive;
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 15px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.option-card.adult p {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: italic;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: #1e3a8a;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
}

.btn-primary:hover {
  background: #151f4a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(21, 31, 74, 0.4);
}

.btn-secondary {
  background: #4a2c5a;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 44, 90, 0.4);
}

.btn-tertiary {
  background: #d2691e;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
}

.btn-tertiary:hover {
  background: #b8860b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(210, 105, 30, 0.4);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Stories grid */
.stories-container {
  flex: 1;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.story-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

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

.story-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #333;
}

.story-card p {
  color: #666;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.keyword-tag {
  background: linear-gradient(45deg, #e774a9 0%, #766cf4 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: #fee9e7;
  margin: 3% auto;
  padding: 40px;
  border-radius: 25px;
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
}

.close:hover {
  color: #333;
}

/* Personalised story page */
.personalised-container {
  flex: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 40px;
}

.story-generator {
  background: #5768d2;
  border-radius: 20px;
  padding: 50px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Adult page specific story generator */
.adult-container .story-generator {
  background: #1e2a68;
}

/* Create My Soothing Story button specific styles */
#generateAdultStory {
  margin-top: 30px;
  background: #6b5b95;
}

#generateAdultStory:hover {
  background: #5a4a84;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(107, 91, 149, 0.4);
}

.story-generator h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.story-generator>p {
  font-size: 1.3rem;
  color: white;
  margin-bottom: 40px;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.keywords-section {
  margin-bottom: 30px;
}

.keywords-section h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.keyword-chip {
  background: linear-gradient(45deg, #87ceeb, #4e9fe5);
  color: white;
  border: none;
  padding: 15px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.keyword-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.keyword-chip.selected {
  background: linear-gradient(45deg, #e774a9 0%, #766cf4 100%);
}

.child-name-section {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  text-align: center;
  color: white;
}

.child-name-section h3 {
  font-size: 1.7rem;
  margin-bottom: 20px;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.name-hint {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
  font-style: italic;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.custom-keywords {
  margin-bottom: 30px;
}

.custom-keywords h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-group input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.input-group input:focus {
  border-color: white;
  background: rgba(255, 255, 255, 0.2);
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.selected-keywords h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.selected-keywords {
  margin-bottom: 50px;
}

.selected-chips {
  min-height: 50px;
  padding: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.empty-message {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.selected-chip {
  background: linear-gradient(45deg, #9a8b9c, #d19fa2);
  color: white;
  padding: 8px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.remove-chip {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  margin-left: 5px;
}

/* Story result */
.story-result {
  background: #e7f5fb;
  border-radius: 20px;
  padding: 40px;
  margin-top: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.story-result h2 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  color: #333;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.story-content {
  background: #e7f5fb;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 25px;
  line-height: 1.8;
  font-size: 1.2rem;
  color: #333;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.story-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loading and error states */
.loading {
  text-align: center;
  padding: 40px;
  color: white;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.error {
  text-align: center;
  padding: 40px;
  color: white;
}

.error p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

/* Classic Page Styles */
body.classic-page {
  background: linear-gradient(to bottom, #1e2140 0%, #4e4391 50%, #e07d91 100%);
}


/* Personalised Page Styles */
body.personalised-page {
  background: linear-gradient(135deg, #193076 0%, #99b3d6 100%);
}

/* Adult Page Styles */
body.adult-page {
  background: linear-gradient(to bottom, #4f609b 0%, #c0a77e 100%);
}

.classic-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 20px 80px;
}

.classic-title {
  text-align: center;
  margin-bottom: 60px;
  padding: 40px 0;
}

.classic-title h1 {
  font-family: 'Modak', cursive;
  font-size: 4rem;
  font-weight: 400;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

/* Updated Stories Grid for Classic Page */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
  padding: 0 80px;
}

.story-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.story-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.story-card h3 {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #4a2c5a;
  line-height: 1.3;
}

.story-card p {
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #4a2c5a;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  flex-grow: 1;
}

.story-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.keyword-tag {
  background: #d63384;
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.keyword-tag:hover {
  background: #b02a6b;
  transform: translateY(-2px);
}

/* Footer */
footer {
  text-align: center;
  padding: 20px 0;
  color: rgba(255, 255, 255, 0.8);
  margin-top: auto;
}

/* Responsive design */
@media (max-width: 768px) {
  .intro-section {
    padding: 40px 20px;
    min-height: 80vh;
  }

  .intro-header {
    padding: 15px 40px;
  }

  .logo-img {
    height: 45px;
  }

  .hamburger-line {
    width: 28px;
    height: 3px;
  }

  .welcome-text {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .brand-title {
    font-size: 6rem;
    margin-bottom: 20px;
  }

  .intro-subtitle {
    font-size: 1.8rem;
    letter-spacing: 0.5px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about-title {
    font-size: 5rem;
    margin-bottom: 20px;
  }

  .about-body p {
    font-size: 1.8rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .options {
    grid-template-columns: 1fr;
  }

  .option-card.classic {
    margin-left: 20px;
    margin-right: 20px;
  }

  .option-card.classic h2 {
    font-size: 2rem;
  }

  .option-card.classic p {
    font-size: 1.1rem;
  }

  .option-card.personalised {
    margin-left: 20px;
    margin-right: 20px;
  }

  .option-card.personalised h2 {
    font-size: 2rem;
  }

  .option-card.personalised p {
    font-size: 1.1rem;
  }

  .stories-grid {
    grid-template-columns: 1fr;
  }

  .keyword-chips {
    justify-content: center;
  }

  .story-actions {
    flex-direction: column;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .classic-title h1 {
    font-size: 3rem;
  }

  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 20px;
  }

  .story-card {
    padding: 20px;
    min-height: 180px;
  }

  .story-card h3 {
    font-size: 1.2rem;
  }

  .story-card p {
    font-size: 0.9rem;
  }
}

/* Audio player styles */
.audio-player {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  text-align: center;
}

.audio-player audio {
  width: 100%;
  max-width: 400px;
}

/* Speech synthesis controls */
.speech-controls {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.speech-btn {
  background: linear-gradient(45deg, #87ceeb, #4e9fe5);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.speech-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.speech-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Add these styles if they're missing */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.story-text {
  margin: 20px 0;
  line-height: 1.6;
  font-size: 16px;
}

.story-actions {
  margin-top: 20px;
  text-align: center;
}

/* Adult page specific styles */
.adult-container {
  max-width: 1600px;
  width:100%;
  margin: 0 auto;
  padding: 0 40px;
  border-radius: 20px;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: white;
}

.sleep-issues-section {
  margin: 30px 0;
}

.sleep-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.sleep-option {
  padding: 15px 20px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(45deg, #626a88, #9a8b9c);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  text-align: center;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: italic;
}

.sleep-option:hover {
  background: #151f4a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(21, 31, 74, 0.4);
}

.sleep-option.selected {
  background: linear-gradient(45deg, #9a8b9c, #626a88);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(154, 139, 156, 0.4);
}

.nostalgia-section {
  margin: 30px 0;
}

.nostalgia-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.nostalgia-chip {
  padding: 15px 20px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(45deg, #9a8b9c, #d19fa2);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  text-align: center;
  color: white;
  font-family: 'Chivo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: italic;
}

.nostalgia-chip:hover {
  background: #151f4a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(21, 31, 74, 0.4);
}

.nostalgia-chip.selected {
  background: linear-gradient(45deg, #d19fa2, #9a8b9c);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(209, 159, 162, 0.4);
}





/* Responsive adjustments */
@media (max-width: 768px) {
  .sleep-options {
    grid-template-columns: 1fr;
  }

  .nostalgia-chips {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Custom memory section styles */
.custom-memory-section {
  margin: 30px 0;
  padding: 20px;
  background: #f5e6f0;
  border-radius: 12px;
  border: 2px solid #e8d0e0;
}

.custom-memory-section h3 {
  color: #1e2a68;
  margin-bottom: 10px;
}

.custom-memory-section p {
  color: #1e2a68;
  margin-bottom: 15px;
  font-size: 14px;
}

.custom-memory-section .input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-memory-section textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.3s ease;
}

.custom-memory-section textarea:focus {
  outline: none;
  border-color: #1e2a68;
}

.custom-memory-section .btn-small {
  align-self: flex-start;
  padding: 10px 20px;
  background: #1e2a68;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.custom-memory-section .btn-small:hover {
  background: #151f4a;
}

.memory-hint {
  font-size: 12px;
  color: #1e2a68;
  font-style: italic;
  margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .custom-memory-section {
    padding: 15px;
  }

  .custom-memory-section textarea {
    font-size: 16px;
    /* Prevents zoom on iOS */
  }
}

/* Custom sleep reason section styles */
.custom-sleep-reason {
  margin-top: 25px;
  padding: 20px;
  background: #e6f0f5;
  border-radius: 12px;
  border: 2px solid #d0e0e8;
}

.custom-sleep-reason h4 {
  color: #1e2a68;
  margin-bottom: 10px;
  font-size: 16px;
}

.custom-sleep-reason p {
  color: #1e2a68;
  margin-bottom: 15px;
  font-size: 14px;
}

.custom-sleep-reason .input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-sleep-reason textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.3s ease;
}

.custom-sleep-reason textarea:focus {
  outline: none;
  border-color: #1e2a68;
}

.custom-sleep-reason .btn-small {
  align-self: flex-start;
  padding: 10px 20px;
  background: #1e2a68;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.custom-sleep-reason .btn-small:hover {
  background: #151f4a;
}

.reason-hint {
  font-size: 12px;
  color: #1e2a68;
  font-style: italic;
  margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .custom-sleep-reason {
    padding: 15px;
  }

  .custom-sleep-reason textarea {
    font-size: 16px;
    /* Prevents zoom on iOS */
  }
}

/*New Banner*/
.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  background: linear-gradient(#111425, #3751e0);
  background-attachment: fixed;
  overflow: hidden;
  z-index: 1;
}

.scene i {
  position: absolute;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.4);
  z-index: 10;
  opacity: 0.8;
  animation: animate linear infinite;
}

@keyframes animate {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px);
  }
}

.moon {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f0f0f0 50%, #e0e0e0 100%);
  border-radius: 50%;
  z-index: 50;
  box-shadow: 
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.forest {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transform: scale(1.2);
}
