.level-map-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.level-row {
  display: flex;
  justify-content: space-between;
  width: 90%;
  max-width: 600px;
  position: relative;
}

.level-row.even {
  flex-direction: row;
}

.level-row.odd {
  flex-direction: row-reverse;
}

.level-node {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 1;
  flex: 1;
}

.level-node:hover {
  transform: scale(1.1);
}

.node-image {
  width: 60px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 5px;
}

.star {
  width: 16px;
  height: 16px;
}
.star.big {
  width: 10%;
  height: 10%;
}

.star.filled {
  content: url('/imgs/adventure/filled_star.png');
}

/* Horizontal connector between adjacent nodes */
.level-node:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 30px;
  right: -50%;
  width: 100%;
  height: 2px;
  background-color: #fff;
  z-index: -1;
}
.level-node.complete::after {
  background-color: #fff500;
}

.level-row.odd .level-node:not(:last-child)::after {
  right: auto;
  left: -50%;
}

/* Vertical connector under last node of row */
.level-node.vertical-connector::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 96px;
  background-color: #fff;
  bottom: -67px;
  left: 50%;
}
.level-node.complete.vertical-connector::before {
  background-color: #fff500;
}

.level-node.locked {
pointer-events: none;
transform: none !important;
}

.level-node.locked:hover {
transform: none;
}

.world_select {
  padding:15px;
}

/* Wrapper to position the lock on top */
.node-wrapper {
position: relative;
display: inline-block;
}

.lock-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: auto;
pointer-events: none;
}

@media (max-width: 480px) {
  .node-image {
    width: 50px;
  }

  .star {
    width: 12px;
    height: 12px;
  }
}

/* Mini Reward Display Boxes */
.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mini-reward-box:first-child {
  margin-left: -8px;
}
.mini-reward-box {
    width: 80px;
    height: 80px;
    background-color: #333;
    border: 2px solid gold;
    border-radius: 5px;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: help;
    display: flex;
}
.mini-reward-box img:not(.resc-display) {
  width:98%;
  height: 98%;
}
.flex-container .tooltip-inner, #workbench .tooltip-inner {
  background-color: unset !important;
}

/* Continuous SM64-like star spin */
  .sm64-star {
    display: inline-block;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
    animation: sm64-spin 1.25s linear infinite;
    /* (optional) subtle tilt/glow */
    filter: drop-shadow(0 0 .35rem rgba(255,240,150,.85))
            drop-shadow(0 0 .15rem rgba(255,240,150,.6));
  }

  @keyframes sm64-spin {
    /* normal pace up to ~70° */
   0%   { transform: perspective(650px) rotateY(0deg) scale(1);
          animation-timing-function: cubic-bezier(.42,0,.3,1); }
   22%  { transform: perspective(650px) rotateY(72deg) scale(.98);
          /* SPEED BOOST through the “invisible” zone (to next keyframe) */
          animation-timing-function: cubic-bezier(.9,.91,.2,1); }
   /* zip past edge-on (90°) quickly */
   28%  { transform: perspective(650px) rotateY(108deg) scale(.98);
          animation-timing-function: cubic-bezier(.42,0,.3,1); }
   50%  { transform: perspective(650px) rotateY(180deg) scale(1);
          animation-timing-function: cubic-bezier(.42,0,.3,1); }
   72%  { transform: perspective(650px) rotateY(252deg) scale(.98);
          /* SPEED BOOST through the second edge-on (270°) */
          animation-timing-function: cubic-bezier(.9,.91,.2,1); }
   78%  { transform: perspective(650px) rotateY(288deg) scale(.98);
          animation-timing-function: cubic-bezier(.42,0,.3,1); }
   100% { transform: perspective(650px) rotateY(360deg) scale(1); }
  }

  /* Optional gentle bob like it's floating */
  .sm64-float { display:inline-block; animation: sm64-bob 1.5s ease-in-out infinite; }
  @keyframes sm64-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }

  /* Respect reduced-motion */
  @media (prefers-reduced-motion: reduce) {
    .sm64-star, .sm64-float { animation: none !important; }
  }
