
/* =========================================
   LITTLE BIBLE EXPLORERS
   COMPLETE RESPONSIVE STYLESHEET
   ========================================= */

* {
  box-sizing: border-box;
}

:root {
  --purple: #6846a5;
  --deep-purple: #49316f;
  --ink: #342b45;
  --muted: #756d80;
}

body {
  margin: 0;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
}

button {
  font: inherit;
  cursor: pointer;
}

/* HEADER */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 9px 6%;
  background: white;
  box-shadow: 0 3px 18px #39234b10;
  min-height: 82px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* LITTLE BIBLE EXPLORERS LOGO */

.game-logo {
  display: block;
  width: 150px;
  height: 68px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.star-counter {
  padding: 9px 15px;
  border-radius: 30px;
  background: #fff3c9;
  color: #725014;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

/* MAIN LAYOUT */

main {
  width: min(1100px, 90%);
  margin: auto;
}

/* WELCOME SECTION */

.welcome-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 300px;
  margin: 32px 0;
  padding: 38px 6%;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(120deg, #eee5ff, #fff1d0);
}

.welcome-copy {
  position: relative;
  z-index: 2;
  max-width: 570px;
}

.welcome-label,
.section-kicker {
  color: var(--purple);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.welcome-section h2 {
  max-width: 500px;
  margin: 12px 0;
  color: var(--deep-purple);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
}

.welcome-section p {
  max-width: 470px;
  color: #645a70;
  line-height: 1.7;
}

.primary-button {
  margin-top: 12px;
  padding: 14px 24px;
  border: 0;
  border-radius: 30px;
  background: var(--purple);
  color: white;
  font-weight: 900;
  box-shadow: 0 5px 0 #49316f;
}

.welcome-art {
  position: relative;
  flex: 0 0 250px;
  height: 220px;
}

/* BIBLE TREASURE */

.treasure-section {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0 48px;
  padding: 20px 24px;
  border: 1px solid #f2e4c1;
  border-radius: 20px;
  background: #fffaf0;
}

.treasure-icon {
  font-size: 42px;
}

.treasure-section h3 {
  margin: 5px 0 0;
  color: var(--deep-purple);
  font-size: 23px;
}

.treasure-section p {
  margin: 2px 0 0;
  color: var(--muted);
}

.treasure-sparkle {
  margin-left: auto;
  font-size: 30px;
}

/* SECTION HEADINGS */

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-heading h2,
.map-heading h2 {
  margin: 5px 0;
  color: var(--deep-purple);
  font-size: clamp(25px, 4vw, 32px);
}

.heading-emoji {
  font-size: 42px;
}

/* ADVENTURE CARDS */

.world-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.world-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 230px;
  padding: 19px;
  border: 2px solid transparent;
  border-radius: 20px;
  color: var(--ink);
  text-align: left;
  transition: transform .2s, box-shadow .2s;
}

.world-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 22px #342b4518;
}

.world-noah {
  background: #e3f4ff;
}

.world-david {
  background: #fff0d9;
}

.world-moses {
  background: #e2f6e8;
}

.world-jesus {
  background: #f4e8ff;
}

.world-art {
  align-self: center;
  margin: 4px 0 12px;
  font-size: 54px;
}

.world-number {
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.world-card strong {
  margin-top: 4px;
  font-size: 18px;
}

.world-card small {
  margin-top: 5px;
  color: #6d6576;
  line-height: 1.4;
}

.world-action {
  margin-top: auto;
  padding-top: 13px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}


/* SEQUENTIAL ADVENTURE LOCKS */
.world-card.locked,
.map-location.locked {
  cursor: not-allowed;
  filter: saturate(.55);
  opacity: .62;
  box-shadow: none;
}

.world-card.locked:hover,
.map-location.locked:hover {
  transform: none;
  box-shadow: none;
}

.world-card.locked .world-action {
  color: #756d80;
}

.map-location.locked {
  border-color: #d8d1e2;
  background: #eeeaf3;
}

.map-location.locked .location-status {
  color: #766d82;
}

.world-card:disabled,
.map-location:disabled {
  pointer-events: auto;
}

/* ADVENTURE MAP */

.adventure-map {
  margin: 65px 0 45px;
  padding: 28px 20px;
  overflow: hidden;
  border: 1px solid #e9e0d2;
  border-radius: 28px;
  background: #fffaf0;
}

.map-heading {
  text-align: center;
}

.map-heading p {
  margin: 5px 0 16px;
  color: var(--muted);
}

.map-score {
  width: fit-content;
  margin: 0 auto 15px;
  padding: 9px 18px;
  border-radius: 30px;
  background: #fff0bd;
  color: #775619;
  font-weight: 900;
}

.adventure-land {
  position: relative;
  width: min(100%, 560px);
  height: 610px;
  margin: auto;
  overflow: hidden;
  border: 5px solid white;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 15% 30%, #a9d88e 0 13%, transparent 14%),
    radial-gradient(ellipse at 85% 60%, #b4df91 0 15%, transparent 16%),
    linear-gradient(180deg, #bce8ff 0%, #d9f3c3 35%, #9bd27e 100%);
  box-shadow: 0 5px 18px #3c573022;
}

.adventure-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-sun,
.map-cloud,
.map-mountain,
.map-decoration,
.map-location,
.treasure-castle,
.map-explorer {
  position: absolute;
  z-index: 2;
}

.map-sun {
  top: 12px;
  right: 25px;
  font-size: 43px;
}

.map-cloud {
  font-size: 35px;
  opacity: .9;
}

.cloud-one {
  top: 35px;
  left: 30%;
}

.cloud-two {
  top: 105px;
  right: 8%;
}

.map-mountain {
  font-size: 58px;
  opacity: .85;
}

.mountain-one {
  top: 100px;
  left: 4%;
}

.mountain-two {
  top: 185px;
  right: 2%;
}

.map-decoration {
  font-size: 35px;
}

.tree-one {
  top: 260px;
  left: 5%;
}

.tree-two {
  top: 390px;
  right: 5%;
}

.tree-three {
  bottom: 18px;
  left: 8%;
}

.flower-one {
  top: 320px;
  right: 13%;
}

.flower-two {
  bottom: 115px;
  left: 8%;
}

/* Extra landmarks make the map feel like a world to explore. */
.map-castle {
  font-size: 34px;
  filter: drop-shadow(0 3px 2px #3b472b35);
}
.castle-one { top: 18%; left: 43%; }
.castle-two { top: 43%; right: 8%; font-size: 30px; }
.castle-three { bottom: 12%; right: 35%; font-size: 32px; }
.map-bridge { top: 58%; left: 43%; font-size: 30px; }
.map-rainbow { top: 4%; left: 7%; font-size: 34px; }

/* MAP LOCATIONS */

.map-location {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  min-height: 105px;
  padding: 8px 5px;
  border: 3px solid white;
  border-radius: 18px;
  background: #ffffffed;
  color: var(--deep-purple);
  box-shadow: 0 4px 10px #263b2530;
  transition: transform .2s;
}

.map-location:hover {
  z-index: 5;
  transform: scale(1.06);
}

.location-picture {
  font-size: 32px;
  line-height: 1.2;
}

.location-name {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 900;
}

.location-status {
  margin-top: 3px;
  color: #967021;
  font-size: 9px;
  font-weight: 900;
}

.map-location.completed {
  border-color: #f5c94e;
  background: #fff9dc;
}

.map-location.completed .location-status {
  color: #27864a;
}

.location-noah {
  top: 485px;
  left: 5%;
}

.location-david {
  top: 365px;
  right: 5%;
}

.location-moses {
  top: 235px;
  left: 6%;
}

.location-jesus {
  top: 80px;
  right: 9%;
}

/* TREASURE CASTLE */

.treasure-castle {
  top: 12px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: translateX(-50%);
  padding: 5px 12px;
  border: 2px solid white;
  border-radius: 20px;
  background: #fff4cb;
  color: #684b17;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.castle-icon {
  font-size: 24px;
}

/* MAP CHARACTER IMAGES */

.map-explorer {
  top: 86%;
  left: 17%;
  display: flex;
  transform: translate(-50%, -50%);
  transition: top 1.1s cubic-bezier(.2,.8,.2,1), left 1.1s cubic-bezier(.2,.8,.2,1);
  z-index: 6;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  filter: drop-shadow(0 3px 2px #25351b35);
}

/* Lucas on the map */

.map-lucas-photo {
  display: block;
  width: 39px;
  height: 49px;
  object-fit: contain;
  object-position: bottom center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: explorerFloat 2.6s ease-in-out infinite;
}

/* Evanah on the map */

.map-evanah-photo {
  display: block;
  width: 39px;
  height: 49px;
  object-fit: contain;
  object-position: bottom center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: explorerFloat 2.6s ease-in-out infinite;
  animation-delay: .5s;
}

/* MAP PROGRESS */

.map-progress {
  width: min(100%, 560px);
  margin: 20px auto 0;
  padding: 18px;
  border-radius: 18px;
  background: white;
}

.map-progress h3 {
  margin: 0 0 12px;
  color: var(--deep-purple);
}

.progress-track {
  height: 13px;
  overflow: hidden;
  border-radius: 20px;
  background: #eee8f4;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #66bd7b, #a4d76e);
  transition: width .4s ease;
}

.map-progress p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* ACHIEVEMENTS */

.achievement-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 45px 0;
  padding: 25px;
  border-radius: 22px;
  background: #f0eaff;
}

.achievement-icon {
  font-size: 55px;
}

.achievement-section h2 {
  margin: 5px 0;
  color: var(--deep-purple);
}

.achievement-section p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.6;
}

.achievement-guides {
  font-weight: 700;
  color: var(--deep-purple) !important;
}

/* FOOTER */

footer {
  padding: 25px 15px;
  background: #49316f;
  color: white;
  text-align: center;
  font-size: 13px;
}

.footer-verse {
  opacity: .8;
}

/* GAME MODAL */

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #20172dcc;
}

.modal.show {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(100%, 760px);
  max-height: 94vh;
  padding: 25px;
  overflow-y: auto;
  border-radius: 25px;
  background: white;
  box-shadow: 0 15px 50px #0003;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1edf7;
  color: var(--deep-purple);
  font-size: 18px;
  font-weight: 900;
}

.modal-card h2 {
  color: var(--deep-purple);
  text-align: center;
}

.modal-card p {
  color: #5e5669;
  line-height: 1.7;
}

.story-emoji {
  margin: 8px 0;
  font-size: 48px;
  text-align: center;
}

.story-scene-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  background: #f4efff;
  margin: 0 auto;
}

.scene-count {
  display: block;
  margin-top: 14px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
}

.scene-title {
  margin: 8px 0;
  font-size: 27px;
}

.scene-story {
  font-size: 16px;
}

.scene-lesson {
  margin: 15px 0;
  padding: 14px;
  border-radius: 15px;
  background: #f4efff;
  color: var(--deep-purple);
  font-weight: 800;
}

.scene-controls {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.scene-controls button {
  flex: 1;
}

.modal-button {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 13px 18px;
  border: 0;
  border-radius: 25px;
  background: var(--purple);
  color: white;
  font-weight: 900;
}

.modal-button.secondary {
  background: #eae4f3;
  color: var(--deep-purple);
}

.modal-button:disabled {
  cursor: not-allowed;
  opacity: .4;
}

/* QUIZ */

.quiz-option {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 13px;
  border: 2px solid #e6def0;
  border-radius: 14px;
  background: white;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.quiz-option:hover {
  border-color: var(--purple);
  background: #f7f2ff;
}

.quiz-option:disabled {
  cursor: default;
  opacity: 1;
}

.lesson-box,
.verse-box,
.feedback-box {
  margin: 15px 0;
  padding: 14px;
  border-radius: 15px;
  background: #f4efff;
}

.verse-box {
  background: #fff5d8;
  color: #6d511c;
  font-weight: 800;
}

.feedback-box {
  font-weight: 900;
}

.feedback-box.correct {
  background: #e6f7e9;
  color: #267342;
}

.feedback-box.incorrect {
  background: #fff0e8;
  color: #9b4b2c;
}

/* LUCAS AND EVANAH - WELCOME CHARACTERS */

.character-stage {
  position: relative;
  flex: 0 0 390px;
  height: 250px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  overflow: visible;
}

.explorer-character {
  position: relative;
  width: 46%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: explorerFloat 3s ease-in-out infinite;
}

.evanah-character {
  width: 42%;
  animation-delay: .65s;
}

.character-art {
  position: relative;
  width: 100%;
  height: 195px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* LUCAS PHOTO */

.lucas-photo {
  width: 118px;
  height: 165px;
  flex: 0 0 165px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lucas-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 5px 5px rgba(52, 43, 69, .14));
}

/* EVANAH PHOTO */

.evanah-photo {
  width: 118px;
  height: 165px;
  flex: 0 0 165px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.evanah-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 5px 5px rgba(52, 43, 69, .14));
}

/* CHARACTER NAME LABELS */

.character-name {
  margin-top: 7px;
  padding: 4px 14px;
  border-radius: 20px;
  background: white;
  color: var(--deep-purple);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 3px 8px #342b4520;
}

/* DECORATIVE SPARKLES */

.character-sparkle {
  position: absolute;
  font-size: 25px;
  animation: sparklePulse 2s ease-in-out infinite;
}

.sparkle-one {
  top: 12px;
  left: 3px;
}

.sparkle-two {
  top: 55px;
  right: 0;
  animation-delay: 1s;
}

.character-greeting {
  position: absolute;
  bottom: -28px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  color: var(--deep-purple);
}

/* CHARACTER ANIMATIONS */

@keyframes explorerFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

@keyframes characterWave {
  0%, 100% {
    transform: rotate(0);
  }

  25% {
    transform: rotate(-5deg);
  }

  65% {
    transform: rotate(5deg);
  }
}

@keyframes hatBob {
  0%, 100% {
    transform: rotate(-3deg);
  }

  50% {
    transform: rotate(4deg) translateY(-3px);
  }
}

@keyframes sparklePulse {
  0%, 100% {
    opacity: .55;
    transform: scale(.85) rotate(0);
  }

  50% {
    opacity: 1;
    transform: scale(1.18) rotate(15deg);
  }
}

/* TABLET RESPONSIVE DESIGN */

@media (max-width: 760px) {

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

  .welcome-section {
    min-height: 280px;
    padding: 28px 6%;
  }

  .character-stage {
    flex-basis: 250px;
    height: 190px;
    gap: 5px;
  }

  .character-art {
    height: 145px;
  }

  .lucas-photo {
    width: 96px;
    height: 135px;
    flex-basis: 135px;
  }

  .evanah-photo {
    width: 96px;
    height: 135px;
    flex-basis: 135px;
  }

  .character-greeting {
    font-size: 9px;
    bottom: -22px;
  }

  .map-lucas-photo,
  .map-evanah-photo {
    width: 36px;
    height: 46px;
  }

  /* TABLET LOGO SIZE */

  .game-logo {
    width: 130px;
    height: 60px;
  }
}

/* MOBILE RESPONSIVE DESIGN */

@media (max-width: 480px) {

  .top-bar {
    padding: 8px 4%;
    min-height: 62px;
    gap: 8px;
  }

  /* SMALLER MOBILE LOGO */

  .game-logo {
    width: 105px;
    height: 48px;
  }

  .star-counter {
    padding: 7px 10px;
    font-size: 11px;
  }

  main {
    width: 92%;
  }

  .welcome-section {
    align-items: flex-start;
    min-height: 300px;
  }

  .welcome-section h2 {
    font-size: 30px;
  }

  .character-stage {
    position: absolute;
    right: 5px;
    bottom: 0;
    width: 220px;
    flex-basis: 220px;
    height: 165px;
    gap: 3px;
    opacity: .96;
  }

  .explorer-character {
    width: 50%;
  }

  .character-art {
    height: 120px;
  }

  .lucas-photo {
    width: 77px;
    height: 112px;
    flex-basis: 112px;
  }

  .evanah-photo {
    width: 77px;
    height: 112px;
    flex-basis: 112px;
  }

  .character-name {
    margin-top: 3px;
    padding: 3px 9px;
    font-size: 10px;
  }

  .character-greeting {
    display: none;
  }

  .character-sparkle {
    font-size: 18px;
  }

  .welcome-copy {
    max-width: 100%;
  }

  .treasure-section {
    padding: 15px;
  }

  .treasure-section h3 {
    font-size: 20px;
  }

  .world-card {
    min-height: 215px;
    padding: 14px;
  }

  .world-card strong {
    font-size: 16px;
  }

  .adventure-map {
    padding: 22px 10px;
  }

  .adventure-land {
    height: 580px;
  }

  .map-location {
    width: 108px;
    min-height: 100px;
  }

  .location-noah {
    left: 2%;
    top: 485px;
  }

  .location-david {
    right: 2%;
    top: 365px;
  }

  .location-moses {
    left: 2%;
    top: 235px;
  }

  .location-jesus {
    right: 2%;
    top: 80px;
  }

  .treasure-castle {
    top: 12px;
  }

  .map-explorer {
    top: 86%;
    left: 17%;
  }

  .map-character-pair {
    gap: 1px;
  }

  .map-lucas-photo,
  .map-evanah-photo {
    width: 31px;
    height: 41px;
  }

  .achievement-section {
    align-items: flex-start;
    padding: 18px;
  }

  .achievement-icon {
    font-size: 40px;
  }

  .modal-card {
    padding: 18px;
  }

  .scene-title {
    font-size: 22px;
  }

  .scene-controls {
    flex-direction: column;
  }
}

/* =========================================
   DAVID THE BRAVE - SCENE IMAGE ANIMATION
   ========================================= */

.david-scene-image {
  animation: explorerFloat 2.6s ease-in-out infinite;
}

/* =========================================
   MOSES' JOURNEY - SCENE IMAGE ANIMATION
   ========================================= */

.moses-scene-image {
  animation: explorerFloat 2.6s ease-in-out infinite;
}

/* =========================================
   WALK WITH JESUS - SCENE IMAGE ANIMATION
   ========================================= */

.jesus-scene-image {
  animation: explorerFloat 2.6s ease-in-out infinite;
}

/* ACCESSIBILITY: REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

  .explorer-character,
  .avatar-face,
  .avatar-hat,
  .character-sparkle,
  .map-lucas-photo,
  .map-evanah-photo,
  .david-scene-image,
  .moses-scene-image,
  .jesus-scene-image {
    animation: none;
  }
}

/* One-attempt quiz answer states */
.quiz-option.correct {
  border-color: #2e9b57;
  background: #e9f8ee;
  color: #176536;
}

.quiz-option.incorrect {
  border-color: #d65a55;
  background: #fff0ef;
  color: #9b2824;
}
