body {
  font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
  text-align: center;
  margin: 0;
  padding: 0;
  background-color: #f9f5f0;
  background-image: url("../assets/chap7bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

.nav-toggle-button {
    position: fixed;
    top: 20px;
    right:-15px;
    z-index: 1000;
    background-color: transparent; 
    color: transparent; 
    font-size: 0;
    width: 100px;
    height: 50px;
    border: none;
    border-radius: 5px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nav-toggle-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nav-toggle-button:hover {
    transform: scale(1.05);
}

.nav-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    background-color: rgba(30, 30, 30, 0.5); 
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); 
    z-index: 999;
    transform: translateX(300px); 
    transition: transform 0.4s ease-in-out;
    padding-top: 80px; /* Space for the top toggle button */
}

/* State to show the menu */
.nav-wrapper.open {
    transform: translateX(0); 
}

.bookmark {
    width: 100%;
    padding: 10px 15px; 
    border-radius: 4px;
    text-align: left;
    display: block; 
    text-decoration: none; 
    color: #ffcc70; 
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Create the Bullet Point (using pseudo-element) */
.bookmark span::before {
    content: '•'; /* The bullet character */
    color: #ffcc70; /* Bullet color */
    font-size: 1.2em;
    margin-right: 15px; /* Space between bullet and text */
    display: inline-block;
    width: 15px; /* Give it a fixed width for alignment */
}

.bookmark:hover {
    background-color: rgba(255, 204, 112, 0.25);
    transform: scale(1.05);
}

.bookmark span {
    opacity: 1; 
    color: #f7e2b3;
    font-weight: normal;
    font-size: 13px;
    display: inline; 
}


.page-header {
  width: 100%;
  text-align: center;
  margin-bottom: 20px; /* space below header */
}

.page-header img {
  max-width: 30%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.power-bar {
  margin: 20px;
}

.power-bar img {
  width: 70px;
  margin: 4px;
  cursor: grab;
}

.game-area {
  position: relative;
  width: 500px;
  height: 500px;
  margin: auto;
}

.hero {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
}

.hero-caption {
  position: absolute;
  top: 75%;    /* vertical position */
  left: 90%;   /* horizontal position */
  width: 450px;      /* scale as needed */
  height: auto;
  z-index: 6;
  pointer-events: none; /* prevents blocking drag/drop */
}

.slot {
  width: 90px;
  height: 70px;
  position: absolute;
  border: 2px solid transparent; /* border shows green or red later */
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none; /* important so user can still drop */
}

.slot.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 80% { transform: translateX(-1px); }
  50%, 90% { transform: translateX(1px); }
}

.slot[data-power="power1"] { width: 100px; height: 120px; top: 65%; left: 15%; transform: translateX(-50%); }
.slot[data-power="power2"] { width: 120px; height: 100px; top: 40%; left: 90%; transform: translateX(-50%); }
.slot[data-power="power3"] { width: 85px; height: 100px; top: 77%; left: 71%; transform: translateX(-50%); }
.slot[data-power="power4"] { width: 95x; height: 80px; bottom: 32%; left: 56%; transform: translateX(-50%); }
.slot[data-power="power5"] { width: 150px; height: 100px; top: 1%; left: 19%; transform: translateX(-50%); }
.slot[data-power="power6"] { width: 80px; height: 100px; top: 28%; left: 1%; transform: translateX(-50%); }
.slot[data-power="power7"] { width: 70px; height: 80px; top: 75%; left: 58%; transform: translate(-50%, -50%); }
.slot[data-power="power8"] { width: 95px; height: 100px; top: 15%; left: 85%; transform: translate(-50%, -50%); }

.info-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  /* Ensure children can be absolutely positioned inside */
  position: fixed;
  /* Add relative positioning context for absolute children */
  position: fixed;
}

.info-card.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(0.8); /* full size */
}

.info-card a {
 position: absolute;
  top: 335px;   /* distance from top of viewport */
  left: 52%;   /* center horizontally */
  transform: translateX(-50%);
  color: #c01818;
  text-decoration: none;
  font-weight: bold;
  z-index: 101; /* above the card */
}

#infoCardLinks {
  display: relative;
  gap: 10px; /* spacing between images */
  margin-bottom: 10px;
  justify-content: center;
  width: 300px;  /* adjust as needed */
  height: 150px; 
}

#infoCardLinks a img {
  position: absolute; /* now we can set top/left individually */
  width: 160px;
  height: auto;
}

#infoCardClose {
  position: absolute;
  top: 60px;
  right: 80px;
  cursor: pointer;
  padding: 5px 10px;
  background-color: #c01818;
  color: white;
  border: none;
  border-radius: 80px;
  z-index: 102; /* Ensure it's above other content */
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.power-bar img {
  animation: float 2s ease-in-out infinite;
}

.caption-banner {
  text-align: left;
  margin: 50px auto 20px auto;
  width: 100%;
}

.caption-banner img {
  max-width: 25%;
  height: auto;
  display: block;
  margin: 0 auto;
  margin-left: 10px;
  margin-top: -100px;
}

.music-toggle {
  position: fixed;
  top: 20px;
  right: 100px; /* to the left of nav-toggle (which is at right: -15px) */
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  padding: 0;
  width: auto;
  height: auto;
  outline: none;
  -webkit-tap-highlight-color: transparent; /* removes tap highlight on mobile */
}

.next-button {
  position: fixed;
  bottom: 40px;
  right: -30px;
  width: 140px;
  height: 125px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
  z-index: 100;
  padding: 0;
  outline: none;
}

.next-button:hover {
  opacity: 0.9; /* or apply a filter if you prefer */
}

.next-btn-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.next-button:hover {
  /* Scale the button up by 10% (1.1) */
  transform: scale(1.2);
  /* Slightly increase the opacity for emphasis (optional, you already have one) */
  opacity: 1; 
}

