/* 首页样板「好奇实验楼」：全屏 3D 大楼 + 左侧导览台 + 右侧房间介绍。
   浮层都不用毛玻璃（backdrop-filter 叠在逐帧刷新的 WebGL 上，Mac Chrome 曾闪黑）。 */

:root {
  --accent: #78e7ff;
  --spark: #ffe47a;
  --glass: #0a1122e6;
  --glass-soft: #0a112299;
  --line: #ffffff17;
  --left-w: 330px;
  --gutter: 28px;
}

[hidden] {
  display: none !important;
}

/* 只有 3D 模式锁住整页滚动；卡片墙照常滚动 */
html.is3d,
html.is3d body {
  overflow: hidden;
  background: #060a15;
}

a {
  color: inherit;
}

/* —— 画布 —— */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  touch-action: none;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 左侧压暗：欢迎语和导览不和远处城市灯光抢 */
.stage::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: min(560px, 55vw);
  pointer-events: none;
  background: linear-gradient(90deg, #060a15d9 0%, #060a1599 55%, transparent 100%);
}

/* —— 浮层总容器：本身不接指针，拖动能落到画布上 —— */
.ui {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.topBar {
  position: absolute;
  top: 20px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeDown 0.8s 0.2s both ease-out;
}
.brand {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand img {
  width: 26px;
  height: 26px;
}
.topTag {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.topLink {
  pointer-events: auto;
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.topLink:hover,
.topLink:focus-visible {
  color: var(--text);
  border-color: var(--line);
}

/* —— 左列：欢迎语 + 楼层导览 —— */
.leftCol {
  position: absolute;
  top: 76px;
  bottom: 24px;
  left: var(--gutter);
  width: var(--left-w);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
}
.hero {
  animation: fadeUp 0.9s 0.3s both ease-out;
  text-shadow: 0 2px 18px #060a15;
}
.heroEyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
}
.heroTitle {
  font-size: 1.85rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.heroDot {
  color: var(--spark);
}
.heroSub {
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #c5cfdf;
}

.directory {
  pointer-events: auto;
  min-height: 0;
  flex: 0 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 12px 10px;
  animation: fadeUp 0.9s 0.6s both ease-out;
  scrollbar-width: thin;
  scrollbar-color: #ffffff22 transparent;
}
.dirTitle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.dirTitle span {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-dim);
}
.dirFloors {
  display: flex;
  flex-direction: column;
}
.dirFloor {
  border-top: 1px solid var(--line);
  padding: 8px 4px 10px;
  border-radius: 10px;
  transition: background 0.25s;
}
.dirFloor.isHover {
  background: #78e7ff0d;
}
.dirFloor.isWanted {
  animation: wanted 1.6s ease-out;
}
.dirFloorHead {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 4px;
  border-radius: 8px;
}
.dirFloorHead:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dirLevel {
  flex: none;
  min-width: 34px;
  text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #060a15;
  background: var(--accent);
  border-radius: 6px;
  padding: 2px 6px;
  box-shadow: 0 0 12px #78e7ff66;
}
.dirSubject {
  font-size: 0.92rem;
  font-weight: 700;
}
.dirCount {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.dirFloorHead:hover .dirSubject {
  color: var(--accent);
}
.dirRooms {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dirRoom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 4px 10px 4px 7px;
  border-radius: var(--radius-pill);
  background: #ffffff08;
  border: 1px solid color-mix(in srgb, var(--lab) 35%, transparent);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.dirRoom:hover,
.dirRoom:focus-visible,
.dirRoom.isHover {
  outline: none;
  background: color-mix(in srgb, var(--lab) 22%, transparent);
  border-color: var(--lab);
  box-shadow: 0 0 16px color-mix(in srgb, var(--lab) 45%, transparent);
  transform: translateY(-1px);
}
.dirEmoji {
  font-size: 1rem;
  line-height: 1;
}
.dirWip {
  font-size: 0.68rem;
  color: var(--spark);
}
.dirLobby {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 4px;
}
.dirLobby .dirLevel {
  background: #ffffff1f;
  color: var(--text);
  box-shadow: none;
}
.dirLobby .dirSubject {
  font-weight: 500;
  color: var(--text-muted);
}

/* —— 楼层标签：贴在楼的左侧，跟着镜头走 —— */
.floorTag {
  position: fixed;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-size: 0.8rem;
  color: #cfe9f5;
  padding: 3px 10px 3px 4px;
  border-radius: var(--radius-pill);
  background: var(--glass-soft);
  border: 1px solid #78e7ff26;
  opacity: 0;
  transition: opacity 0.35s, border-color 0.25s, color 0.25s;
  will-change: transform;
}
.floorTag b {
  display: inline-block;
  min-width: 26px;
  text-align: center;
  margin-right: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--accent);
}
body.isLive .floorTag.isOn {
  opacity: 1;
}
.floorTag.isHover {
  border-color: var(--accent);
  color: #fff;
}
body.isFocus .floorTag.isOn,
body.isEntering .roomCard.isOn {
  opacity: 0;
}

/* —— 房间名字卡：楼层掀开后浮在每间房上方 —— */
.roomCard {
  position: fixed;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f4f8ff;
  padding: 4px 10px 4px 6px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--lab, #b8c7d9) 70%, transparent);
  box-shadow: 0 6px 18px #0007, 0 0 14px color-mix(in srgb, var(--lab, #b8c7d9) 30%, transparent);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s;
  will-change: transform;
}
button.roomCard {
  cursor: pointer;
}
.roomCard.isOn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.roomCard.isUtility {
  font-weight: 500;
  color: #c2cbd8;
  background: var(--glass-soft);
  border-color: #ffffff1f;
  box-shadow: none;
  pointer-events: none !important;
}
.roomCard.isHover,
button.roomCard:hover,
button.roomCard:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--lab) 30%, #0a1122);
}
.rcEmoji {
  font-size: 1rem;
  line-height: 1;
}

/* —— 回到全景 —— */
.floorBack {
  all: unset;
  pointer-events: auto;
  position: absolute;
  bottom: 26px;
  left: calc(var(--gutter) + var(--left-w) + (100% - var(--gutter) - var(--left-w)) / 2);
  transform: translateX(-50%);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid #78e7ff55;
  box-shadow: 0 0 18px #78e7ff22;
}
.floorBack:hover,
.floorBack:focus-visible {
  border-color: var(--accent);
}
.floorBack kbd {
  margin-left: 6px;
  font: inherit;
  font-size: 0.7rem;
  color: var(--text-dim);
  border: 1px solid #ffffff26;
  border-radius: 5px;
  padding: 0 5px;
}
body.isFocus .floorBack,
body.isEntering .floorBack {
  display: none;
}
body.isOpen .hint {
  opacity: 0;
}
.dirFloor.isOpenFloor {
  background: #78e7ff14;
  box-shadow: inset 3px 0 0 var(--accent);
}

/* —— 悬停卡片 —— */
.hoverCard {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--lab, var(--accent)) 60%, transparent);
  box-shadow: 0 10px 30px #0008, 0 0 24px color-mix(in srgb, var(--lab, var(--accent)) 30%, transparent);
  opacity: 0;
  transition: opacity 0.18s;
  will-change: transform;
}
.hoverCard.isOn {
  opacity: 1;
}
.hoverCard::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: var(--glass);
  border-right: 1px solid color-mix(in srgb, var(--lab, var(--accent)) 60%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--lab, var(--accent)) 60%, transparent);
  transform: translateX(-50%) rotate(45deg);
}
.hcEmoji {
  font-size: 1.9rem;
  line-height: 1;
}
.hcTitle {
  display: block;
  font-size: 0.95rem;
}
.hcHook {
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #c5cfdf;
}

/* —— 右侧：房间介绍 —— */
.roomPanel {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  width: 340px;
  max-height: calc(100% - 120px);
  overflow: auto;
  padding: 26px 24px 20px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--lab, var(--accent)) 45%, transparent);
  box-shadow: 0 20px 60px #000a, 0 0 50px color-mix(in srgb, var(--lab, var(--accent)) 18%, transparent);
  opacity: 0;
  transform: translate(36px, -50%);
  transition: opacity 0.3s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.roomPanel.isOpen {
  pointer-events: auto;
  opacity: 1;
  transform: translate(0, -50%);
}
.roomClose {
  all: unset;
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
}
.roomClose:hover,
.roomClose:focus-visible {
  color: var(--text);
  background: #ffffff14;
}
.roomEmoji {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--lab) 70%, transparent));
}
.roomWhere {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--lab);
  font-weight: 700;
}
.roomTitle {
  margin-top: 4px;
  font-size: 1.55rem;
  font-weight: 900;
}
.roomHook {
  margin-top: 10px;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 700;
}
.roomSub {
  margin-top: 6px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.roomTags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.roomTag {
  font-size: 0.72rem;
  color: #c5cfdf;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: #ffffff0d;
}
.roomLinks {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.roomLinks:empty {
  display: none;
}
.roomLinksLabel {
  width: 100%;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.roomChip {
  font-size: 0.8rem;
  text-decoration: none;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--lab) 40%, transparent);
  transition: background 0.2s, border-color 0.2s;
}
.roomChip:hover,
.roomChip:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--lab) 20%, transparent);
  border-color: var(--lab);
}
.roomEnter {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  color: #060a15;
  background: var(--lab);
  box-shadow: 0 0 28px color-mix(in srgb, var(--lab) 55%, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.roomEnter:hover,
.roomEnter:focus-visible {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 0 40px color-mix(in srgb, var(--lab) 80%, transparent);
}
.roomEnter span {
  transition: transform 0.2s;
}
.roomEnter:hover span {
  transform: translateX(4px);
}
.roomBack {
  all: unset;
  display: block;
  margin: 12px auto 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.roomBack:hover,
.roomBack:focus-visible {
  color: var(--text);
  background: #ffffff0f;
}

/* —— 操作提示 —— */
.hint {
  position: absolute;
  bottom: 26px;
  left: calc(var(--gutter) + var(--left-w) + (100% - var(--gutter) - var(--left-w)) / 2);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.82rem;
  color: #c5cfdf;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--glass-soft);
  border: 1px solid var(--line);
  animation: hintIn 0.8s 3.2s both ease-out;
  transition: opacity 0.6s;
}
.hint.isGone {
  opacity: 0;
}
body.isFocus .hint {
  opacity: 0;
}

/* —— 备案号页脚：贴在右下角最底一行，在操作提示（bottom 26px）之下，不压 3D 场景 —— */
.siteFooter {
  position: absolute;
  right: var(--gutter);
  bottom: 6px;
  font-size: 0.72rem;
  line-height: 1.4;
  text-shadow: 0 0 6px #060a15, 0 1px 10px #060a15;
}
.siteFooter .icpLink {
  pointer-events: auto;
  color: #c5cfdf;
  text-decoration: none;
}
.siteFooter .icpLink:hover,
.siteFooter .icpLink:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— 通电中 / 转场 —— */
.loader {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: #060a15;
  transition: opacity 0.6s;
}
.loader.isGone {
  opacity: 0;
  pointer-events: none;
}
.warp {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, var(--lab, var(--accent)) 38%, #060a15 100%);
  transition: opacity 0.5s ease-in;
}
.warp.isOn {
  opacity: 1;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes hintIn {
  from {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
}
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}
@keyframes wanted {
  0%,
  60% {
    background: #78e7ff24;
  }
  100% {
    background: transparent;
  }
}

/* —— 中等宽度：左右两栏收窄 —— */
@media (max-width: 1180px) {
  :root {
    --left-w: 280px;
    --gutter: 20px;
  }
  .heroTitle {
    font-size: 1.55rem;
  }
  .roomPanel {
    width: 300px;
  }
}
@media (max-height: 760px) {
  .heroSub {
    display: none;
  }
}

/* —— 卡片墙（回落 / ?view=cards）上的两处补充 —— */
.hubTo3d {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid #78e7ff44;
}
.hubTo3d:hover,
.hubTo3d:focus-visible {
  border-color: var(--accent);
}
.hubNotice {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #ffe47a40;
  background: #ffe47a0d;
  font-size: 0.9rem;
  line-height: 1.6;
}
