/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --ink: #eef1ff;
  --ink-dim: rgba(238,241,255,.52);
  --line: rgba(255,255,255,.08);
}
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: #030014;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ 星云背景（多层流动光斑） ============ */
.nebula {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.nebula i {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .5;
  will-change: transform;
}
.nebula i:nth-child(1) {
  width: 46vw; height: 46vw; left: -8vw; top: -10vw;
  background: radial-gradient(circle, rgba(124,58,237,.5), transparent 65%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.nebula i:nth-child(2) {
  width: 40vw; height: 40vw; right: -6vw; top: 6vh;
  background: radial-gradient(circle, rgba(34,211,238,.4), transparent 65%);
  animation: drift2 26s ease-in-out infinite alternate;
}
.nebula i:nth-child(3) {
  width: 50vw; height: 50vw; left: 22vw; bottom: -18vw;
  background: radial-gradient(circle, rgba(244,114,182,.34), transparent 65%);
  animation: drift3 30s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(10vw, 8vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-8vw, 12vh) scale(1.2); } }
@keyframes drift3 { to { transform: translate(-6vw, -10vh) scale(.9); } }

/* 星空粒子 */
#bg { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

/* ============ 标题区（紧凑单行） ============ */
.hero {
  position: relative; z-index: 2;
  text-align: center;
  padding: 64px 20px 36px;
  opacity: 0;
  animation: heroIn 1.1s cubic-bezier(.22,1,.36,1) .1s forwards;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(40px) scale(.96); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.hero-title {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(48px, 8.5vw, 88px);
  font-weight: 900;
  letter-spacing: .12em; text-indent: .12em; line-height: 1.1;
  /* 赛博霓虹：青→蓝→紫 */
  background: linear-gradient(120deg, #a5f3fc 0%, #38bdf8 30%, #818cf8 55%, #c084fc 80%, #a5f3fc 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: titleFlow 5s linear infinite;
  filter:
    drop-shadow(0 0 8px rgba(56,189,248,.55))
    drop-shadow(0 0 30px rgba(129,140,248,.4))
    drop-shadow(0 0 60px rgba(192,132,252,.3));
  position: relative;
}
/* 扫描线 */
.hero-title::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 0; bottom: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 3px,
    rgba(255,255,255,.05) 3px 4px
  );
  pointer-events: none;
}
/* 底部光刃 */
.hero-title::after {
  content: ""; position: absolute;
  left: 20%; right: 20%; bottom: -4px; height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #c084fc, transparent);
  box-shadow: 0 0 16px rgba(56,189,248,.8);
}
@keyframes titleFlow {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}
.hero-line {
  margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap;
}
.hero-sub {
  font-family: "Orbitron", "Rajdhani", monospace;
  font-size: 13px; letter-spacing: .34em; text-indent: .34em;
  color: rgba(165,243,252,.9);
  text-shadow: 0 0 10px rgba(56,189,248,.5);
}
.hero-sub::before, .hero-sub::after {
  content: "◆"; font-size: 8px; vertical-align: middle;
  color: rgba(56,189,248,.7);
  margin: 0 12px;
}
.hero-count {
  font-family: "Orbitron", monospace;
  font-size: 11px; letter-spacing: .14em;
  color: #7dd3fc;
  border: 1px solid rgba(56,189,248,.35);
  background: rgba(56,189,248,.08);
  padding: 6px 16px; border-radius: 999px;
  box-shadow: inset 0 0 12px rgba(56,189,248,.12), 0 0 16px rgba(56,189,248,.15);
}
.hero-count b { font-weight: 800; }

/* ============ 浮岛卡片 ============ */
.grid {
  position: relative; z-index: 2;
  max-width: 1060px; margin: 0 auto 40px;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  perspective: 1200px;
}

.island {
  --rx: 0deg; --ry: 0deg;
  position: relative;
  margin-top: var(--lift, 0px);           /* 奇偶交错下沉 */
  transform: translateY(70px) rotateX(14deg) scale(.94);
  opacity: 0;
  transition:
    transform .7s cubic-bezier(.22,1,.36,1),
    opacity .7s cubic-bezier(.22,1,.36,1);
  will-change: transform;
  border-radius: 30px;
  cursor: default;
}
.island.in { transform: translateY(var(--lift,0)) rotateX(0) scale(1); opacity: 1; }
.island:hover { transform: translateY(calc(var(--lift, 0px) - 6px)) rotateX(var(--rx)) rotateY(var(--ry)) scale(1.02); }

/* 卡片本体：玻璃 + 专属主题色 */
.island::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 30px;
  pointer-events: none;
}
.island::after {
  inset: 0;
  background:
    radial-gradient(400px 180px at var(--mx,50%) var(--my,20%), color-mix(in srgb, var(--ac) 22%, transparent), transparent 60%),
    linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.015));
  border: 1px solid color-mix(in srgb, var(--ac) 32%, transparent);
  box-shadow:
    0 24px 60px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.1),
    0 0 0 1px rgba(255,255,255,.02);
}
/* 顶部彩色光条 */
.island::before {
  content: ""; position: absolute;
  left: 12%; right: 12%; top: -1px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--ac), var(--ac2), transparent);
  opacity: .9;
  box-shadow: 0 0 18px var(--ac);
  z-index: 1;
}

.island-icon {
  position: relative; z-index: 1;
  width: 76px; height: 76px; margin: 26px 26px 0;
  border-radius: 20px;
  background: rgba(255,255,255,.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 0 0 1px rgba(255,255,255,.06),
    0 0 34px color-mix(in srgb, var(--ac) 45%, transparent);
  overflow: hidden;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.island:hover .island-icon { transform: scale(1.1) rotate(-4deg); }
.island-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.island-body { position: relative; z-index: 1; padding: 18px 26px 4px; }
.island-name { font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.island-cat {
  display: inline-block; margin-top: 6px;
  font-size: 11px; letter-spacing: .18em;
  color: var(--ac); font-weight: 700;
}
.island-desc { margin-top: 10px; color: var(--ink-dim); font-size: 13.5px; line-height: 1.6; min-height: 42px; }
.island-foot {
  position: relative; z-index: 1;
  margin-top: 16px; padding: 14px 26px 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.island-size { font-size: 12px; color: var(--ink-dim); letter-spacing: .05em; }
.island-go {
  font-size: 13px; font-weight: 700; letter-spacing: .1em;
  color: #04121a;
  background: linear-gradient(135deg, var(--ac), var(--ac2));
  padding: 9px 22px; border-radius: 999px;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ac) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .3s;
  cursor: default;
}
.island:hover .island-go { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 28px color-mix(in srgb, var(--ac) 55%, transparent), inset 0 1px 0 rgba(255,255,255,.4); }

/* ============ 全屏详情页 ============ */
.detail {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0;
  transition: opacity .4s, visibility .4s;
}
.detail.show { visibility: visible; opacity: 1; }
.detail-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 50% 20%, color-mix(in srgb, var(--ac) 26%, transparent), transparent 70%),
    radial-gradient(60% 50% at 80% 90%, color-mix(in srgb, var(--ac2) 20%, transparent), transparent 70%),
    rgba(3,0,20,.88);
  backdrop-filter: blur(20px);
}
.detail-close {
  position: absolute; top: 22px; right: 22px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--ink); font-size: 17px; cursor: pointer;
  transition: transform .3s, background .3s;
}
.detail-close:hover { transform: rotate(90deg) scale(1.08); background: rgba(255,255,255,.14); }

.detail-inner {
  position: relative; z-index: 1;
  text-align: center;
  padding: 40px 24px;
  transform: translateY(30px) scale(.94);
  opacity: 0;
  transition: transform .55s cubic-bezier(.22,1,.36,1), opacity .5s;
}
.detail.show .detail-inner { transform: none; opacity: 1; }
.detail-icon-wrap {
  width: 128px; height: 128px; margin: 0 auto 28px;
  border-radius: 32px; overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    0 0 0 1px rgba(255,255,255,.08),
    0 24px 70px color-mix(in srgb, var(--ac) 55%, transparent);
  animation: iconFloat 3.4s ease-in-out infinite;
}
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
.detail-icon-wrap img { width: 100%; height: 100%; object-fit: cover; }
.detail-inner h2 { font-size: 36px; font-weight: 900; letter-spacing: .01em; }
.detail-cat { margin-top: 10px; color: var(--ac); font-size: 13px; letter-spacing: .3em; font-weight: 700; }
.detail-desc { margin: 18px auto 0; max-width: 420px; color: var(--ink-dim); font-size: 15px; line-height: 1.8; }
.detail-size { margin-top: 14px; font-size: 12px; color: rgba(238,241,255,.4); letter-spacing: .1em; }
.detail-btn {
  margin-top: 32px;
  border: none; cursor: pointer; font-family: inherit;
  font-size: 16px; font-weight: 800; letter-spacing: .12em;
  color: #04121a;
  background: linear-gradient(135deg, var(--ac), var(--ac2));
  padding: 16px 56px; border-radius: 999px;
  box-shadow: 0 14px 44px color-mix(in srgb, var(--ac) 50%, transparent), inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .3s, opacity .3s;
}
.detail-btn:hover:not(:disabled) { transform: translateY(-3px) scale(1.03); }
.detail-btn:active { transform: scale(.95); }
.detail-btn:disabled { opacity: .65; cursor: default; }
.detail-btn.done { color: var(--ink); background: rgba(255,255,255,.12); box-shadow: none; }

/* ============ 密码弹窗 ============ */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,0,20,.72);
  backdrop-filter: blur(16px);
  opacity: 1; transition: opacity .3s;
}
.modal.hidden { opacity: 0; pointer-events: none; }
.modal-card {
  width: min(340px, 88vw);
  text-align: center;
  background: linear-gradient(170deg, rgba(28,24,58,.96), rgba(12,10,32,.98));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 26px; padding: 36px 28px 26px;
  box-shadow: 0 30px 90px rgba(0,0,0,.65), 0 0 60px rgba(124,58,237,.15);
  transform: translateY(0) scale(1); transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.modal.hidden .modal-card { transform: translateY(24px) scale(.95); }
.modal-card.slim {
  width: min(320px, 86vw);
  padding: 8px;
  border-radius: 999px;
  background: rgba(14,12,34,.92);
  border: 1px solid rgba(167,139,250,.32);
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(124,58,237,.22);
  text-align: center;
}
.pwd-row {
  display: flex; align-items: center; gap: 6px;
}
.pwd-row input {
  flex: 1; min-width: 0;
  padding: 11px 6px 11px 18px;
  border: none; outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 15px; text-align: center; letter-spacing: 3px;
  font-family: inherit;
  caret-color: #a78bfa;
}
.pwd-row input::placeholder { letter-spacing: 1px; color: rgba(238,241,255,.4); }
.pwd-row input:focus { box-shadow: none; }
.pwd-ok {
  flex-shrink: 0;
  border: none; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 700; letter-spacing: .08em;
  color: #04121a;
  background: linear-gradient(135deg, #67e8f9, #a78bfa);
  padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(124,58,237,.35);
  transition: transform .2s, opacity .3s;
}
.pwd-ok:active { transform: scale(.94); }
.pwd-ok:disabled { opacity: .5; cursor: default; }
.modal-card.slim .pwd-err {
  min-height: 0; margin: 0 0 2px;
  font-size: 12px; color: #ff8a8a;
}
.modal-card.slim .pwd-err:empty { display: none; }

/* ============ 页脚 ============ */
.footer {
  position: relative; z-index: 2;
  text-align: center; padding: 50px 20px 46px;
  color: rgba(238,241,255,.28); font-size: 12px; letter-spacing: .12em;
}
.admin-link {
  display: inline-block; margin-top: 12px;
  font-size: 11px; letter-spacing: .2em;
  color: rgba(238,241,255,.22);
  text-decoration: none;
  padding: 4px 14px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 999px;
  transition: color .3s, border-color .3s;
}
.admin-link:hover { color: rgba(238,241,255,.6); border-color: rgba(255,255,255,.18); }

/* ============ 响应式 ============ */
@media (max-width: 640px) {
  .hero { padding: 48px 16px 28px; }
  .grid { grid-template-columns: 1fr; padding: 0 16px 40px; gap: 22px; }
  .island { --lift: 0px !important; }
  .detail-inner h2 { font-size: 28px; }
}

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
