/* Intro interactive main page */

#scene-intro .scene-inner {
  position: relative;
}

.intro-hotspots {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.intro-hotspot {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0);
  cursor: pointer;
  pointer-events: auto;
}

.intro-hotspot:hover {
  background: rgba(255, 255, 255, 0.16);
}

.intro-hotspot[data-action="intro-egg"]:hover {
  background: transparent;
}

.intro-hotspot[data-action="cabinet-gallery"] {
  clip-path: polygon(1% 22%, 100% 0, 100% 88%, 0 100%);
}

.intro-hotspot[data-action="level-list"] {
  clip-path: polygon(42% 8%, 100% 52%, 55% 92%, 0 46%);
}

.intro-hotspot[data-action="album-link"] {
  clip-path: polygon(8% 0, 95% 3%, 95% 98%, 98% 95%, 0 98%, 0 32%);
}

.intro-hotspot[data-action="credit"] {
  clip-path: polygon(8% 16%, 96% 12%, 92% 100%, 14% 94%, 0 35%);
}

.intro-hotspot[data-action="egg-checklist"] {
  clip-path: polygon(
    36% 1%,
    65% 1%,
    85% 20%,
    68% 20%,
    56% 22%,
    55% 85%,
    75% 92%,
    75% 97%,
    55% 97%,
    29% 92%,
    44% 85%,
    43% 22%,
    25% 20%,
    28% 12%
  );
}

/* Popup panel */

.intro-panel {
  position: absolute;
  inset: 0;
  z-index: 30;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 24px;
  box-sizing: border-box;

  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.intro-panel.is-open {
  display: flex;
}

.intro-panel-inner {
  position: relative;

  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow-y: auto;

  padding: 24px;
  box-sizing: border-box;
  border-radius: 18px;

  color: #fff;
  background: rgba(8, 10, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.intro-panel-inner h1 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.intro-panel.is-gallery .intro-panel-inner {
  width: min(820px, calc(100vw - 32px));
}

.intro-gallery {
  display: grid;
  gap: 16px;
}

.intro-gallery-image {
  display: block;
  justify-self: center;
  width: auto;
  max-width: 100%;
  max-height: min(64vh, 620px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
}

.intro-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.intro-gallery-nav {
  min-width: 54px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.intro-gallery-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

.intro-gallery-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.intro-gallery-counter {
  min-width: 52px;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.intro-egg-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 14px;
  margin-top: 18px;
}

.intro-egg-group {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.intro-egg-group h2 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  text-align: center;
}

.intro-egg-boxes {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.intro-egg-box {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.22),
    0 4px 10px rgba(0, 0, 0, 0.24);
  color: #e9f6cf;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.intro-egg-box.is-found {
  border-color: #e9f6cf;
  background: rgba(112, 154, 91, 0.66);
}

.intro-panel-inner p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.72);
}

.intro-panel-close {
  position: absolute;
  top: 12px;
  right: 14px;

  width: 34px;
  height: 34px;
  border-radius: 999px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;

  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.intro-panel-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Room list layout */

.room-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Room button */

.room-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;
  box-sizing: border-box;

  padding: 10px 14px;
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;

  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.room-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.room-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.room-item .lock {
  font-size: 14px;
}

/* Coding style content */

.code-card {
  padding: 16px;
  border-radius: 14px;

  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
}

.code-card p {
  margin: 0 0 6px;
}

.code-key {
  color: #9ad7ff;
}

.code-value {
  color: #f1d18a;
}

/* Long-form intro panel copy */

.intro-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.62;
}

.intro-copy p {
  margin: 0 0 14px;
  color: inherit;
}

.intro-credit {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro-credit section {
  padding-top: 2px;
}

.intro-credit h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  letter-spacing: 0.03em;
}

.intro-credit p {
  margin: 0 0 6px;
}

/* Linktree style links */

.linktree-list {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  max-width: 500px;
  margin-inline: auto;
  flex-direction: column;
  gap: 12px;
}

.linktree-list a {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;
  padding: 10px 16px;
  box-sizing: border-box;

  border-radius: 12px;

  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;

  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);

  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.linktree-list a:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .intro-panel {
    padding: 14px;
  }

  .intro-panel-inner {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    padding: 20px 16px;
    border-radius: 16px;
  }

  .intro-panel-inner h1 {
    font-size: 22px;
  }

  .room-item {
    padding: 10px 12px;
  }

  .code-card {
    font-size: 12px;
    overflow-x: auto;
  }

  .intro-copy {
    font-size: 14px;
    line-height: 1.55;
  }

  .intro-egg-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
