:root {
  --bg-dark: #05030c;
  --bg-deep: #090415;

  --white: #ffffff;
  --text-main: rgba(255, 255, 255, 0.96);
  --text-soft: rgba(242, 240, 255, 0.76);
  --text-dim: rgba(242, 240, 255, 0.56);

  --purple: #9b6bff;
  --violet: #7d5cff;
  --blue: #42c8ff;
  --cyan: #6ee7ff;
  --gold: #ffe6a6;
  --pink: #f1b6ff;

  --glass-bg: rgba(12, 10, 28, 0.42);
  --glass-bg-strong: rgba(12, 10, 28, 0.68);
  --glass-border: rgba(255, 255, 255, 0.16);

  --shadow-heavy: 0 20px 70px rgba(0, 0, 0, 0.46);
  --shadow-glow: 0 0 24px rgba(155, 107, 255, 0.38),
    0 0 56px rgba(66, 200, 255, 0.18);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

body {
  overflow-x: hidden;
}

button {
  font: inherit;
  cursor: pointer;
}

.home-screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg-dark);
}

/* 背景图 */
.home-bg {
  position: absolute;
  inset: 0;
  background-image: url("cover.PNG");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  filter: saturate(1.12) contrast(1.08) brightness(0.86);
}

/* 背景暗层，让文字更清楚 */
.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(155, 107, 255, 0.16), transparent 30%),
    radial-gradient(circle at 74% 58%, rgba(66, 200, 255, 0.12), transparent 28%),
    radial-gradient(circle at 20% 70%, rgba(241, 182, 255, 0.1), transparent 26%),
    linear-gradient(
      to bottom,
      rgba(3, 2, 10, 0.14) 0%,
      rgba(3, 2, 10, 0.34) 38%,
      rgba(3, 2, 10, 0.74) 100%
    );
}

/* 漂浮光雾 */
.aurora {
  position: absolute;
  border-radius: 999px;
  filter: blur(62px);
  opacity: 0.62;
  pointer-events: none;
}

.aurora-a {
  width: 240px;
  height: 240px;
  top: 12%;
  left: -70px;
  background: rgba(155, 107, 255, 0.38);
  animation: auroraMoveA 8s ease-in-out infinite alternate;
}

.aurora-b {
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: 13%;
  background: rgba(66, 200, 255, 0.26);
  animation: auroraMoveB 9s ease-in-out infinite alternate;
}

@keyframes auroraMoveA {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(28px, -24px, 0) scale(1.12);
  }
}

@keyframes auroraMoveB {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-26px, 20px, 0) scale(1.08);
  }
}

/* 顶部栏 */
.topbar {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: calc(18px + env(safe-area-inset-top)) 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* 左上角符号 Logo，不需要图片 */
.logo-wrap {
  width: 66px;
  height: 66px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--gold);
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.18), transparent 34%),
    rgba(8, 9, 22, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(155, 107, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.text-logo span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 30px;
  color: var(--gold);
  text-shadow:
    0 0 10px rgba(255, 230, 166, 0.86),
    0 0 24px rgba(155, 107, 255, 0.58),
    0 0 42px rgba(66, 200, 255, 0.28);
  animation: logoPulse 3.2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.92;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.top-actions {
  position: relative;
}

/* 右上菜单按钮 */
.icon-btn {
  width: 62px;
  height: 62px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 25px;
  line-height: 1;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.13), transparent 35%),
    rgba(9, 10, 24, 0.42);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 菜单面板 */
.menu-panel {
  position: absolute;
  top: 74px;
  right: 0;
  width: 178px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;

  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)),
    rgba(12, 10, 28, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  box-shadow:
    0 18px 56px rgba(0, 0, 0, 0.42),
    0 0 30px rgba(155, 107, 255, 0.16);

  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.menu-panel.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.menu-panel button,
.menu-panel .menu-link {
  width: 100%;
  border: 0;
  border-radius: 17px;
  padding: 12px 14px;
  display: block;
  text-align: left;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-panel button:active,
.menu-panel .menu-link:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.13);
}

.menu-panel .danger {
  color: #ffb7c5;
}

/* 首页主体 */
.hero-area {
  position: relative;
  z-index: 5;
}

.hero-area.no-card-home {
  min-height: calc(100svh - 104px);
  padding: 20px 22px calc(120px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 中央标题区，无卡片 */
.home-title-block {
  width: min(100%, 620px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(-4px);
}

/* 英文 + 中文一起消失再出现 */
.title-cycle {
  animation: titleVanishCycle 8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes titleVanishCycle {
  0%,
  56% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  66%,
  78% {
    opacity: 0;
    transform: translateY(-12px) scale(0.985);
    filter: blur(10px);
  }

  90%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* fancy 英文 */
.card-english {
  margin: 0 0 12px;
  font-family: "Allura", cursive;
  font-size: clamp(2.7rem, 11.5vw, 5.4rem);
  line-height: 0.85;
  font-weight: 400;
  color: #fff2ff;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.42),
    0 0 26px rgba(241, 182, 255, 0.54),
    0 0 54px rgba(66, 200, 255, 0.22);
}

/* Long Cang 中文标题 */
.home-title-block h1 {
  margin: 0;
  font-family: "Long Cang", cursive;
  font-size: clamp(4.3rem, 17.5vw, 8.6rem);
  line-height: 0.88;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.52),
    0 0 26px rgba(201, 167, 255, 0.46),
    0 0 58px rgba(66, 200, 255, 0.26);
}

/* 进入世界按钮 */
.enter-btn {
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  width: min(100%, 430px);
  min-height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 16px 18px 16px 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(132, 92, 255, 0.94), rgba(99, 134, 255, 0.9), rgba(58, 202, 255, 0.88));
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  box-shadow:
    0 0 24px rgba(155, 107, 255, 0.42),
    0 0 52px rgba(66, 200, 255, 0.2),
    0 16px 38px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  animation: buttonBreath 3s ease-in-out infinite;
}

.enter-btn span {
  position: relative;
  z-index: 2;
  font-size: clamp(1.16rem, 4.4vw, 1.4rem);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.enter-btn i {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;

  font-style: normal;
  font-size: 27px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.14),
    inset 0 1px 10px rgba(255, 255, 255, 0.16);
}

/* 按钮扫光 */
.enter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -34%;
  width: 28%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );
  transform: skewX(-20deg);
  animation: buttonSweep 3.8s linear infinite;
}

@keyframes buttonSweep {
  0% {
    left: -34%;
  }

  100% {
    left: 125%;
  }
}

@keyframes buttonBreath {
  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
    box-shadow:
      0 0 20px rgba(155, 107, 255, 0.36),
      0 0 46px rgba(66, 200, 255, 0.17),
      0 16px 38px rgba(0, 0, 0, 0.32);
  }

  50% {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow:
      0 0 34px rgba(155, 107, 255, 0.58),
      0 0 70px rgba(66, 200, 255, 0.26),
      0 20px 44px rgba(0, 0, 0, 0.38);
  }
}

/* 金色小字 */
.subtitle.gold-subtitle {
  margin: 28px auto 0;
  max-width: 430px;
  font-family: "Long Cang", cursive;
  font-size: clamp(1.75rem, 6.4vw, 3rem);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-shadow:
    0 0 8px rgba(255, 230, 166, 0.48),
    0 0 22px rgba(255, 200, 95, 0.3),
    0 0 38px rgba(155, 107, 255, 0.18);
}



/* 旧结构兼容：如果 HTML 里还有旧卡片，隐藏掉 */
.glass-card,
.description,
.mini-tags {
  display: none;
}

/* 小屏幕优化 */
@media (max-width: 640px) {
  .topbar {
    padding: calc(16px + env(safe-area-inset-top)) 18px 0;
  }

  .logo-wrap {
    width: 64px;
    height: 64px;
    border-radius: 22px;
  }

  .text-logo span {
    font-size: 28px;
  }

  .icon-btn {
    width: 60px;
    height: 60px;
    border-radius: 23px;
  }

  .hero-area.no-card-home {
    min-height: calc(100svh - 98px);
    padding: 16px 20px calc(112px + env(safe-area-inset-bottom));
    align-items: center;
  }

  .home-title-block {
    transform: translateY(10px);
  }

  .card-english {
    font-size: clamp(2.55rem, 13vw, 4.7rem);
    margin-bottom: 10px;
  }

  .home-title-block h1 {
    font-size: clamp(4.15rem, 18vw, 7.6rem);
  }

  .enter-btn {
    width: min(100%, 430px);
    margin-top: 32px;
    min-height: 66px;
  }

  .subtitle.gold-subtitle {
    max-width: 360px;
    font-size: clamp(1.72rem, 7.2vw, 2.7rem);
  }
}

/* 更矮的手机屏幕 */
@media (max-height: 700px) {
  .home-title-block {
    transform: translateY(-4px);
  }

  .card-english {
    font-size: clamp(2.2rem, 10vw, 4rem);
  }

  .home-title-block h1 {
    font-size: clamp(3.65rem, 15vw, 6.5rem);
  }

  .enter-btn {
    margin-top: 24px;
  }

  .subtitle.gold-subtitle {
    margin-top: 22px;
  }
}
/* ===== Modal / Function Panel ===== */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 2, 10, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-layer.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(100%, 430px);
  max-height: 82svh;
  overflow-y: auto;
  border-radius: 30px;
  padding: 24px;
  position: relative;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(12, 10, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.52),
    0 0 36px rgba(155, 107, 255, 0.2);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.modal-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 230, 166, 0.82);
}

.modal-card h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.modal-option,
.modal-action {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  margin-top: 10px;
  text-align: left;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
}

.modal-option.active {
  background: linear-gradient(90deg, rgba(155, 107, 255, 0.75), rgba(66, 200, 255, 0.5));
  box-shadow: 0 0 18px rgba(155, 107, 255, 0.22);
}

.modal-textarea {
  width: 100%;
  min-height: 130px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 14px;
  color: #fff;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.modal-note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.6;
}

.modal-danger {
  color: #ffb7c5;
}

.modal-action.primary {
  text-align: center;
  background: linear-gradient(90deg, rgba(155, 107, 255, 0.9), rgba(66, 200, 255, 0.72));
}

.modal-action.danger {
  text-align: center;
  background: rgba(255, 92, 125, 0.22);
  color: #ffb7c5;
}
.enter-btn {
  text-decoration: none;
}
