* { box-sizing: border-box; }

:root {
  --bg-1: #f4f8ff;
  --bg-2: #fdf3f8;
  --ink: #22305c;
  --muted: #6b7aa4;
  --line: rgba(84, 106, 173, 0.14);
  --card: #ffffff;
  --pink: #ff7ba9;
  --yellow: #ffc24b;
  --purple: #8b7cf6;
  --green: #4fc47f;
  --blue: #6fb6ff;
  --radius: 20px;
  --shadow: 0 12px 32px rgba(64, 84, 150, 0.12);
  --shadow-hover: 0 22px 48px rgba(64, 84, 150, 0.2);
}

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1100px 620px at -4% -8%, #dcebff 0%, transparent 58%),
    radial-gradient(860px 520px at 104% 2%, #ffe3ef 0%, transparent 55%),
    radial-gradient(700px 480px at 50% 118%, #e8e2ff 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  color: var(--ink);
}

/* ─── 顶栏 ─────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 14px clamp(14px, 2.5vw, 32px) 0;
}

.topbar .site-title {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--ink);
}

.topbar .logo-dot {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(255, 124, 169, 0.4));
}

/* ─── Hero 主视觉 ───────────────────── */
.wall {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: clamp(12px, 2vw, 28px);
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 6px;
  padding: clamp(24px, 4vw, 52px) clamp(22px, 4vw, 56px);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(120deg, #ffffff 0%, #fff7fb 48%, #f4f0ff 100%);
  box-shadow: var(--shadow);
}

.hero-text { position: relative; z-index: 2; max-width: 640px; }

.hero-title {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--ink);
}

.hero-accent {
  background: linear-gradient(92deg, var(--pink) 10%, var(--yellow) 55%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 2px;
}

.hero-sub {
  margin: 14px 0 0;
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.8;
  color: var(--muted);
}

.stats {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  margin-top: 24px;
  padding: 14px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(64, 84, 150, 0.1);
}

.stat { display: inline-flex; align-items: baseline; gap: 6px; }

.stat-num {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(120deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }

.stat-divider { width: 1px; height: 22px; background: var(--line); }

/* ─── 客户端下载区 ───────────────────── */
.downloads { margin-top: 22px; }

.downloads-title {
  display: block;
  margin-bottom: 11px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--muted);
}

.download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dl-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px 8px 9px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(64, 84, 150, 0.1);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(64, 84, 150, 0.18);
  border-color: rgba(139, 124, 246, 0.38);
}

.dl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 17px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 4px 10px rgba(64, 84, 150, 0.14);
}

.dl-icon-android { background: linear-gradient(135deg, #b3e88a, #4fc47f); }
.dl-icon-harmony { background: linear-gradient(135deg, #8fd0ff, #4f8cf7); }
.dl-icon-windows { background: linear-gradient(135deg, #9ed4ff, #4a90e2); }
.dl-icon-ipad    { background: linear-gradient(135deg, #d3e7ff, #9fc0ff); }
.dl-icon-ios     { background: linear-gradient(135deg, #e6e1ff, #b7a8ff); }

.dl-text {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.22;
  text-align: left;
}

.dl-text b { font-size: 14px; font-weight: 800; }
.dl-text small { font-size: 11px; font-weight: 600; color: var(--muted); }

/* 尚未上线的平台：不可点击，右上角标记「即将推出」 */
.dl-card.soon {
  cursor: default;
  pointer-events: none;
  opacity: 0.78;
}

.dl-soon-tag {
  position: absolute;
  top: -9px;
  right: 9px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  background: linear-gradient(135deg, var(--yellow), #ff9d6b);
  box-shadow: 0 4px 10px rgba(255, 157, 107, 0.4);
}

.hero-deco {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: clamp(180px, 24vw, 320px);
}

.hero-deco svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(120, 130, 200, 0.18));
}

/* ─── 作品网格（规整对齐） ─────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
  margin-top: clamp(18px, 2.4vw, 30px);
}

.card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .26s ease, box-shadow .26s ease;
  padding: 0;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font: inherit;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 30, 64, .16));
  opacity: 0;
  transition: opacity .26s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px) rotate(-0.35deg);
  box-shadow: var(--shadow-hover);
}

.card:hover::after { opacity: 1; }

.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #eef3ff;
  transition: transform .35s ease;
}

.card:hover img { transform: scale(1.035); }

/* canvas 预览容器（gallery.js 动态渲染） */
.card-canvas-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, #fff7fb 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, #f0f4ff 0%, transparent 45%),
    #ffffff;
  padding: 6px;
}

.card-canvas-preview canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(64, 84, 150, 0.14);
}

/* 无图占位（gallery.js 动态渲染） */
.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at 25% 25%, #ffeef5 0%, transparent 50%),
    radial-gradient(circle at 78% 72%, #eef4ff 0%, transparent 50%),
    #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.card-placeholder span { font-size: 34px; }
.card-placeholder p { margin: 0; }

/* ─── 悬浮徽章 ─────────────────────── */
.meta-badges {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.platform-tag,
.stamp-badge,
.author-icon-badge,
.author-text-badge,
.time-badge {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.platform-tag {
  min-width: 20px; height: 20px; padding: 0 7px; font-size: 11px; font-weight: 700;
  /* 与时间标签同一底色：深色半透明 + 毛玻璃，白色卡片 / 图片背景上都清晰可见 */
  background: rgba(24, 34, 66, 0.55);
  backdrop-filter: blur(4px);
}

/* ─── 设备类型分类筛选栏 ─────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(64, 84, 150, 0.14);
  color: var(--ink);
}

.filter-chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 6px 18px rgba(139, 124, 246, 0.32);
}

.card.filtered-out { display: none; }

/* 三个平台的标签统一使用与时间标签相同的底色（深色半透明 + 毛玻璃），
   白色卡片 / 图片背景上都清晰可见 */
.platform-android,
.platform-harmony,
.platform-web {
  background: rgba(24, 34, 66, 0.55);
  backdrop-filter: blur(4px);
}

.stamp-badge {
  min-width: 24px; height: 24px; padding: 0 6px; font-size: 14px;
  background: linear-gradient(135deg, #ff83c2, #ffad68);
  box-shadow: 0 4px 10px rgba(255, 108, 159, 0.35);
}

.author-icon-badge {
  min-width: 24px; height: 24px; padding: 0 6px; font-size: 14px;
  background: linear-gradient(135deg, rgba(240, 112, 167, 0.95), rgba(255, 151, 96, 0.95));
  box-shadow: 0 4px 10px rgba(255, 108, 159, 0.3);
}

.author-text-badge {
  height: 22px; padding: 0 9px; font-size: 12px; font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 132, 187, 0.96), rgba(255, 189, 106, 0.96));
  box-shadow: 0 4px 10px rgba(255, 108, 159, 0.28);
}

.time-badge {
  height: 22px; padding: 0 9px; font-size: 12px; font-weight: 600;
  background: rgba(24, 34, 66, 0.55);
  backdrop-filter: blur(4px);
}

/* ─── 尺寸统一（保留类名兼容 JS，视觉对齐） ─── */
.card-xl, .card-l, .card-m { grid-column: span 1; grid-row: span 1; }

/* ─── 空状态 ─────────────────────── */
.empty {
  margin: 48px auto 24px;
  max-width: 520px;
  text-align: center;
  padding: 48px 28px;
  border-radius: var(--radius);
  border: 2px dashed rgba(139, 124, 246, 0.3);
  background: rgba(255, 255, 255, 0.7);
}

.empty-art { font-size: 40px; letter-spacing: 10px; }

.empty-main {
  margin: 14px 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.empty-sub { margin: 0; font-size: 14px; color: var(--muted); }

/* ─── 大图查看器 ─────────────────────── */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(12, 18, 38, 0.82);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 16px;
  cursor: zoom-out;
}

.viewer img {
  max-width: min(1280px, 96vw);
  max-height: 92vh;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  background: #fff;
}

.hidden { display: none; }

/* ─── 页脚（居中） ────────────────── */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 12px 26px;
  text-align: center;
}

.footer-brand {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.footer-copy {
  margin: 0 0 8px;
  font-size: 12px;
  color: #9aa6c4;
}

.site-footer a {
  color: #8a97b8;
  text-decoration: none;
  font-size: 12px;
  display: inline-block;
}

.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ─── 响应式 ─────────────────────── */
@media (max-width: 1120px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-deco { width: clamp(150px, 20vw, 240px); }
}

@media (max-width: 720px) {
  .wall { padding: 10px; }
  .hero { flex-direction: column-reverse; text-align: center; padding: 26px 18px 28px; }
  .hero-text { max-width: 100%; }
  .hero-deco { width: min(52vw, 220px); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 16px; }
  .stats { padding: 10px 18px; gap: 16px; }
  .stat-num { font-size: 22px; }
  .downloads { margin-top: 18px; }
  .download-list { justify-content: center; gap: 8px; }
  .dl-card { padding: 7px 12px 7px 8px; gap: 7px; border-radius: 13px; }
  .dl-icon { width: 30px; height: 30px; font-size: 15px; border-radius: 10px; }
  .dl-text b { font-size: 13px; }
  .dl-text small { font-size: 10px; }
}
