:root {
  --page-bg: #fff6fb;
  --header-start: #8a2be2;
  --header-mid: #ef4c9a;
  --header-end: #ff7a00;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e6dff0;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(129, 68, 178, 0.08);
  --btn-start: #c45bff;
  --btn-end: #ff4f86;
  --footer: #0f172a;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.95), rgba(255, 246, 251, 0.96) 40%, var(--page-bg) 100%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(90deg, var(--header-start) 0%, var(--header-mid) 55%, var(--header-end) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.site-header-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--header-start);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.brand-name { font-size: 18px; letter-spacing: 0; }
.header-nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.94;
}
.header-nav a { padding: 4px 0; }

.main {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 16px 16px 0;
  flex: 1;
}

.hero {
  text-align: center;
  padding: 12px 0 10px;
}
.hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  background: linear-gradient(90deg, #c044c8, #ef4b9a, #ff7a1d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 0;
  color: #7c6b87;
  font-size: 16px;
}

.notice {
  margin: 18px auto 16px;
  max-width: 860px;
  padding: 10px 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff8c2a 0%, #cf4bd4 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
}

.search-area {
  position: relative;
  max-width: 620px;
  margin: 0 auto 16px;
}
.search-row {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #a4a7b6;
}
.search-icon::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 2px;
  background: #a4a7b6;
  right: -6px;
  bottom: -4px;
  transform: rotate(45deg);
  border-radius: 2px;
}
.search-input {
  width: 100%;
  height: 46px;
  border-radius: 999px;
  border: 1px solid #eadcf5;
  background: #fff;
  padding: 0 132px 0 42px;
  outline: none;
  box-shadow: 0 3px 14px rgba(102, 54, 133, 0.08);
}
.search-input:focus { border-color: #d16ee0; }
.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 36px;
  min-width: 76px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--btn-start), var(--btn-end));
  font-weight: 700;
  padding: 0 18px;
}
.search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 12;
  background: #fff;
  border: 1px solid #f0e8f7;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(31, 17, 53, 0.12);
  padding: 14px 14px 12px;
}
.search-area .search-panel { display: none; }
.search-area:focus-within .search-panel { display: block; }
.search-panel.hidden { display: none; }
.search-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7c7f8c;
  font-size: 12px;
  margin-bottom: 10px;
}
.search-panel-title span:last-child { flex: 1; height: 1px; background: #efedf5; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e4d6f4;
  background: linear-gradient(90deg, #fff7ef, #fff5fb);
  color: #485164;
  font-size: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.chip:hover { transform: translateY(-1px); border-color: #cf90ea; }
.chip .rank { color: #f27000; font-weight: 900; }
.chip-plain { background: #fff; }
.chip-active {
  color: #fff;
  background: linear-gradient(90deg, #a94cf2, #ff4d8e);
  border-color: transparent;
}

.category-bar, .tag-bar {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.category-bar::-webkit-scrollbar, .tag-bar::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid #ddd4ef;
  background: #fff;
  color: #4a4f61;
  font-size: 13px;
  font-weight: 700;
}
.pill.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, #b44ff2, #ff4d8e);
  box-shadow: 0 6px 18px rgba(180, 79, 242, 0.2);
}

.games { display: grid; gap: 12px; margin-top: 8px; }
.game-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid #f0e6f8;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 22px rgba(137, 84, 168, 0.06);
}
.game-card:hover { transform: translateY(-1px); transition: transform 0.15s ease; }
.cover {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fafafa;
}
.card-main { min-width: 0; }
.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 4px;
}
.title-row h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.flag.hot { background: #ff8a00; }
.flag.new { background: #22c55e; }
.desc {
  margin: 0 0 8px;
  color: #647083;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mini-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf4ff;
  color: #567fe0;
  font-size: 11px;
  font-weight: 700;
}
.game-action {
  width: 58px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--btn-start), var(--btn-end));
}

.pager {
  margin: 18px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.pager-row { display: flex; align-items: center; gap: 8px; }
.page-btn, .page-num {
  height: 32px;
  border-radius: 8px;
  border: 1px solid #eadcf5;
  background: #fff;
  color: #5b5f72;
  padding: 0 14px;
}
.page-num {
  min-width: 32px;
  padding: 0 10px;
}
.page-num.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, #b44ff2, #ff4d8e);
}
.pager-tip { color: #6f7490; font-size: 12px; }

.footer {
  margin-top: 24px;
  background: var(--footer);
  color: #d6d8e3;
  padding: 30px 16px 26px;
}
.footer-inner {
  max-width: 1020px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}
.footer hr {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 18px 0;
}
.footer .qq { color: #d770ff; font-weight: 700; }

.detail-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #fef8ff 0, #f8f2ff 30%, #fff4ef 100%);
}
.detail-main {
  max-width: 1020px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  margin-bottom: 14px;
}
.detail-card {
  background: #fff;
  border: 1px solid #efe5f7;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.detail-top {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: start;
}
.detail-cover {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid #eee;
}
.detail-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}
.detail-desc {
  margin: 8px 0 12px;
  color: #516072;
  line-height: 1.75;
  white-space: pre-wrap;
}
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.primary-action, .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 800;
  border: 0;
}
.primary-action {
  background: linear-gradient(90deg, var(--btn-start), var(--btn-end));
  color: #fff;
}
.secondary-action {
  border: 1px solid #e2c9fb;
  background: #fff;
  color: #a64cea;
}
.shots {
  margin-top: 18px;
}
.shots h2 {
  margin: 0 0 10px;
  font-size: 18px;
}
.shots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.shot {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;
}

@media (max-width: 900px) {
  .site-header-inner, .main, .footer-inner, .detail-main { max-width: 100%; }
  .header-nav { gap: 12px; }
  .game-card { grid-template-columns: 64px 1fr; }
  .game-action { grid-column: 1 / -1; width: 100%; }
  .shots-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .brand-name { font-size: 16px; }
  .header-nav { display: none; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 14px; }
  .search-input { padding-right: 104px; }
  .game-card { padding: 12px; }
  .detail-top { grid-template-columns: 1fr; }
  .detail-cover { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}
