/* 月光宝盒 MoonBox · 深空月光主题 */
:root {
  --bg: #070b16;
  --bg2: #0b1224;
  --ink: #e9edf6;
  --dim: #93a0bb;
  --gold: #f2d491;
  --gold-deep: #d8a94e;
  --tier-legend: #f5d78e;
  --tier-epic: #c9a0ff;
  --tier-grace: #7ee0d0;
  --tier-modern: #8ab8ff;
  --radius: 18px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: radial-gradient(1200px 800px at 70% -10%, #14204a 0%, var(--bg2) 40%, var(--bg) 100%);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; }

/* 星空 */
.stars, .stars-far {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff9 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 12%, #fff8 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 32% 68%, #ffe9b05c 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 88% 72%, #fff7 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 55% 42%, #fff6 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 8% 84%, #cfe2ff7e 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 64% 88%, #fff5 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
.stars-far { opacity: .5; transform: scale(1.4); animation-delay: -3s; }
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

main { position: relative; z-index: 1; }

/* 首屏 */
.hero {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 24px 20px 48px;
}
.moonbox { position: relative; width: 168px; height: 168px; }
.moon-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #f2d49166;
  border-top-color: var(--gold); border-right-color: #f2d49122;
  animation: spin 7s linear infinite;
  box-shadow: 0 0 34px #f2d4912e, inset 0 0 26px #f2d4911f;
}
.moon-core {
  position: absolute; inset: 26px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fdf3d8, #e5bd6c 58%, #9c7433);
  display: grid; place-items: center;
  box-shadow: 0 0 44px #f2d49155, inset 0 -8px 18px #00000033;
  animation: breathe 3.6s ease-in-out infinite;
}
.moon-glyph {
  font-size: 44px; font-weight: 700; color: #5d4513;
  text-shadow: 0 1px 0 #fffc, 0 -1px 2px #00000030;
}
.moon-glow {
  position: absolute; inset: -18px; border-radius: 50%;
  background: radial-gradient(circle, #f2d49126 0%, transparent 62%);
  animation: breathe 3.6s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }

.title {
  font-size: clamp(30px, 7vw, 44px); letter-spacing: .18em; font-weight: 700;
  background: linear-gradient(180deg, #fdf6e3, var(--gold) 60%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px #f2d49126;
}
.tagline { color: var(--dim); font-size: 15px; letter-spacing: .04em; }
.hint { color: #6d7a96; font-size: 12px; }

.btn-open {
  margin-top: 18px; padding: 15px 52px; font-size: 17px; letter-spacing: .3em; text-indent: .3em;
  color: #3d2e0b; font-weight: 700; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #f9e3ab, var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 6px 26px #d8a94e4d, inset 0 1px 0 #fff8;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-open:hover { transform: translateY(-2px); box-shadow: 0 10px 34px #d8a94e66, inset 0 1px 0 #fff8; }
.btn-open:active { transform: translateY(0) scale(.97); }

.hero-foot { margin-top: 26px; display: flex; align-items: center; gap: 10px; }
.top-bar {
  position: fixed; top: 14px; right: 16px; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  background: #0a112299; border: 1px solid #ffffff14; border-radius: 999px;
  padding: 4px 14px; backdrop-filter: blur(8px);
}
.link-btn {
  background: none; border: 0; color: var(--dim); font-size: 14px; cursor: pointer;
  padding: 6px 4px; letter-spacing: .04em;
}
.link-btn:hover { color: var(--ink); }
.link-btn.gold { color: var(--gold); font-weight: 600; }
.dot { color: #4a5570; }

/* 抽取动画层 */
.draw-layer {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px;
  background: rgba(5, 8, 18, .88); backdrop-filter: blur(6px);
}
.draw-burst {
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, #fdf3d8 0%, var(--gold) 30%, transparent 70%);
  animation: burst 1.4s ease-out infinite;
}
@keyframes burst {
  0% { transform: scale(.35); opacity: .9; }
  100% { transform: scale(2.4); opacity: 0; }
}
.draw-flash {
  font-size: clamp(22px, 6vw, 34px); font-weight: 700; letter-spacing: .06em;
  color: var(--gold); min-height: 1.4em; text-shadow: 0 0 22px #f2d49155;
}
.draw-tip { color: var(--dim); font-size: 13px; letter-spacing: .2em; }

/* 时空卡 */
.card { min-height: 100dvh; display: grid; place-items: center; padding: 28px 18px 46px; }
.card-inner {
  width: min(560px, 100%); text-align: center; position: relative;
  padding: 40px 26px 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, #101a33e8, #0a1122f2);
  border: 1px solid var(--tier, var(--gold));
  box-shadow: 0 0 0 1px #ffffff08, 0 0 44px color-mix(in srgb, var(--tier, #f2d491) 18%, transparent), 0 24px 60px #00000080;
  animation: cardIn .5s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes cardIn {
  from { transform: translateY(26px) scale(.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.card-tier { font-size: 12px; letter-spacing: .5em; text-indent: .5em; color: var(--tier); margin-bottom: 14px; }
.card-symbol {
  font-size: 64px; line-height: 1; margin-bottom: 12px;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--tier) 55%, transparent));
}
.card-name { font-size: clamp(22px, 5.6vw, 30px); letter-spacing: .04em; margin-bottom: 6px; }
.card-meta { color: var(--tier); font-size: 14px; letter-spacing: .12em; margin-bottom: 18px; }
.card-desc {
  color: #c6cfe2; font-size: 15.5px; line-height: 1.95; text-align: justify; text-align-last: center;
  margin-bottom: 26px; padding: 0 4px;
}
.card-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.card-actions.sub { margin-top: 16px; }
.btn {
  padding: 11px 26px; border-radius: 12px; font-size: 14.5px; cursor: pointer;
  border: 1px solid #ffffff1f; background: #ffffff0d; color: var(--ink);
  transition: transform .15s ease, background .15s ease; letter-spacing: .04em;
}
.btn:hover { background: #ffffff17; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(180deg, #f9e3ab, var(--gold) 50%, var(--gold-deep));
  color: #3d2e0b; font-weight: 700; border: 0;
  box-shadow: 0 4px 18px #d8a94e3d;
}

/* 足迹抽屉 & 弹窗 */
.mask { position: fixed; inset: 0; z-index: 50; background: #04071199; backdrop-filter: blur(3px); }
.trail {
  position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(620px, 92vw); max-height: 82dvh; overflow: auto;
  background: #0d1528f5; border: 1px solid #ffffff1c; border-radius: var(--radius);
  padding: 26px 22px; text-align: center;
}
.trail h3, .modal h3 { font-size: 18px; letter-spacing: .1em; margin-bottom: 10px; }
.trail-sub { color: var(--dim); font-size: 13px; margin-bottom: 18px; }
.trail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 20px; }
.trail-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border-radius: 12px; background: #ffffff08; border: 1px solid #ffffff10;
  color: var(--ink); font-size: 12px;
}
.trail-cell .sym { font-size: 26px; }
.trail-cell i { font-style: normal; color: var(--dim); font-size: 11px; }
.trail-empty { color: var(--dim); font-size: 14px; padding: 26px 0; }

.modal {
  position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(480px, 92vw); text-align: center;
  background: #0d1528f5; border: 1px solid #f2d4914d; border-radius: var(--radius);
  padding: 28px 24px; box-shadow: 0 0 50px #f2d4911a;
}
.modal-text { color: #c6cfe2; font-size: 14.5px; line-height: 1.9; margin-bottom: 18px; text-align: justify; text-align-last: center; }
.wait-form { display: flex; gap: 10px; margin-bottom: 12px; }
.wait-form input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; font-size: 14px;
  border: 1px solid #ffffff24; background: #0a1122; color: var(--ink); outline: none;
}
.wait-form input:focus { border-color: var(--gold); }
.modal-count { color: var(--gold); font-size: 13px; margin-bottom: 14px; min-height: 1.2em; }

.foot { position: relative; z-index: 1; text-align: center; padding: 18px; color: #5d6986; font-size: 12px; }

/* 落地页 */
.landing { background: radial-gradient(1100px 700px at 50% -12%, hsl(var(--hue) 45% 16%) 0%, var(--bg2) 45%, var(--bg) 100%); min-height: 100dvh; }
.landing-main { max-width: 720px; margin: 0 auto; padding: 40px 20px 60px; text-align: center; }
.crumbs { text-align: left; font-size: 13px; margin-bottom: 34px; color: var(--dim); }
.crumbs a { color: var(--gold); }
.space-symbol { font-size: 58px; margin-bottom: 6px; filter: drop-shadow(0 0 16px var(--tier-color)); }
.space-tier { font-size: 12px; letter-spacing: .4em; text-indent: .4em; margin-bottom: 10px; }
.landing h1 { font-size: clamp(24px, 6vw, 34px); margin-bottom: 8px; }
.space-meta { color: var(--tier-color); letter-spacing: .1em; margin-bottom: 26px; font-size: 15px; }
.space-desc { color: #ccd5e8; line-height: 2.05; font-size: 16px; text-align: justify; text-align-last: center; }
.space-desc.en { color: #8a97b4; font-size: 13.5px; margin-top: 14px; font-style: italic; }
.landing-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 32px 0 44px; }
.rel-h { font-size: 15px; color: var(--dim); font-weight: 400; letter-spacing: .14em; margin-bottom: 16px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 40px; text-align: left; }
.faq { border: 1px solid #ffffff14; border-radius: 12px; background: #ffffff07; padding: 12px 16px; }
.faq summary { cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 500; list-style-position: inside; }
.faq summary:hover { color: var(--gold); }
.faq p { color: #b9c3d9; font-size: 13.5px; line-height: 1.8; margin-top: 10px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rel {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: #ffffff07; border: 1px solid #ffffff12; color: var(--ink); font-size: 13.5px;
  transition: background .15s ease, transform .15s ease;
}
.rel:hover { background: #ffffff12; transform: translateY(-1px); }
.rel-sym { font-size: 22px; }
.rel-t { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.rel-t i { font-style: normal; color: var(--dim); font-size: 11.5px; }

@media (max-width: 420px) {
  .card-desc, .modal-text { text-align: left; text-align-last: auto; }
  .wait-form { flex-direction: column; }
}
