/* ═══════════════════════════════════════════════════════════════
   液态奶油设计语言 v2 · LAAP Mobile 社区
   来源：液态光球.txt（LiquidMetal）+ 排版卡片.txt（瀑布流）
   原则：奶油纯白 / 大圆角 / 液态玻璃 / 黑白可调 / 动效有弹性
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #f7f4ef;
  --bg-soft: #efeae2;
  --card: #ffffff;
  --ink: #17171a;
  --muted: #837f76;
  --line: rgba(23, 23, 26, 0.08);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --accent: #17171a;
  --accent-fg: #f7f4ef;
  --ph-a: rgba(23, 23, 26, 0.045);
  --ph-b: rgba(255, 255, 255, 0.85);
  --shadow: 0 8px 32px rgba(23, 23, 26, 0.07);
  --shadow-lift: 0 18px 56px rgba(23, 23, 26, 0.13);

  --r-card: 22px;
  --r-inner: 16px;
  --r-pill: 999px;

  --ease-spring: cubic-bezier(.175, .885, .32, 1.275);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "PingFang SC", "Microsoft YaHei", sans-serif;
}

[data-theme="dark"] {
  --bg: #0e0e10;
  --bg-soft: #161618;
  --card: #1a1a1d;
  --ink: #f5f3ef;
  --muted: #98948b;
  --line: rgba(255, 255, 255, 0.10);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --accent: #f5f3ef;
  --accent-fg: #17171a;
  --ph-a: rgba(255, 255, 255, 0.05);
  --ph-b: rgba(255, 255, 255, 0.14);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 18px 56px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  transition: background .4s ease, color .4s ease;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ── 浮动药丸导航 ─────────────────────────────────────────── */

.pill-nav {
  position: fixed; z-index: 50;
  top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 22px;
  padding: 10px 12px 10px 18px;
  /* 药丸宽度由内容撑开，之前没设上限：导航一多就超出视口，
     fixed + translateX 让溢出部分直接被屏幕边缘裁掉 —— 那就是「遮挡」。 */
  max-width: calc(100vw - 28px);
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: background .4s ease, box-shadow .3s var(--ease-spring), transform .3s var(--ease-spring);
}
.pill-nav:hover { box-shadow: var(--shadow-lift); }

.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: .01em; }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ffd9a8, #ff8a3d 70%);
  box-shadow: 0 0 12px rgba(255, 138, 61, .55);
}
.brand-name { font-size: 14.5px; }

/* 官方 logo：用 mask 让图形跟随 currentColor，浅色/深色主题共用一张 PNG。
   高度定，宽度按 2.93:1 比例算；mask 不会撑开元素，所以宽度必须显式给。 */
.brand-logo {
    width: 64px; height: 22px; flex: none;
    background-color: currentColor;
    -webkit-mask: url(logo-mark.png) no-repeat center / contain;
    mask: url(logo-mark.png) no-repeat center / contain;
    opacity: .92;
}

.nav-links {
  display: flex; gap: 4px;
  /* 关键三行：不换行 + 可横向滚动 + 允许收缩。
     缺了它们，flex 会把每个链接压窄到单字宽，中文就被挤成「作\n品」两行。 */
  flex-wrap: nowrap;
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 7px 15px; border-radius: var(--r-pill);
  font-size: 13.5px; color: var(--muted);
  white-space: nowrap; flex: none;
  transition: background .25s ease, color .25s ease, transform .25s var(--ease-spring);
}
.nav-link:hover { background: var(--ph-a); color: var(--ink); transform: translateY(-1px); }
.nav-link.active { color: var(--ink); background: var(--ph-a); }

/* 跨子域入口：稍淡一点，让「在本站」与「去另一个站」一眼分得清 */
.nav-link.nav-cross { color: var(--muted); opacity: .78; }
.nav-link.nav-cross:hover { opacity: 1; }

.nav-actions {
  display: flex; align-items: center; gap: 10px;
  flex: none; white-space: nowrap;
}
.login-entry { font-size: 13.5px; color: var(--muted); transition: color .2s; }
.login-entry:hover { color: var(--ink); }
.login-entry.signed { color: var(--ink); }

/* LAAPer 编号：长度不定（LAAP-2026-0007），给个上限免得把导航撑变形 */
.laap-id {
  max-width: 7.5em; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; display: inline-block; vertical-align: middle;
}

/* ── 小工具条（黑白 / 语言）───────────────────────────────── */

.tool-pill {
  position: fixed; z-index: 50;
  top: 18px; right: 22px;
  display: flex; gap: 4px; padding: 6px;
  border-radius: 14px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.tool-btn {
  min-width: 38px; height: 34px; padding: 0 10px;
  border: 0; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--muted);
  transition: background .25s, color .25s, transform .25s var(--ease-spring);
}
.tool-btn:hover { color: var(--ink); transform: translateY(-1px); }
.tool-btn.active { background: var(--accent); color: var(--accent-fg); }

/* ── 按钮 ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--r-pill);
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease-spring), box-shadow .3s ease,
              background .25s ease, border-color .25s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { transform: scale(1.04); box-shadow: var(--shadow-lift); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { background: var(--glass); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--glass-strong); border-color: var(--muted); transform: scale(1.03); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 15.5px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ── 英雄区：液态光球 ─────────────────────────────────────── */

.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 140px 20px 80px;
}

.orb-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
#orbCanvas {
  width: min(78vmin, 720px); height: min(78vmin, 720px);
  border-radius: 50%;
  filter: blur(2px) saturate(1.05);
  opacity: .95;
}
.orb-ring {
  position: absolute;
  width: min(88vmin, 820px); height: min(88vmin, 820px);
  animation: ring-spin 26s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
.ring-text {
  fill: var(--muted); opacity: .8;
  font-family: var(--font);
  font-size: 13px; font-weight: 600; letter-spacing: .34em;
}

.hero-copy {
  position: relative; z-index: 2;
  max-width: 760px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}

.badge {
  display: inline-flex; padding: 6px 16px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 12px; font-weight: 650; letter-spacing: .12em; color: var(--muted);
  animation: rise .8s var(--ease-expo) both;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 750; line-height: 1.12; letter-spacing: -.02em;
  animation: rise .8s .08s var(--ease-expo) both;
}
.hero-sub {
  max-width: 560px; font-size: clamp(15px, 2vw, 18.5px); color: var(--muted);
  animation: rise .8s .16s var(--ease-expo) both;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  animation: rise .8s .24s var(--ease-expo) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

.feature-card {
  margin-top: 26px; width: 100%; max-width: 640px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 18px; border-radius: var(--r-card);
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise .8s .32s var(--ease-expo) both;
  transition: transform .35s var(--ease-spring), box-shadow .35s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.feature { display: flex; flex-direction: column; gap: 3px; text-align: center; }
.feature-k { font-size: 14px; font-weight: 650; }
.feature-v { font-size: 12px; color: var(--muted); }

/* ── 主体 ─────────────────────────────────────────────────── */

.wrap { max-width: 1180px; margin: 0 auto; padding: 30px 22px 60px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin: 34px 0 18px;
}
.section-title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.section-note { font-size: 12.5px; color: var(--muted); }

.tabs { display: flex; gap: 6px; padding: 5px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--line); }
.tab {
  padding: 7px 18px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--muted);
  transition: background .25s, color .25s, transform .25s var(--ease-spring);
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--accent); color: var(--accent-fg); }

/* ── 作品墙：排版卡片瀑布流 ───────────────────────────────── */

.masonry { columns: 3; column-gap: 20px; }
@media (max-width: 900px) { .masonry { columns: 2; } }
@media (max-width: 600px) { .masonry { columns: 1; } }

.cover-card {
  break-inside: avoid; margin: 0 0 20px;
  padding: 10px; border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .38s var(--ease-spring), box-shadow .38s ease;
  opacity: 0; transform: translateY(22px);
}
.cover-card.in { opacity: 1; transform: none;
  transition: opacity .9s var(--ease-expo), transform .9s var(--ease-expo),
              box-shadow .38s ease; }
.cover-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: var(--shadow-lift); }

.cover-media {
  position: relative; overflow: hidden;
  border-radius: var(--r-inner);
  aspect-ratio: var(--ratio, 4 / 5);
  background: var(--bg-soft);
}
.cover-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity 1s var(--ease-expo), transform .6s var(--ease-expo);
}
.cover-media img.loaded { opacity: 1; }
.cover-card:hover .cover-media img { transform: scale(1.045); }

.cover-meta { display: flex; align-items: center; gap: 10px; padding: 11px 6px 4px; }
.cover-name {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cover-sub { font-size: 12px; color: var(--muted); padding: 0 6px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge-sm {
  flex: none; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--ph-a); color: var(--muted);
  font-size: 11px; font-weight: 650;
}

/* ── 液态玻璃占位（空位，不用彩色）────────────────────────── */

.glass-ph {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--ph-b), var(--ph-a));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.glass-ph::after {
  content: ""; position: absolute; inset: -40%;
  background: linear-gradient(115deg, transparent 38%,
              rgba(255, 255, 255, 0.5) 50%, transparent 62%);
  background-size: 220% 220%;
  animation: sheen 4.6s ease-in-out infinite;
}
[data-theme="dark"] .glass-ph::after {
  background: linear-gradient(115deg, transparent 38%,
              rgba(255, 255, 255, 0.12) 50%, transparent 62%);
  background-size: 220% 220%;
}
@keyframes sheen {
  0% { background-position: 120% 0; }
  55% { background-position: -20% 0; }
  100% { background-position: -20% 0; }
}
.glass-ph .ph-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; letter-spacing: .18em; color: var(--muted);
  z-index: 1;
}

/* ── 底部：游戏滚动卡片 ───────────────────────────────────── */

.card-rail {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x proximity;
  padding: 4px 4px 22px;
  scrollbar-width: none;
}
.card-rail::-webkit-scrollbar { display: none; }

.rail-card {
  position: relative; flex: 0 0 232px; height: 310px;
  border-radius: 24px; overflow: hidden;
  scroll-snap-align: start; cursor: pointer;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .38s var(--ease-spring), box-shadow .38s ease;
  opacity: 0; transform: translateY(18px);
}
.rail-card.in { opacity: 1; transform: none;
  transition: opacity .8s var(--ease-expo), transform .8s var(--ease-expo),
              box-shadow .38s ease; }
.rail-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

.rail-media { position: absolute; inset: 0; }
.rail-media img { width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s var(--ease-expo); }
.rail-media img.loaded { opacity: 1; }

.rail-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  color: #fff; z-index: 2;
}
.rail-name { font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-sub { font-size: 12px; opacity: .8; }

/* ── 下载入口 ─────────────────────────────────────────────── */

.dl-banner {
  display: flex; align-items: center; gap: 16px;
  margin-top: 34px; padding: 20px 24px;
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease-spring), box-shadow .35s ease;
}
.dl-banner:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.dl-orb {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--ph-b), var(--ph-a));
  border: 1px solid var(--line);
}
.dl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-title { font-size: 15.5px; font-weight: 700; }
.dl-sub { font-size: 13px; color: var(--muted); }
.dl-arrow { font-size: 18px; color: var(--muted); }

/* ── 详情页 ───────────────────────────────────────────────── */

#detail { padding-top: 20px; }
.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-head h2 { font-size: 24px; font-weight: 750; letter-spacing: -.01em; }
.back {
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--line);
  font-size: 13.5px; cursor: pointer; color: var(--ink);
  transition: transform .25s var(--ease-spring), background .25s;
}
.back:hover { transform: translateX(-2px); background: var(--glass-strong); }

.badge {
  display: inline-flex; padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--ph-a); color: var(--muted); font-size: 12px; font-weight: 650;
  border: 0;
}

.preview-phone { display: flex; justify-content: center; padding: 10px 0 26px; }
.phone-frame {
  position: relative; width: 300px; height: 620px;
  border-radius: 42px; padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; border-radius: 0 0 14px 14px;
  background: var(--ink); opacity: .85; z-index: 2;
}
.phone-frame iframe {
  width: 100%; height: 100%; border: 0;
  border-radius: 32px; background: var(--bg-soft);
}

.detail-meta {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 22px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 14px; color: var(--muted);
}
.detail-meta strong { color: var(--ink); font-weight: 650; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.empty, .error { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.error { color: var(--muted); }

footer {
  margin-top: 60px; padding-top: 26px;
  border-top: 1px solid var(--line);
  text-align: center; font-size: 12.5px; color: var(--muted);
}
footer a:hover { color: var(--ink); }

/* ── 响应式 ───────────────────────────────────────────────── */

@media (max-width: 860px) {
  .pill-nav { gap: 12px; padding: 9px 10px 9px 14px; width: calc(100% - 100px); justify-content: space-between; }
  .brand-name { display: none; }
  .tool-pill { right: 14px; }
  .feature-card { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
}

@media (max-width: 720px) {
  .pill-nav { gap: 8px; padding: 8px 10px 8px 14px; width: calc(100% - 32px); justify-content: space-between; }
  .nav-links { gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
  .nav-link { padding: 6px 12px; font-size: 12.5px; scroll-snap-align: start; white-space: nowrap; }
  .nav-actions { gap: 8px; }
  .login-entry { display: none; }
  .btn-sm { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
  .pill-nav { gap: 6px; padding: 6px 8px 6px 12px; width: calc(100% - 16px); }
  .nav-link { padding: 5px 10px; font-size: 11.5px; }
  .nav-actions .btn-sm { padding: 5px 10px; font-size: 11px; }
}

/* ── 导航滑动药丸：深色指示“你在哪个界面”（animated-tabs 招式）── */
.nav-links { position: relative; }
.nav-pill {
  position: absolute; top: 0; left: 0; z-index: 0;
  border-radius: var(--r-pill);
  background: var(--accent);
  transition: transform .45s cubic-bezier(.175,.885,.32,1.275),
              width .45s cubic-bezier(.175,.885,.32,1.275), height .3s ease;
}
.nav-link { position: relative; z-index: 1; }
.nav-link.active { color: var(--accent-fg); background: transparent; }
