@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #f7f8fc;
  --ink: #171b2b;
  --muted: #7e8497;
  --purple: #7257f5;
  --purple2: #a58aff;
  --line: #e8eaf2;
  --card: #fff;
  --navy: #11172b;
  --radius: 18px
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif
}

a {
  color: inherit;
  text-decoration: none
}

button,
input,
select {
  font: inherit
}

button {
  cursor: pointer
}

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(18px, 4vw, 64px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 24px 'Space Grotesk', sans-serif;
  letter-spacing: -1px;
  white-space: nowrap
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(135deg, #8063ff, #5b43d6);
  font-size: 15px;
  box-shadow: 0 7px 18px #7257f533
}

.brand-accent {
  color: var(--purple)
}

.search-form {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(440px, 50vw);
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafaff;
  color: #9a9eb0
}

.search-form input {
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
  color: var(--ink)
}

.search-form button,
.primary-btn {
  border: 0;
  border-radius: 9px;
  background: var(--purple);
  color: #fff;
  padding: 10px 16px;
  font-weight: 700
}

.mobile-menu {
  display: none;
  border: 0;
  background: #f2efff;
  border-radius: 10px;
  padding: 10px
}

.page-shell {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  max-width: 1600px;
  margin: auto;
  min-height: calc(100vh - 160px)
}

.sidebar {
  padding: 28px 16px 32px 24px;
  border-right: 1px solid var(--line);
  background: #fbfbfe
}

.side-label {
  padding: 0 12px;
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: #9a9eb0
}

.side-label-spaced {
  margin-top: 30px
}

.category-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  margin: 3px 0;
  border: 0;
  border-radius: 11px;
  text-align: left;
  color: #686e83;
  background: transparent;
  font-weight: 600;
  font-size: 13px
}

.category-link span {
  font-size: 17px;
  width: 22px;
  text-align: center
}

.category-link b {
  margin-left: auto;
  font-size: 11px;
  color: #a2a5b4;
  font-weight: 600
}

.category-link:hover,
.category-link.active {
  background: #eeeaff;
  color: #6549e8
}

.sidebar-note {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 36px 4px 0;
  padding: 16px;
  border: 1px solid #e6e0ff;
  border-radius: 14px;
  background: linear-gradient(145deg, #f2efff, #fff)
}

.sidebar-note>span {
  font-size: 25px
}

.sidebar-note strong {
  font-size: 12px
}

.sidebar-note small {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted)
}

.main-content {
  min-width: 0;
  padding: 28px clamp(18px, 3.2vw, 48px) 60px
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 278px;
  padding: 38px 5%;
  border-radius: 24px;
  background: linear-gradient(110deg, #191c37 0%, #24214a 58%, #5b45b8 100%);
  color: #fff
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 470px
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
  color: #9383ff
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #67e8a5;
  box-shadow: 0 0 0 4px #67e8a51c
}

.hero h1 {
  font: 700 clamp(34px, 4vw, 52px)/1.04 'Space Grotesk', sans-serif;
  letter-spacing: -2px;
  margin: 13px 0
}

.hero h1 em {
  font-style: normal;
  color: #b9aaff
}

.hero p {
  max-width: 370px;
  color: #c3c5d8;
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 23px
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 12px 17px;
  box-shadow: 0 7px 18px #100b2d55;
  font-size: 12px
}

.primary-btn span {
  font-size: 16px
}

.hero-art {
  position: absolute;
  right: 3%;
  top: 0;
  width: 45%;
  height: 100%;
  min-width: 270px
}

.orbit {
  position: absolute;
  border: 1px solid #b7a8ff40;
  border-radius: 50%;
  transform: rotate(-24deg)
}

.orbit-one {
  width: 320px;
  height: 180px;
  right: 6%;
  top: 18%
}

.orbit-two {
  width: 260px;
  height: 250px;
  right: 16%;
  top: 4%
}

.hero-disc {
  position: absolute;
  right: 24%;
  top: 25%;
  width: 125px;
  height: 125px;
  border-radius: 36px;
  display: grid;
  place-content: center;
  text-align: center;
  transform: rotate(-10deg);
  font: 600 17px/1.15 'Space Grotesk';
  color: #fff;
  background: linear-gradient(135deg, #9178ff, #573bc8);
  box-shadow: 0 20px 50px #0a092d88;
  border: 1px solid #ffffff4a
}

.hero-disc b {
  font-size: 24px
}

.float-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #ffffffed;
  font-size: 29px;
  box-shadow: 0 12px 30px #0d0b2e44
}

.float-card-one {
  right: 63%;
  top: 19%;
  transform: rotate(-12deg)
}

.float-card-two {
  right: 9%;
  top: 23%;
  transform: rotate(10deg)
}

.float-card-three {
  right: 19%;
  bottom: 11%;
  transform: rotate(13deg)
}

.hero-spark {
  position: absolute;
  color: #d4caff;
  font-size: 30px
}

.spark-one {
  right: 8%;
  bottom: 22%
}

.spark-two {
  right: 48%;
  bottom: 15%;
  font-size: 24px
}

.ad-slot {
  min-height: 90px;
  margin: 22px 0 30px;
  border: 1px dashed #d8d4e7;
  border-radius: 13px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 14px
}

.ad-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #a3a3b2
}

.ad-placeholder {
  font-size: 11px;
  color: #a0a3b2
}

.ad-placeholder code {
  font-size: 10px;
  background: #f2f0fa;
  padding: 3px 5px;
  border-radius: 4px
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 0 0 18px
}

.section-heading h2 {
  font: 700 26px 'Space Grotesk', sans-serif;
  letter-spacing: -.7px;
  margin: 6px 0
}

.section-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap
}

.view-controls select {
  max-width: 150px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 9px;
  color: #656a7e;
  font-size: 11px;
  outline: 0
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px
}

.game-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ececf4;
  border-radius: 15px;
  background: var(--card);
  transition: transform .18s, box-shadow .18s;
  position: relative
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px #2620440d
}

.game-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.18;
  background: var(--cover, #e8e5ff);
  overflow: hidden
}

.game-cover:before,
.detail-cover:before {
  content: "";
  position: absolute;
  width: 75%;
  height: 75%;
  border: 1px solid #ffffff8a;
  border-radius: 28%;
  transform: rotate(24deg)
}

.game-emoji {
  position: relative;
  font-size: clamp(32px, 3.2vw, 52px);
  filter: drop-shadow(0 8px 7px #1c20401a);
  transition: transform .2s
}

.game-card:hover .game-emoji {
  transform: scale(1.12) rotate(-5deg)
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #211a4a44;
  opacity: 0;
  transition: opacity .18s
}

.game-card:hover .play-overlay {
  opacity: 1
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--purple);
  font-size: 17px;
  box-shadow: 0 4px 16px #17102e33
}

.game-info {
  padding: 12px 12px 13px
}

.game-title-row {
  display: flex;
  align-items: start;
  gap: 6px
}

.game-title {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1
}

.game-status {
  flex: none;
  border-radius: 4px;
  background: #fff3d9;
  color: #99650a;
  font-size: 8px;
  padding: 3px 4px;
  font-weight: 800
}

.game-status.playable {
  background: #dcfce7;
  color: #167444
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: #9296a8;
  font-size: 10px
}

.game-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.game-meta .arrow {
  font-size: 14px;
  color: #9a8af8
}

.active-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
  color: #7e8497;
  font-size: 12px
}

.filter-chip {
  border: 0;
  border-radius: 20px;
  padding: 6px 10px;
  background: #eeeaff;
  color: #6549e8;
  font-size: 11px
}

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted)
}

.empty-state>span {
  font-size: 38px
}

.empty-state h3 {
  color: var(--ink)
}

.secondary-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 10px 14px;
  color: var(--ink)
}

.seo-copy {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 24px;
  color: #777d90;
  font-size: 12px;
  line-height: 1.8
}

.seo-copy h2 {
  color: #272b3e;
  font: 600 18px 'Space Grotesk'
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 25px clamp(18px, 4vw, 64px);
  background: #fff
}

.footer-brand {
  font-size: 19px
}

.footer-brand .brand-mark {
  width: 27px;
  height: 27px;
  font-size: 12px
}

.footer-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 11px;
  color: #777d90
}

.site-footer p {
  width: 100%;
  margin: 0;
  color: #a0a3b2;
  font-size: 10px
}

.detail-main {
  max-width: 1400px;
  margin: auto;
  padding: 28px clamp(18px, 4vw, 64px) 60px
}

.breadcrumbs {
  font-size: 11px;
  color: #9699a9;
  margin-bottom: 18px
}

.breadcrumbs a {
  color: var(--purple)
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start
}

.detail-title {
  font: 700 clamp(26px, 3vw, 38px)/1.1 'Space Grotesk';
  margin: 0 0 8px;
  letter-spacing: -1px
}

.detail-subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7
}

.game-stage {
  margin-top: 22px;
  background: #171a2c;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 36px #18133312
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: #d9d8e7;
  background: #22263d;
  font-size: 11px
}

.stage-actions {
  display: flex;
  gap: 8px
}

.stage-actions button {
  border: 1px solid #454963;
  border-radius: 7px;
  padding: 7px 10px;
  background: #2b304a;
  color: white;
  font-size: 10px
}

.game-frame {
  display: block;
  width: 100%;
  height: min(62vw, 560px);
  min-height: 330px;
  border: 0;
  background: #f7f8fc
}

.demo-notice {
  padding: 11px 14px;
  background: #fff5d9;
  color: #825a0a;
  font-size: 11px;
  line-height: 1.6
}

.detail-ad {
  margin: 20px 0
}

.detail-description {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px
}

.detail-description h2 {
  font: 700 17px 'Space Grotesk'
}

.detail-description p {
  font-size: 12px;
  line-height: 1.8;
  color: #74798d
}

.detail-sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px
}

.detail-sidebar h3 {
  font: 700 15px 'Space Grotesk';
  margin: 0 0 12px
}

.mini-game-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f6
}

.mini-game-link:last-child {
  border: 0
}

.mini-thumb {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  font-size: 23px;
  flex: none
}

.mini-game-link strong {
  display: block;
  font-size: 11px
}

.mini-game-link small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px
}

.static-page {
  max-width: 850px;
  margin: 50px auto;
  padding: 0 24px;
  min-height: 50vh
}

.static-page h1 {
  font: 700 38px 'Space Grotesk'
}

.static-page p {
  font-size: 14px;
  line-height: 1.9;
  color: #666d80
}

@media(max-width:1200px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }

  .page-shell {
    grid-template-columns: 205px minmax(0, 1fr)
  }

  .hero-art {
    right: 0;
    width: 42%
  }
}

@media(max-width:900px) {
  .page-shell {
    grid-template-columns: 1fr
  }

  .sidebar {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 9;
    padding: 18px;
    background: #fff;
    box-shadow: 0 12px 24px #17152a12;
    border-bottom: 1px solid var(--line)
  }

  .sidebar.open {
    display: block
  }

  .sidebar-note {
    display: none
  }

  .mobile-menu {
    display: block
  }

  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }

  .hero-art {
    opacity: .75;
    right: -7%
  }

  .main-content {
    padding-top: 20px
  }
}

@media(max-width:640px) {
  .site-header {
    height: 65px;
    gap: 12px;
    padding: 0 14px
  }

  .brand {
    font-size: 21px
  }

  .brand-mark {
    width: 30px;
    height: 30px
  }

  .search-form {
    width: auto;
    flex: 1;
    padding: 7px 8px
  }

  .search-form button {
    display: none
  }

  .search-form input {
    font-size: 12px
  }

  .mobile-menu {
    padding: 8px
  }

  .sidebar {
    top: 65px
  }

  .main-content {
    padding: 16px 14px 42px
  }

  .hero {
    min-height: 280px;
    padding: 28px 22px;
    border-radius: 19px
  }

  .hero-copy {
    max-width: 78%
  }

  .hero h1 {
    font-size: 38px
  }

  .hero p {
    font-size: 12px
  }

  .hero-art {
    right: -34%;
    opacity: .55;
    min-width: 260px
  }

  .hero-disc {
    right: 23%;
    width: 100px;
    height: 100px
  }

  .float-card {
    width: 47px;
    height: 47px;
    font-size: 23px
  }

  .ad-slot {
    min-height: 80px;
    margin: 18px 0 25px
  }

  .section-heading {
    align-items: start;
    flex-direction: column
  }

  .section-heading h2 {
    font-size: 23px
  }

  .view-controls {
    width: 100%;
    justify-content: space-between
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px
  }

  .game-cover {
    aspect-ratio: 1.15
  }

  .game-info {
    padding: 10px
  }

  .game-title {
    font-size: 11px
  }

  .game-status {
    font-size: 7px
  }

  .game-meta {
    font-size: 9px
  }

  .site-footer {
    gap: 15px;
    padding: 22px 16px
  }

  .footer-links {
    margin-left: 0
  }

  .detail-main {
    padding: 20px 14px 42px
  }

  .detail-layout {
    grid-template-columns: 1fr
  }

  .detail-sidebar {
    order: 3
  }

  .game-frame {
    height: 64vh;
    min-height: 340px
  }

  .detail-title {
    font-size: 29px
  }

  .static-page {
    margin: 30px auto
  }

  .static-page h1 {
    font-size: 30px
  }
}

/*===== 新增：详情页侧边栏组件（仅缺失部分，不覆盖原有detail-sidebar/mini-game-link）=====*/
.sidebar-box {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.sidebar-box:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ad-caption {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  text-align: center;
  /* 广告标签文字居中 */
}
/* ----- 游戏封面图片【全新类，无冲突】 ----- */
.game-cover-img {
  width: 100%;
  height: 100%;
  object-fit: contain;  /* 核心：完整放进去，不变形，不裁切 */
  object-position: center;
  background-color: var(--cover-bg, #3498db); /* 留白填充底色，和原图蓝色接近 */
  position: absolute;
  inset: 0;
}

.mini-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  position: absolute;
  inset: 0;
}

/* 补充原有mini‑thumb缺失属性，追加，不覆盖原有样式 */
.mini-thumb {
  position: relative;
  overflow: hidden;
}

.mini-emoji {
  position: relative;
}


/* Shared sitewide ad placements */
.shared-ad { width: min(100% - 36px, 1200px); margin: 16px auto 22px; min-height: 90px; }
.shared-ad-bottom { margin-top: 28px; margin-bottom: 0; }
.detail-right-ad { min-height: 250px; margin: 10px 0 18px; }
.detail-sidebar .sidebar-box { min-width: 0; }
.game-unavailable { display: grid; place-items: center; padding: 24px; color: #666; text-align: center; }
.provider-credit { font-size: 12px; }
.provider-credit a { color: var(--purple); text-decoration: underline; }
@media (max-width: 900px) { .shared-ad { width: calc(100% - 28px); min-height: 70px; } .detail-right-ad { min-height: 180px; } }


/* Clear diagnostic label for the active game catalog source. */
.catalog-source-row{display:flex;justify-content:flex-end;margin:0 0 12px}
.catalog-source-badge{display:inline-flex;align-items:center;padding:6px 10px;border:1px solid #d1d5db;border-radius:999px;background:#f3f4f6;color:#4b5563;font-size:10px;font-weight:800;letter-spacing:.06em}
.catalog-source-badge.catalog-source-live{background:#ecfdf5;border-color:#a7f3d0;color:#047857}
.catalog-source-badge.catalog-source-warning{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
