:root {
  --ink: #152637;
  --muted: #718093;
  --line: #e2eaf0;
  --brand: #1d9f72;
  --brand-soft: #e8f8f1;
  --page: #eef3f6;
  --card: #fff;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.demo-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px;
  background: rgba(20, 31, 43, .94);
  backdrop-filter: blur(12px);
}
.demo-nav a {
  min-width: 68px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: rgba(255,255,255,.76);
  font-size: 13px;
  text-align: center;
}
.demo-nav a.active { color: #152637; background: #fff; border-color: #fff; font-weight: 700; }

.page-shell {
  width: min(100%, 624px);
  min-height: 100vh;
  margin: 0 auto;
  background: #f8fafb;
  box-shadow: 0 0 34px rgba(34, 55, 72, .09);
}

.site-head { position: relative; padding: 22px 20px 18px; overflow: hidden; }
.brand-row { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-logo { width: 120px; height: auto; display: block; }
.brand-copy { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.brand-copy span, .brand-copy strong { display: block; }
.brand-copy strong { margin-top: 3px; color: var(--ink); font-size: 15px; letter-spacing: .02em; }

.hero-copy { position: relative; z-index: 2; margin: 25px 0 18px; }
.hero-copy h1 { margin: 0 0 8px; font-size: clamp(25px, 6vw, 34px); line-height: 1.2; letter-spacing: -.04em; }
.hero-copy p { margin: 0; color: var(--muted); font-size: 14px; }

.search-wrap { position: relative; z-index: 3; }
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 12px 0 16px;
  border: 1px solid #d9e5e3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(36, 77, 68, .09);
}
.search-icon { width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 50%; color: var(--brand); position: relative; flex: 0 0 auto; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; right: -5px; bottom: -2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.search-box input { min-width: 0; flex: 1; height: 48px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search-box input::placeholder { color: #9aa6b2; }
.search-clear { border: 0; border-radius: 999px; padding: 7px 10px; background: #edf2f4; color: #647486; font-size: 12px; cursor: pointer; }
.search-hint { min-height: 19px; margin: 8px 4px 0; color: var(--muted); font-size: 12px; }
.search-hint:empty { display: none; }

.content { padding: 0 16px 28px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 18px 2px 12px; }
.section-head h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.game-list { display: grid; gap: 12px; }

.game-card { position: relative; min-width: 0; overflow: hidden; }
.game-cover { flex: 0 0 auto; overflow: hidden; background: #e7f3ee; }
.game-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.game-copy { min-width: 0; }
.game-title { display: block; overflow: hidden; color: var(--ink); font-weight: 800; line-height: 1.28; text-overflow: ellipsis; white-space: nowrap; }
.game-tags { display: flex; align-content: flex-start; align-items: flex-start; flex-wrap: wrap; overflow: hidden; }
.game-tag { display: inline-flex; align-items: center; max-width: 100%; overflow: hidden; border: 1px solid transparent; border-radius: 999px; text-overflow: ellipsis; white-space: nowrap; }
.tone-0 { color: #15845e; background: #effaf5; border-color: #bfe8d5; }
.tone-1 { color: #3970c8; background: #f2f6ff; border-color: #cbdafe; }
.tone-2 { color: #b86722; background: #fff7ee; border-color: #f4d8b9; }
.tone-3 { color: #a75176; background: #fff2f7; border-color: #f2cadd; }
.tone-4 { color: #7160b5; background: #f7f4ff; border-color: #dad2f6; }
.game-rank, .game-arrow { display: none; }

.empty-state { padding: 46px 20px; border: 1px dashed #cbd7df; border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.72); text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 17px; }
.empty-state p { margin: 0; font-size: 13px; }
.site-footer { padding: 20px 16px 34px; border-top: 1px solid var(--line); color: #8a98a5; font-size: 12px; line-height: 1.8; text-align: center; }

/* 方案一：现有集合页延伸出的清爽列表 */
.layout-clean { --brand: #15966a; --brand-soft: #e9f8f1; }
.layout-clean .site-head { padding-bottom: 12px; }
.layout-clean .site-head::before { content: ""; position: absolute; inset: 0 0 34px; background: linear-gradient(145deg, #e9faf3, #f8fbfb 65%); }
.layout-clean .site-head::after { content: ""; position: absolute; width: 210px; height: 210px; right: -86px; top: -104px; border: 42px solid rgba(28, 171, 119, .08); border-radius: 50%; }
.layout-clean .brand-row { margin-bottom: 20px; }
.layout-clean .brand-row picture { display: flex; flex: 0 0 auto; align-items: center; }
.layout-clean .brand-logo { width: 150px; }
.layout-clean .brand-copy { padding: 2px 0 2px 14px; border-left: 1px solid #c9ddd5; }
.layout-clean .brand-copy span { color: #697b74; font-size: 11px; letter-spacing: .12em; }
.layout-clean .brand-copy strong { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: #173d33; font-size: 14px; letter-spacing: .02em; }
.layout-clean .brand-copy em { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 7px; color: #fff; background: #15966a; font-size: 12px; font-style: normal; line-height: 1; }
.layout-clean .content { padding-top: 14px; }
.layout-clean .game-card { display: flex; align-items: center; gap: 11px; min-height: 96px; padding: 11px; border: 1px solid #e1e9ed; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(42, 67, 82, .045); }
.layout-clean .game-cover { width: 70px; height: 70px; border-radius: 14px; }
.layout-clean .game-copy { flex: 1; }
.layout-clean .game-title { margin-bottom: 8px; font-size: 17px; }
.layout-clean .game-tags { flex-wrap: nowrap; gap: 5px; max-height: 23px; }
.layout-clean .game-tag { flex: 0 0 auto; min-width: 0; height: 23px; padding: 0 8px; font-size: 11px; }
.layout-clean .game-arrow { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: #8593a0; background: #f3f6f8; font-size: 0; }
.layout-clean .game-arrow::before { content: ""; width: 12px; height: 14px; background: center / 12px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='14' viewBox='0 0 12 14'%3E%3Cpath d='M4.25 2.5 8.5 7l-4.25 4.5' fill='none' stroke='%238593a0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* 方案二：淘宝式无外框清单 */
.layout-market { --brand: #f05b2a; --brand-soft: #fff0e9; background: #fff; }
.layout-market .page-shell { background: #fff; }
.layout-market .site-head { padding: 24px 20px 15px; background: linear-gradient(180deg, #fff6ef 0, #fff 82%); }
.layout-market .brand-row { flex-direction: column; justify-content: center; gap: 7px; }
.layout-market .brand-row picture { display: flex; }
.layout-market .brand-logo { width: 174px; }
.layout-market .brand-copy { display: flex; align-items: center; gap: 6px; color: #7b675e; }
.layout-market .brand-copy span, .layout-market .brand-copy strong { display: inline; margin: 0; font-size: 12px; }
.layout-market .brand-copy strong { color: #df5825; }
.layout-market .search-wrap { margin-top: 18px; }
.layout-market .search-box { border-radius: 999px; border: 2px solid #ff713f; box-shadow: none; padding-left: 18px; }
.layout-market .content { padding: 4px 20px 28px; }
.layout-market .game-list { gap: 0; }
.layout-market .game-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; min-height: 117px; padding: 13px 0; border-bottom: 1px solid #edf0f2; background: #fff; }
.layout-market .game-cover { width: 92px; height: 92px; border-radius: 14px; }
.layout-market .game-copy { align-self: center; }
.layout-market .game-title { margin-bottom: 10px; font-size: 18px; }
.layout-market .game-tags { flex-wrap: nowrap; gap: 6px; max-height: 25px; }
.layout-market .game-tag { flex: 0 0 auto; height: 25px; padding: 0 8px; border-color: transparent; font-size: 11px; background: #f6f7f8; color: #66727d; }
.layout-market .game-tag:first-child { color: #db531f; background: #fff0e9; }

/* 方案三：精选橱窗，首个结果自动突出 */
.layout-showcase { --brand: #7357d5; --brand-soft: #f0ecff; background: #181629; }
.layout-showcase .page-shell { background: #f5f4fa; }
.layout-showcase .site-head { padding-bottom: 20px; color: #fff; background: radial-gradient(circle at 88% 10%, rgba(149,112,255,.5), transparent 33%), linear-gradient(145deg, #171426, #312752); }
.layout-showcase .brand-row picture { display: flex; }
.layout-showcase .brand-logo { width: 150px; filter: drop-shadow(0 5px 14px rgba(0,0,0,.22)); }
.layout-showcase .brand-copy { padding-left: 13px; border-left: 1px solid rgba(255,255,255,.24); color: rgba(255,255,255,.72); }
.layout-showcase .brand-copy span { font-size: 11px; letter-spacing: .08em; }
.layout-showcase .brand-copy strong { margin-top: 4px; color: #fff; font-size: 13px; }
.layout-showcase .search-wrap { margin-top: 20px; }
.layout-showcase .search-box { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.12); box-shadow: none; backdrop-filter: blur(10px); }
.layout-showcase .search-icon { color: #fff; }
.layout-showcase .search-box input { color: #fff; }
.layout-showcase .search-box input::placeholder { color: rgba(255,255,255,.66); }
.layout-showcase .search-clear { color: #fff; background: rgba(255,255,255,.14); }
.layout-showcase .search-hint { color: rgba(255,255,255,.66); }
.layout-showcase .content { padding-top: 14px; }
.layout-showcase .game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-showcase .game-card { display: flex; flex-direction: column; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(47, 38, 77, .08); }
.layout-showcase .game-cover { width: 100%; aspect-ratio: 1 / 1; border-radius: 18px 18px 0 0; }
.layout-showcase .game-copy { padding: 12px 12px 14px; }
.layout-showcase .game-title { margin-bottom: 9px; font-size: 16px; }
.layout-showcase .game-tags { flex-wrap: nowrap; gap: 5px; max-height: 22px; }
.layout-showcase .game-tag { flex: 0 0 auto; height: 22px; padding: 0 7px; border: 0; font-size: 10px; }
.layout-showcase .game-card.is-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 48% minmax(0, 1fr); min-height: 220px; }
.layout-showcase .game-card.is-featured .game-cover { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 18px 0 0 18px; }
.layout-showcase .game-card.is-featured .game-copy { align-self: center; padding: 18px; }
.layout-showcase .game-card.is-featured .game-title { font-size: 22px; }
.layout-showcase .game-card.is-featured .game-tags { max-height: 25px; }
.layout-showcase .game-card.is-featured .game-tag { height: 25px; font-size: 11px; }

/* 方案四：高密度游戏目录 */
.layout-catalog { --brand: #2769c9; --brand-soft: #eaf2ff; }
.layout-catalog .site-head { padding-bottom: 14px; border-bottom: 1px solid #dbe5ee; background: #f8fbff; }
.layout-catalog .brand-row { margin-bottom: 16px; }
.layout-catalog .brand-row picture { display: flex; }
.layout-catalog .brand-logo { width: 138px; }
.layout-catalog .brand-copy { color: #738091; }
.layout-catalog .brand-copy span { font-size: 11px; letter-spacing: .06em; }
.layout-catalog .brand-copy strong { margin-top: 4px; color: #2769c9; font-size: 13px; }
.layout-catalog .search-box { min-height: 48px; border-radius: 12px; box-shadow: 0 8px 20px rgba(39,105,201,.08); }
.layout-catalog .content { padding: 12px 14px 28px; }
.layout-catalog .game-list { gap: 8px; }
.layout-catalog .game-card { display: grid; grid-template-columns: 30px 70px minmax(0, 1fr) 24px; align-items: center; gap: 10px; min-height: 92px; padding: 10px 10px 10px 7px; border: 1px solid #dfe7ee; border-radius: 14px; background: #fff; }
.layout-catalog .game-rank { display: block; color: #a1adba; font-size: 11px; font-weight: 800; text-align: center; }
.layout-catalog .game-cover { width: 70px; height: 70px; border-radius: 13px; }
.layout-catalog .game-title { margin-bottom: 8px; font-size: 16px; }
.layout-catalog .game-tags { flex-wrap: nowrap; gap: 5px; }
.layout-catalog .game-tag { flex: 0 0 auto; min-width: 0; height: 22px; padding: 0 7px; font-size: 10px; }
.layout-catalog .game-arrow { display: block; color: #9ba8b4; font-size: 24px; }

/* 方案五：双列应用中心 */
.layout-grid { --brand: #168368; --brand-soft: #e9f8f3; background: #eaf0f3; }
.layout-grid .page-shell { background: #f4f7f8; }
.layout-grid .site-head { padding: 24px 18px 16px; border-bottom: 1px solid #dce7e4; background: #fff; }
.layout-grid .brand-row { flex-direction: column; justify-content: center; gap: 8px; }
.layout-grid .brand-row picture { display: flex; }
.layout-grid .brand-logo { width: 176px; }
.layout-grid .brand-copy { display: flex; align-items: center; gap: 7px; color: #73817c; }
.layout-grid .brand-copy span, .layout-grid .brand-copy strong { display: inline; margin: 0; font-size: 12px; }
.layout-grid .brand-copy strong { color: #168368; }
.layout-grid .search-wrap { margin-top: 18px; }
.layout-grid .search-box { min-height: 50px; border: 0; border-radius: 14px; background: #f0f4f5; box-shadow: inset 0 0 0 1px #e0e8e7; }
.layout-grid .content { padding: 14px 12px 28px; }
.layout-grid .game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.layout-grid .game-card { display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 15px 10px 13px; border: 1px solid #dfe8e7; border-radius: 17px; background: #fff; box-shadow: 0 7px 20px rgba(43,68,65,.045); text-align: center; }
.layout-grid .game-cover { width: 76px; height: 76px; border-radius: 17px; box-shadow: 0 5px 13px rgba(35,55,52,.1); }
.layout-grid .game-copy { width: 100%; }
.layout-grid .game-title { margin: 11px 0 8px; font-size: 15px; }
.layout-grid .game-tags { width: 100%; flex-wrap: nowrap; justify-content: flex-start; gap: 5px; max-height: 22px; }
.layout-grid .game-tag { flex: 0 0 auto; height: 22px; padding: 0 7px; border: 0; font-size: 10px; }

/* 组合方案：方案二顶部与配色＋方案五双列游戏区 */
.layout-hybrid { --brand: #f05b2a; --brand-soft: #fff0e9; background: #f3efec; }
.layout-hybrid .page-shell { background: #faf8f6; }
.layout-hybrid .site-head { padding: 24px 20px 15px; border-bottom: 1px solid #f0e2da; background: linear-gradient(180deg, #fff6ef 0, #fff 88%); }
.layout-hybrid .brand-row { flex-direction: column; justify-content: center; gap: 7px; }
.layout-hybrid .brand-row picture { display: flex; }
.layout-hybrid .brand-logo { width: 174px; }
.layout-hybrid .brand-copy { display: flex; align-items: center; gap: 6px; color: #7b675e; }
.layout-hybrid .brand-copy span, .layout-hybrid .brand-copy strong { display: inline; margin: 0; font-size: 12px; }
.layout-hybrid .brand-copy strong { color: #df5825; }
.layout-hybrid .search-wrap { margin-top: 18px; }
.layout-hybrid .search-box { border-radius: 999px; border: 2px solid #ff713f; box-shadow: none; padding-left: 18px; }
.layout-hybrid .content { padding: 14px 12px 28px; }
.layout-hybrid .game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.layout-hybrid .game-card { display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 15px 10px 13px; border: 1px solid #eadfd8; border-radius: 17px; background: #fff; box-shadow: 0 7px 20px rgba(72,48,34,.045); text-align: center; }
.layout-hybrid .game-cover { width: 76px; height: 76px; border-radius: 17px; box-shadow: 0 5px 13px rgba(53,40,33,.1); }
.layout-hybrid .game-copy { width: 100%; }
.layout-hybrid .game-title { margin: 11px 0 8px; font-size: 15px; }
.layout-hybrid .game-tags { width: 100%; flex-wrap: nowrap; justify-content: flex-start; gap: 5px; max-height: 22px; }
.layout-hybrid .game-tag { flex: 0 0 auto; height: 22px; padding: 0 7px; border: 0; font-size: 10px; }
.game-tag.is-clipped { min-width: 28px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 430px) {
  .demo-nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .demo-nav::-webkit-scrollbar { display: none; }
  .brand-logo { width: 108px; }
  .brand-copy { font-size: 12px; }
  .site-head { padding-inline: 16px; }
  .content { padding-inline: 12px; }
  .layout-clean .brand-row { margin-bottom: 18px; }
  .layout-clean .game-card { gap: 10px; min-height: 88px; padding: 10px; border-radius: 16px; }
  .layout-clean .game-cover { width: 64px; height: 64px; border-radius: 13px; }
  .layout-clean .game-title { font-size: 16px; }
  .layout-clean .game-tags { max-height: 22px; gap: 4px; }
  .layout-clean .game-tag { height: 22px; max-width: none; padding-inline: 7px; font-size: 10px; }
  .layout-market .content { padding-inline: 16px; }
  .layout-market .game-card { grid-template-columns: 84px minmax(0,1fr); min-height: 107px; }
  .layout-market .game-cover { width: 84px; height: 84px; }
  .layout-market .game-title { font-size: 17px; }
  .layout-showcase .game-card.is-featured { min-height: 188px; grid-template-columns: 46% minmax(0,1fr); }
  .layout-showcase .game-card.is-featured .game-copy { padding: 13px; }
  .layout-showcase .game-card.is-featured .game-title { font-size: 19px; }
  .layout-catalog .game-card { grid-template-columns: 24px 62px minmax(0,1fr) 18px; gap: 8px; }
  .layout-catalog .game-cover { width: 62px; height: 62px; }
}

@media (max-width: 355px) {
  .brand-copy { display: none; }
  .layout-clean .game-cover { width: 60px; height: 60px; }
  .layout-clean .game-arrow { display: none; }
  .layout-market .game-card { grid-template-columns: 76px minmax(0,1fr); }
  .layout-market .game-cover { width: 76px; height: 76px; }
  .layout-showcase .game-card.is-featured { display: flex; }
  .layout-showcase .game-card.is-featured .game-cover { height: auto; aspect-ratio: 2 / 1; border-radius: 18px 18px 0 0; }
}
