/* Night Game · 2026-09-30 UI refresh
   A final, additive layer over the existing theme.
   Keeps routes, data, QR logic and deployment behavior unchanged. */

:root {
  --bg: #070a0c;
  --surface: #101618;
  --surface-2: #161e1f;
  --ink: #f1f7f3;
  --muted: #91a19b;
  --faint: #64746e;
  --line: rgba(229, 242, 235, .13);
  --cyan: #62e4d1;
  --orange: #ff815d;
  --lime: #d7ff64;
  --shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

html[data-theme="light"] {
  --bg: #edf3f5;
  --surface: #ffffff;
  --surface-2: #e4edf0;
  --ink: #14242d;
  --muted: #526872;
  --faint: #7c9098;
  --line: rgba(20, 36, 45, .16);
  --cyan: #087d99;
  --orange: #d9573a;
  --lime: #9ac51c;
  --shadow: 0 18px 44px rgba(38, 66, 78, .14);
}

/* Public backend entry */
.backend-entry {
  min-height: min(720px, calc(100vh - 90px));
  display: grid;
  place-items: center;
  padding: 60px 0 100px;
}

.backend-entry-card {
  width: min(620px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(98, 228, 209, .055), transparent 45%), var(--surface);
  box-shadow: var(--shadow);
}

.backend-entry-card h1 {
  margin: 16px 0 14px;
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -.05em;
}

.backend-entry-card > p {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.backend-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 18px;
}

.backend-entry-note {
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--faint) !important;
  font-size: 11px !important;
}

.backend-entry-note code {
  color: var(--lime);
}

@media (max-width: 720px) {
  .backend-entry {
    min-height: auto;
    padding: 34px 0 70px;
  }

  .backend-entry-card {
    padding: 24px;
  }
}

body {
  background:
    radial-gradient(circle at 82% 4%, rgba(98, 228, 209, .055), transparent 27rem),
    var(--bg);
}

body::before {
  opacity: .7;
}

body::after {
  opacity: .026;
}

.topbar {
  min-height: 76px;
  gap: 36px;
}

.brand {
  min-width: 270px;
}

.brand-nightmark {
  animation-duration: 5.4s;
}

.main-nav {
  gap: 26px;
}

.top-actions {
  gap: 10px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.hero {
  grid-template-columns: minmax(0, .84fr) minmax(460px, 1.16fr);
  gap: clamp(42px, 6vw, 84px);
  min-height: 0;
  padding: 74px 0 86px;
}

.hero-copy h1 {
  font-size: clamp(48px, 6.2vw, 88px);
  letter-spacing: -.055em;
  margin-bottom: 25px;
}

.hero-lede {
  max-width: 420px;
  font-size: 14px;
  line-height: 1.78;
  margin-bottom: 30px;
}

.hero-readout {
  gap: 28px;
  margin-top: 52px;
}

.feature-topline,
.game-number,
.game-type,
.detail-topline > span,
.strip-hint {
  display: none !important;
}

.hero-feature #featuredImage {
  filter: saturate(.92) contrast(1.04) brightness(.98);
  transition: transform .6s ease, filter .4s ease, opacity .3s ease;
}

.hero-feature:hover #featuredImage,
.hero-feature:focus-visible #featuredImage {
  filter: saturate(1) contrast(1.05) brightness(1.1);
}

.hero-feature {
  display: flex;
  flex-direction: column;
  height: clamp(420px, 41vw, 540px);
  border-radius: 8px;
  border-color: rgba(229, 242, 235, .17);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .32);
}

.hero-feature .feature-stage {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.hero-feature .feature-caption {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.hero-feature .feature-kicker {
  display: block;
  margin: 0;
}

.hero-feature .feature-action {
  margin-top: 0;
  white-space: nowrap;
}

.feature-ambient img {
  filter: blur(18px) saturate(.72) brightness(.4);
  transform: scale(1.08);
}

.feature-scanline {
  background: linear-gradient(180deg, rgba(7, 10, 12, .58) 0%, rgba(7, 10, 12, .12) 34%, rgba(7, 10, 12, .48) 72%, rgba(7, 10, 12, .96) 100%);
}

.feature-topline {
  color: rgba(241, 247, 243, .94);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .72);
}

.feature-topline {
  top: 20px;
  left: 22px;
  right: 22px;
  letter-spacing: .08em;
}

.feature-caption {
  left: 30px;
  bottom: 28px;
  width: min(82%, 560px);
}

.feature-kicker {
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: .08em;
}

.feature-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(215, 255, 100, .46);
  color: var(--lime);
  font-size: 11px;
  letter-spacing: .04em;
}

.feature-action svg {
  width: 13px;
  height: 13px;
}

.library-section {
  padding: 18px 0 96px;
}

.section-heading {
  padding-top: 19px;
  margin-bottom: 26px;
}

.section-title-wrap h2,
.download-heading h2 {
  font-size: clamp(30px, 3.7vw, 46px);
}

.library-layout {
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 42px;
}

.filter-rail {
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(98, 228, 209, .045), transparent 44%);
  padding: 17px 14px 17px 17px;
}

.search-box {
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
}

.game-grid {
  gap: 24px;
}

.game-card {
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(98, 228, 209, .48);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

.game-cover-link {
  aspect-ratio: 16 / 10;
  border-radius: 8px 8px 0 0;
}

.game-cover {
  transform: scale(1.005);
}

.game-card-body {
  padding: 15px 15px 16px;
}

.game-card h3 {
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -.025em;
  margin-bottom: 8px;
}

.game-card p {
  margin-bottom: 12px;
  line-height: 1.65;
}

.tag {
  border-radius: 4px;
}

.pagination {
  margin-top: 36px;
}

.about-section {
  padding: 42px 0 46px;
}

.detail-page {
  padding: 42px 0 96px;
}

.detail-topline {
  padding-bottom: 14px;
}

.detail-grid {
  grid-template-columns: minmax(0, .82fr) minmax(380px, 1.18fr);
  gap: clamp(42px, 5vw, 74px);
  padding: 48px 0 34px;
  align-items: start;
}

.detail-main {
  padding-top: 8px;
}

.detail-main h1 {
  font-size: clamp(44px, 6.2vw, 84px);
  margin-bottom: 20px;
}

.detail-intro {
  max-width: 520px;
  line-height: 1.82;
  margin-bottom: 18px;
}

.intro-block {
  max-width: 540px;
}

.detail-intro.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.detail-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--lime);
  font-size: 11px;
  letter-spacing: .04em;
}

.detail-more[hidden] {
  display: none;
}

.detail-more svg {
  width: 14px;
  height: 14px;
  transition: transform 180ms ease;
}

.detail-more[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.spec-strip {
  margin-top: 28px;
  padding-top: 14px;
}

.detail-copy {
  margin-top: 26px;
}

.detail-poster {
  height: clamp(360px, 36vw, 500px);
  border-radius: 8px;
}

.detail-poster::before {
  inset: -6%;
  filter: blur(24px) saturate(.5) brightness(.38);
  opacity: .66;
}

.detail-visual-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.detail-visual-column .detail-download-cta {
  display: block;
  padding-top: 0;
  border-top: 0;
}

.detail-visual-column .download-heading {
  display: none;
}

.detail-visual-column .download-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 17px;
}

.detail-visual-column .download-launch-copy h3 {
  margin: 7px 0 4px;
  font-size: 16px;
}

.detail-visual-column .download-launch-copy p {
  margin: 0;
  font-size: 11px;
}

.download-section {
  gap: 44px;
  padding-top: 28px;
}

.detail-download-cta {
  align-items: center;
}

.detail-download-cta .download-heading h2 {
  font-size: clamp(30px, 3.8vw, 46px);
  margin-bottom: 0;
}

.download-panel {
  border-radius: 8px;
}

.download-launch-panel {
  padding: 21px;
}

.screenshots {
  padding-top: 44px;
}

.screenshots .section-heading {
  margin-bottom: 20px;
}

.screenshot-strip {
  gap: 12px;
}

.screenshot-strip img {
  height: 176px;
  border-radius: 8px;
}

.download-page {
  padding: 42px 0 96px;
}

.download-page-hero {
  gap: 48px;
  padding: 48px 0 52px;
}

.download-cover {
  height: clamp(300px, 29vw, 420px);
  border-radius: 8px;
}

.download-page-section {
  padding-top: 28px;
}

.qr-grid[hidden] {
  display: none;
}

.delivery-extra {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.delivery-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.delivery-card p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.delivery-card small {
  display: block;
  margin-top: 12px;
  color: var(--faint);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.delivery-empty {
  color: var(--faint);
  font-size: 12px;
}

.qr-card {
  border-radius: 8px;
}

.qr-card-image {
  border-radius: 6px;
}

.footer {
  padding-top: 28px;
  padding-bottom: 28px;
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr);
    gap: 42px;
  }

  .library-layout {
    grid-template-columns: 176px minmax(0, 1fr);
    gap: 30px;
  }

  .detail-grid {
    gap: 42px;
  }
}

@media (max-width: 860px) {
  .hero {
    display: block;
    padding: 58px 0 72px;
  }

  .hero-feature {
    height: min(62vw, 440px);
    margin-top: 38px;
  }

  .library-layout {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 40px;
  }

  .detail-visual-column {
    display: contents;
  }

  #posterGallery {
    order: 1;
  }

  .detail-main {
    order: 2;
  }

  .detail-visual-column .detail-download-cta {
    order: 3;
  }

  .detail-main {
    padding-top: 0;
  }

  .detail-poster {
    max-height: 60vh;
  }

  .download-section {
    display: block;
  }

  .detail-download-cta {
    padding-top: 24px;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 68px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-feature {
    height: 360px;
  }

  .feature-action {
    margin-top: 12px;
  }

  .library-section {
    padding-bottom: 76px;
  }

  .about-section {
    padding: 36px 0 40px;
  }

  .detail-page {
    padding-top: 28px;
  }

  .detail-grid {
    padding: 34px 0 30px;
  }

  .detail-main h1 {
    font-size: clamp(42px, 13vw, 68px);
  }

  .detail-poster {
    max-height: 56vh;
  }

  .detail-visual-column .download-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-visual-column .download-panel .button {
    justify-self: start;
  }

  .screenshots {
    padding-top: 34px;
  }

  .screenshot-strip img {
    height: 148px;
  }

  .download-page {
    padding-top: 28px;
  }

  .download-page-hero {
    padding: 38px 0 44px;
  }

  .download-page-section {
    padding-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-feature img,
  .game-card,
  .detail-poster::before,
  .button {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== 2026-09-30（用户改动 · UI 打磨）：首屏框体柔化 · 图片自适应 · 排序控件 ===== */
/* 说明：本文件是页面最后加载的样式，覆盖前面的同名规则；改这几处都在这里落笔。 */

/* 首屏卡片：边缘交给分层阴影，描边降到几乎不可见（原来是 .17 的硬描边 + 直角内框） */
.hero-feature {
  border-color: rgba(229, 242, 235, .10);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 18px 44px rgba(0, 0, 0, .30), 0 2px 10px rgba(0, 0, 0, .22);
}

/* 内框：从「硬直角青绿描边」改成「圆角渐变发丝线」，用 mask 只留 1px，靠明暗过渡代替一条实线 */
.feature-frame {
  inset: 12px;
  border: 0;
  border-radius: 10px;
  padding: 1px;
  background: linear-gradient(160deg, rgba(215, 255, 100, .22), rgba(115, 231, 210, .09) 42%, rgba(215, 255, 100, .03) 72%, rgba(215, 255, 100, .16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  box-shadow: none;
}

/* 图片自适应：与框比例接近就铺满（裁极少），差得多就整图显示（空处由模糊氛围层补） */
.hero-feature[data-fit="cover"] .feature-stage img { object-fit: cover; object-position: center; }
.hero-feature[data-fit="contain"] .feature-stage img { object-fit: contain; object-position: center; }

/* 排序控件：对齐站内输入控件语言（6px 圆角 + surface 底 + 分层阴影），不再用独立药丸形 */
.sort-picker {
  height: 36px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
  color: var(--muted);
  font-size: 12px;
  gap: 7px;
}
.sort-picker:hover { border-color: rgba(215, 255, 100, .30); }
.sort-picker:focus-within { border-color: rgba(215, 255, 100, .48); color: var(--text); }
.sort-picker-label { color: var(--muted); letter-spacing: .04em; }
.sort-select { color: var(--text); font-weight: 600; font-size: 12px; letter-spacing: .01em; }
.sort-picker-caret { right: 10px; opacity: .55; }

/* 更新标签：实心青绿块改成同系描边标签，和站内 hairline 语言一致，压在封面上也不刺眼 */
.game-update-badge {
  padding: 3px 8px;
  border: 1px solid rgba(215, 255, 100, .42);
  border-radius: 6px;
  background: rgba(10, 14, 16, .72);
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
/* ===== 2026-09-30（UI 打磨 2 · 用户反馈「还觉得硬」）：线条再退一步，成形交给阴影 ===== */

/* ① 挂账执行：去掉首屏两处硬质 L 形角标（1px 直角的直角线最扎眼），只留渐变发丝线 */
.feature-corner { display: none !important; }

/* ② 首屏再软一档 */
.hero-feature {
  border-color: rgba(229, 242, 235, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 22px 52px rgba(0, 0, 0, .34), 0 3px 12px rgba(0, 0, 0, .20);
}
.feature-frame {
  background: linear-gradient(160deg, rgba(215, 255, 100, .15), rgba(115, 231, 210, .055) 44%, rgba(215, 255, 100, .02) 72%, rgba(215, 255, 100, .10));
}

/* ③ 挂账执行：卡片 hover 不再是一根硬青线，改成「描边轻微上色 + 阴影抬升」 */
.game-card {
  border-radius: 10px;
  border-color: rgba(229, 242, 235, .075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 10px 26px rgba(0, 0, 0, .18);
}
.game-card:hover {
  border-color: rgba(98, 228, 209, .20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 20px 44px rgba(0, 0, 0, .30);
}
.game-cover-link { border-radius: 10px 10px 0 0; }

/* ④ 同族控件一起软：搜索框 / 筛选栏 / 排序控件，描边统一压到 .07~.09 */
.search-box { border-color: rgba(229, 242, 235, .075); box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }
.filter-rail { border-color: rgba(229, 242, 235, .07); }
.sort-picker { border-color: rgba(229, 242, 235, .085); }
.sort-picker:hover { border-color: rgba(215, 255, 100, .22); box-shadow: 0 10px 26px rgba(0, 0, 0, .18); }

/* ⑤ 排序控件整框可点的配套：图标与文字不吃点击事件，点哪都落到框上 */
.sort-picker > i,
.sort-picker-caret,
.sort-picker-label { pointer-events: none; }