/* =====================================================================
   心流实验场 · 首页（传送门轮播）
   一次展示一扇门；展示哪扇门，整个首页氛围随之渐变
   ===================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  overflow: hidden;
}

body {
  transition: background 1s ease, color 1s ease;
}

/* 两扇门两种天地：暗 = 浮光，白 = 点星 */
body[data-portal="0"] {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 92, 255, 0.14), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 217, 255, 0.10), transparent 50%),
    #06061a;
  color: rgba(255, 255, 255, 0.9);
}
body[data-portal="1"] {
  background:
    radial-gradient(ellipse at 25% 20%, rgba(28, 28, 26, 0.05), transparent 55%),
    radial-gradient(ellipse at 75% 85%, rgba(200, 57, 31, 0.05), transparent 50%),
    #f8f6f1;
  color: #1c1c1a;
}

.hub {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

/* ===== 门 ===== */
.portal {
  width: min(560px, 82vw);
  height: min(520px, 62vh);
  border-radius: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.portal:hover { transform: translateY(-4px) scale(1.01); }

.portal-in {
  text-align: center;
  animation: portalIn 0.55s ease both;
  padding: 40px;
}
@keyframes portalIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* 浮光门：深空 + 白色光字 */
.portal-float {
  background:
    radial-gradient(ellipse at 30% 25%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(ellipse at 75% 80%, rgba(0, 217, 255, 0.14), transparent 55%),
    #0b0b24;
  border: 1px solid rgba(140, 150, 255, 0.22);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(124, 92, 255, 0.15);
}
.portal-float .portal-title {
  font-weight: 200;
  font-size: 64px;
  letter-spacing: 18px;
  background: linear-gradient(135deg, #fff 0%, #7c5cff 50%, #00d9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 18px;
}
.portal-float .portal-sub { color: rgba(0, 217, 255, 0.85); font-size: 17px; letter-spacing: 3px; margin-bottom: 14px; font-family: "Consolas", monospace; }
.portal-float .portal-desc { color: rgba(220, 224, 255, 0.55); font-size: 13px; letter-spacing: 2px; line-height: 1.9; }
.portal-float .portal-enter { color: rgba(220, 224, 255, 0.4); font-size: 12px; letter-spacing: 3px; margin-top: 34px; }
.portal-float:hover { box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55), 0 0 90px rgba(124, 92, 255, 0.3); }

/* 点星门：宣纸 + 墨字 + 朱砂印 */
.portal-echo {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(200, 57, 31, 0.06), transparent 55%),
    radial-gradient(ellipse at 20% 85%, rgba(46, 74, 122, 0.06), transparent 55%),
    #fcfbf7;
  border: 1px solid rgba(28, 28, 26, 0.14);
  box-shadow: 0 24px 70px rgba(28, 28, 26, 0.14);
}
.portal-echo .portal-title {
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-weight: 300;
  font-size: 64px;
  letter-spacing: 18px;
  color: #1c1c1a;
  margin-bottom: 18px;
}
.portal-echo .portal-sub { color: #c8391f; font-size: 16px; letter-spacing: 6px; margin-bottom: 14px; font-family: "Source Han Serif SC", "Noto Serif SC", serif; }
.portal-echo .portal-desc { color: rgba(28, 28, 26, 0.5); font-size: 13px; letter-spacing: 2px; line-height: 1.9; }
.portal-echo .portal-enter { color: rgba(28, 28, 26, 0.38); font-size: 12px; letter-spacing: 3px; margin-top: 34px; }
.portal-echo:hover { box-shadow: 0 28px 80px rgba(28, 28, 26, 0.2); }

/* ===== 序号点与提示 ===== */
.portal-dots { display: flex; gap: 10px; }
.portal-dots .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.2;
  transition: all 0.4s;
}
.portal-dots .dot.on { opacity: 0.85; transform: scale(1.25); }

.hub-hint {
  font-size: 12px;
  letter-spacing: 3px;
  opacity: 0.4;
}

/* ===== 边缘切换按钮 ===== */
.edge-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.35;
  transition: all 0.3s;
  z-index: 10;
  font-family: inherit;
}
.edge-btn:hover { opacity: 0.9; transform: translateY(-50%) scale(1.08); }
.edge-left  { left: 28px; }
.edge-right { right: 28px; }

@media (max-width: 640px) {
  .portal-float .portal-title,
  .portal-echo .portal-title { font-size: 44px; letter-spacing: 10px; }
  .edge-left { left: 12px; }
  .edge-right { right: 12px; }
}
