/* ===== InfiniteMenu (React Bits port) ===== */

#infinite-grid-menu-canvas {
  cursor: grab;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  outline: none;
}

#infinite-grid-menu-canvas:active {
  cursor: grabbing;
}

.action-button {
  position: absolute;
  left: 50%;
  z-index: 10;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  background: #6f7c61;
  border-radius: 50%;
  cursor: pointer;
  border: 5px solid #111827;
}

.action-button-icon {
  user-select: none;
  position: relative;
  color: #fff;
  top: 2px;
  font-size: 26px;
}

.face-title {
  user-select: none;
  position: absolute;
  font-family: "Allura", cursive;
  font-weight: 900;
  font-size: 3rem;
  left: 1.6em;
  top: 50%;
  transform: translate(20%, -50%);
  color: #111827;
}

.face-title.active {
  opacity: 1;
  transform: translate(20%, -50%);
  pointer-events: auto;
  transition: 0.5s ease;
}

.face-title.inactive {
  pointer-events: none;
  opacity: 0;
  transition: 0.1s ease;
}

.face-description {
  user-select: none;
  position: absolute;
  max-width: 10ch;
  top: 50%;
  font-size: 1.2rem;
  right: 1%;
  transform: translate(0, -50%);
  color: #374151;
}

.face-description.active {
  opacity: 1;
  transform: translate(-90%, -50%);
  pointer-events: auto;
  transition: 0.5s ease;
}

.face-description.inactive {
  pointer-events: none;
  transform: translate(-60%, -50%);
  opacity: 0;
  transition: 0.1s ease;
}

.action-button.active {
  bottom: 3.8em;
  transform: translateX(-50%) scale(1);
  opacity: 1;
  pointer-events: auto;
  transition: 0.5s ease;
}

.action-button.inactive {
  bottom: -80px;
  transform: translateX(-50%) scale(0);
  opacity: 0;
  pointer-events: none;
  transition: 0.1s ease;
}

@media (max-width: 1500px) {
  .face-title,
  .face-description {
    display: none;
  }
}

/* ===== Stage + platform dropdown (doodle themed) ===== */
.menu-stage {
  position: relative;
  width: 100%;
  height: clamp(460px, 70vh, 640px);
  border: 2.5px solid #111827;
  border-radius: var(--doodle-radius, 18px);
  box-shadow: var(--doodle-shadow, 5px 5px 0 #434f3a);
  overflow: hidden;
  background: transparent;   /* blend with the page's sage background + glow */
}

.platform-picker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.platform-picker label {
  font-family: "Allura", cursive;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.platform-select {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1rem;
  padding: 0.55rem 1rem;
  background: #fff;
  color: #111827;
  border: 2.5px solid #111827;
  border-radius: 18px 220px 18px 220px / 220px 18px 220px 18px;
  box-shadow: 7px 7px 0 #434f3a;
  cursor: pointer;
}
.platform-select:focus { outline: none; box-shadow: 9px 9px 0 #6f7c61; }

/* ===== How-to guide above the sphere ===== */
.menu-guide {
  background: #eef2e8;
  border: 2.5px solid #111827;
  border-radius: 18px 220px 18px 220px / 220px 18px 220px 18px;
  box-shadow: 8px 8px 0 #434f3a;
  padding: 1.2rem 1.6rem 1.4rem;
  margin-bottom: 1.8rem;
}
.menu-guide-title {
  display: inline-block;
  font-family: "Allura", cursive;
  font-size: 1.15rem;
  color: #434f3a;
  margin-bottom: 0.9rem;
}
.menu-guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.4rem;
  counter-reset: step;
}
.menu-guide-steps li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #111827;
}
.g-ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: #fff;
  border: 2.5px solid #111827;
  border-radius: 50%;
  box-shadow: 5px 5px 0 #6f7c61;
}

.menu-guide-note {
  margin: 1.3rem 0 0;
  padding-top: 0.9rem;
  border-top: 2px dashed #a9b89a;
  font-size: 0.88rem;
  color: #434f3a;
}

@media (max-width: 720px) {
  .menu-guide-steps { grid-template-columns: 1fr; }
}

/* ===== In-page video lightbox ===== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 1.5rem;
  background: rgba(17, 24, 39, 0.82);
  backdrop-filter: blur(4px);
}
.video-modal.open { display: grid; }
.video-modal-inner {
  position: relative;
  width: min(960px, 100%);
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 3px solid #111827;
  border-radius: 14px;
  box-shadow: 10px 10px 0 #434f3a;
  overflow: hidden;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Shown when a video's owner has disabled embedding */
.video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
  padding: 1.5rem;
  color: #fff;
}
.video-fallback p { margin: 0; font-size: 1rem; opacity: .9; }
.video-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6f7c61;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  border: 3px solid #111827;
  border-radius: 50%;
  box-shadow: 5px 5px 0 #434f3a;
  cursor: pointer;
  z-index: 2;
}
.video-close:hover { background: #7e8c6f; }

/* On small screens, tuck the close button inside the corner so it never clips off-screen */
@media (max-width: 600px) {
  .video-close { top: 6px; right: 6px; width: 40px; height: 40px; font-size: 1.35rem; }
}
