:root {
  --bg: #05070b;
  --panel: rgba(13, 17, 24, .9);
  --panel-strong: rgba(13, 17, 24, .98);
  --line: rgba(220, 191, 124, .22);
  --line-soft: rgba(242, 237, 224, .11);
  --gold: #d9b867;
  --gold-light: #fff1c5;
  --jade: #78d8c7;
  --text: #f7f1e4;
  --muted: rgba(231, 228, 219, .66);
  --shadow: 0 28px 90px rgba(0, 0, 0, .52);
  --serif: "Songti SC", "STSong", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--bg); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(1100px 700px at 80% -12%, rgba(181, 130, 55, .1), transparent 58%),
    radial-gradient(900px 720px at -15% 45%, rgba(55, 126, 128, .08), transparent 55%),
    #05070b;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(4, 7, 13, .72), rgba(4, 7, 13, .97)),
    url("/game/assets/map-xuanmen-jiuzhou.jpg") center 18% / cover;
  opacity: .13;
  filter: grayscale(.22) saturate(.52) contrast(1.2);
  transform: scale(1.03);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .44;
  background-image: linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 100% 5px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { border: 0; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.platform {
  width: min(1500px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 max(34px, env(safe-area-inset-bottom));
}
.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px 10px 10px;
  border: 1px solid rgba(255,255,255,.095);
  border-radius: 20px;
  background: rgba(7, 9, 14, .82);
  box-shadow: 0 14px 50px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 20;
}
.brand { min-width: 0; display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-light);
  background: radial-gradient(circle at 45% 38%, rgba(255,239,192,.13), rgba(197,146,52,.035) 55%, transparent 56%);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(230,196,115,.22);
  border-radius: 50%;
  box-shadow: inset 0 0 22px rgba(226,182,84,.08), 0 0 28px rgba(226,182,84,.08);
}
.brand-mark img { width: 45px; height: 45px; }
.brand-copy { min-width: 0; }
.brand-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Georgia, var(--serif);
  color: var(--gold);
  font-size: 1.18rem;
  letter-spacing: .13em;
}
.brand-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .61rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.store-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.018);
}
.store-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.store-nav a:first-child { color: var(--text); background: rgba(255,255,255,.075); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.project-count {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(120,216,199,.15);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(120,216,199,.035);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}
.project-count i { width: 7px; height: 7px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 12px rgba(114,216,199,.8); }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  cursor: pointer;
  font-size: .84rem;
  font-weight: 900;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { border-color: rgba(233,196,111,.48); background: rgba(255,255,255,.09); }
.button:active { transform: scale(.98); }
.button.primary {
  color: #1d1406;
  border-color: transparent;
  background: linear-gradient(110deg, #fff0bd, #dab768 60%, #bc873b);
  box-shadow: inset 0 1px rgba(255,255,255,.72), 0 12px 32px rgba(184,131,43,.2);
}
.button.jade { color: #b6fff1; border-color: rgba(114,216,199,.36); }

.showcase {
  min-height: clamp(540px, 69vh, 720px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin-top: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 30px;
  background: #080b11;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.showcase::before {
  content: "";
  position: absolute;
  inset: 0 320px 0 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,7,11,.98) 0%, rgba(5,7,11,.84) 30%, rgba(5,7,11,.2) 72%, rgba(5,7,11,.82) 100%),
    linear-gradient(0deg, rgba(5,7,11,.98), transparent 68%);
}
.showcase-backdrop {
  width: calc(100% - 320px);
  height: 100%;
  position: absolute;
  inset: 0 320px 0 0;
  z-index: -2;
  object-fit: cover;
  object-position: center;
  filter: saturate(.68) contrast(1.08) brightness(.8);
  transition: opacity .18s ease;
}
.showcase-index { position: absolute; top: 28px; right: 350px; color: rgba(255,255,255,.42); font: 700 .62rem/1 Georgia, serif; letter-spacing: .15em; }
.spotlight-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 72px);
}
.spotlight-overline { display: flex; align-items: center; gap: 12px; color: var(--gold); font-size: .68rem; font-weight: 900; letter-spacing: .18em; }
.spotlight-overline::before { content: ""; width: 42px; height: 1px; background: currentColor; }
.spotlight-copy h1 {
  max-width: 820px;
  margin: 16px 0 12px;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.045em;
  text-shadow: 0 8px 32px rgba(0,0,0,.58);
}
.spotlight-copy > p { max-width: 700px; margin: 0; color: rgba(255,247,230,.74); font-size: clamp(.9rem, 1.6vw, 1.05rem); line-height: 1.8; }
.spotlight-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.spotlight-tags span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(5,8,14,.52); font-size: .68rem; font-weight: 800; }
.spotlight-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.spotlight-actions .button { min-width: 170px; }
.continue-card {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
  padding: 14px 16px;
  border: 1px solid rgba(120,216,199,.22);
  border-radius: 20px;
  background: rgba(5,12,16,.72);
  backdrop-filter: blur(16px);
}
.continue-label { color: var(--gold); font-size: .64rem; font-weight: 900; letter-spacing: .12em; }
.continue-card h2 { margin: 5px 0 2px; font-family: var(--serif); font-size: 1rem; }
.continue-card p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.spotlight-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 26px 22px;
  border-left: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(160deg, rgba(17,18,19,.93), rgba(7,9,13,.98));
}
.spotlight-rail > span { margin-bottom: 5px; color: rgba(255,255,255,.46); font: 700 .58rem/1 Georgia, serif; letter-spacing: .14em; text-transform: uppercase; }
.feature-tab {
  min-height: 72px;
  display: grid;
  grid-template-columns: 72px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,.018);
  text-align: left;
  cursor: pointer;
}
.feature-tab.active { border-color: rgba(217,184,103,.36); background: linear-gradient(110deg, rgba(96,72,30,.34), rgba(255,255,255,.03)); }
.feature-tab img { width: 72px; height: 56px; object-fit: cover; border-radius: 9px; filter: saturate(.74); }
.feature-tab small { display: block; color: var(--gold); font-size: .55rem; font-weight: 900; letter-spacing: .08em; }
.feature-tab strong { display: block; overflow: hidden; margin-top: 5px; font-size: .72rem; white-space: nowrap; text-overflow: ellipsis; }

.library { padding: 74px 0 24px; scroll-margin-top: 100px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding: 0 4px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem); }
.section-head p { margin: 7px 0 0; color: var(--muted); font-size: .8rem; }
.section-head > span { color: var(--muted); font-size: .66rem; letter-spacing: .16em; }
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.search-box {
  min-width: min(360px, 100%);
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
}
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: .78rem; }
.search-box input::placeholder { color: rgba(231,228,219,.42); }
.filter-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.filter-button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-size: .7rem;
  font-weight: 900;
}
.filter-button.active { color: #171005; border-color: transparent; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.catalog-summary { min-height: 20px; margin: 0 4px 17px; color: var(--muted); font-size: .7rem; }
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.directory-group {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(19,26,43,.97), rgba(9,13,23,.97));
  box-shadow: 0 16px 42px rgba(0,0,0,.25);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.directory-group:hover { transform: translateY(-2px); border-color: rgba(233,196,111,.32); box-shadow: 0 23px 55px rgba(0,0,0,.32); }
.directory-group.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(430px, .92fr) minmax(0, 1.08fr);
  border-color: rgba(217,184,103,.3);
}
.group-cover {
  min-height: 250px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 28%, rgba(217,184,103,.17), transparent 40%),
    radial-gradient(circle at 25% 72%, rgba(120,216,199,.12), transparent 45%),
    #080c14;
}
.directory-group:not(.featured) .group-cover { aspect-ratio: 16 / 6.4; min-height: 0; }
.group-cover img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.69) contrast(1.08) brightness(.72); transition: transform .4s ease; }
.directory-group:hover .group-cover img { transform: scale(1.018); }
.group-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,8,14,.92), rgba(5,8,14,.12) 72%); pointer-events: none; }
.group-cover-copy { position: absolute; z-index: 2; inset: auto 22px 20px; }
.group-cover-copy small { color: var(--gold); font-size: .62rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.group-cover-copy h3 { margin: 5px 0 0; color: #fff7e6; font-family: var(--serif); font-size: clamp(1.65rem, 3vw, 2.65rem); line-height: 1.08; text-shadow: 0 2px 22px rgba(0,0,0,.75); }
.group-cover-copy span { min-height: 30px; display: inline-flex; align-items: center; margin-top: 11px; padding: 0 10px; border: 1px solid rgba(120,216,199,.4); border-radius: 999px; color: #b7fff0; background: rgba(6,10,18,.72); font-size: .62rem; font-weight: 900; }
.group-body { min-width: 0; padding: 18px; }
.directory-group.featured .group-body { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 22px; }
.group-body > p { margin: 0 0 14px; color: var(--muted); font-size: .75rem; line-height: 1.7; }
.group-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.project-link {
  min-width: 0;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,.025);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.project-link:hover, .project-link:focus-visible { border-color: rgba(217,184,103,.38); background: rgba(217,184,103,.07); transform: translateX(2px); }
.project-link-copy { min-width: 0; }
.project-link-copy small { display: block; overflow: hidden; color: var(--gold); font-size: .51rem; font-weight: 900; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.project-link-copy strong { display: block; overflow: hidden; margin-top: 4px; font-size: .72rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.project-link-status { flex: 0 0 auto; color: rgba(231,228,219,.53); font-size: .57rem; font-weight: 800; white-space: nowrap; }
.project-link-status i { margin-left: 6px; color: var(--jade); font-style: normal; font-size: .75rem; }
.empty-state { min-height: 220px; place-items: center; align-content: center; gap: 6px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); text-align: center; }
.empty-state:not([hidden]) { display: grid; }
.empty-state b { color: var(--gold-light); font-family: var(--serif); font-size: 1.2rem; }
.empty-state span { font-size: .75rem; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 28px 5px 4px; color: var(--muted); font-size: .68rem; }
footer div { display: flex; flex-wrap: wrap; gap: 16px; }
footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--gold); font-weight: 800; }

@media (max-width: 1100px) {
  .showcase { grid-template-columns: minmax(0,1fr) 260px; }
  .showcase::before { right: 260px; }
  .showcase-backdrop { width: calc(100% - 260px); right: 260px; }
  .showcase-index { right: 290px; }
  .spotlight-copy { padding: 42px; }
  .directory-grid { grid-template-columns: 1fr; }
  .directory-group.featured { grid-column: auto; display: block; }
  .directory-group.featured .group-cover { aspect-ratio: 16 / 6.4; min-height: 0; }
  .catalog-head { align-items: flex-start; flex-direction: column; }
  .filter-row { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .store-nav { display: none; }
  .showcase { min-height: 800px; display: block; }
  .showcase::before { inset: 0; background: linear-gradient(0deg, rgba(5,7,11,.99) 0%, rgba(5,7,11,.94) 50%, rgba(5,7,11,.14) 100%); }
  .showcase-backdrop { width: 100%; height: 52%; inset: 0 0 auto; }
  .spotlight-copy { min-height: 650px; justify-content: flex-end; padding: 270px 30px 24px; }
  .spotlight-rail { min-height: 140px; flex-direction: row; justify-content: flex-start; overflow-x: auto; border-top: 1px solid rgba(255,255,255,.1); border-left: 0; }
  .spotlight-rail > span { flex: 0 0 auto; align-self: center; margin-right: 8px; }
  .feature-tab { min-width: 210px; }
  .showcase-index { top: 24px; right: 24px; }
}
@media (max-width: 620px) {
  .platform { width: min(100% - 16px, 1500px); padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar { min-height: 62px; padding: 8px; border-radius: 16px; }
  .brand { gap: 9px; }
  .brand-mark { width: 45px; height: 45px; }
  .brand-mark img { width: 38px; height: 38px; }
  .brand-copy strong { font-size: .86rem; letter-spacing: .08em; }
  .brand-copy span { font-size: .49rem; letter-spacing: .12em; }
  .project-count { display: none; }
  .top-actions .button { min-height: 44px; padding: 0 12px; font-size: .7rem; }
  .showcase { min-height: 720px; margin-top: 10px; border-radius: 20px; }
  .showcase-backdrop { height: 43%; }
  .showcase::before { background: linear-gradient(0deg, rgba(5,7,11,.99) 0%, rgba(5,7,11,.96) 59%, rgba(5,7,11,.08) 100%); }
  .spotlight-copy { min-height: 585px; padding: 230px 20px 16px; }
  .spotlight-copy h1 { font-size: clamp(2.55rem, 13vw, 3.8rem); }
  .spotlight-copy > p { display: -webkit-box; overflow: hidden; font-size: .76rem; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  .spotlight-tags span:nth-child(n+4) { display: none; }
  .spotlight-actions { margin-top: 16px; }
  .spotlight-actions .button { min-width: 0; flex: 1 1 125px; padding: 0 12px; }
  .continue-card { grid-template-columns: minmax(0,1fr) auto; margin-top: 14px; padding: 11px; }
  .continue-card p { display: none; }
  .continue-card .button { min-width: 96px; padding: 0 10px; font-size: .7rem; }
  .spotlight-rail { min-height: 126px; padding: 10px 18px 16px; }
  .spotlight-rail > span { display: none; }
  .feature-tab { min-width: 178px; grid-template-columns: 58px minmax(0,1fr); }
  .feature-tab img { width: 58px; height: 50px; }
  .library { padding-top: 46px; }
  .section-head { align-items: flex-start; }
  .section-head > span { display: none; }
  .search-box { min-width: 100%; }
  .filter-row { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filter-button { flex: 0 0 auto; }
  .directory-grid { grid-template-columns: 1fr; gap: 14px; }
  .directory-group { border-radius: 16px; }
  .directory-group:not(.featured) .group-cover,
  .directory-group.featured .group-cover { aspect-ratio: 16 / 7.5; }
  .group-cover-copy { inset: auto 16px 15px; }
  .group-body { padding: 14px; }
  .group-links { grid-template-columns: 1fr; }
  .project-link { min-height: 64px; }
  footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
