@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=Syne:wght@600;700;800&display=swap');

:root {
  --space-dark: #0c0b10;
  --space-blue: #1a1724;
  --star-white: #f4f0ff;
  --nebula-pink: #ff6b4a;
  --comet-cyan: #b4ff39;
  --sun-gold: #ffd24a;
  --planet-purple: #a855f7;
  --shadow-glow: 0 10px 40px rgba(180, 255, 57, 0.12);
  --g14-border: 3px solid var(--star-white);
  --g14-radius: 14px;
  --transition-fast: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--space-dark);
  color: var(--star-white);
  font-family: 'DM Sans', system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  margin-top: 0;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.brief-comment-game {
  margin: 0;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.85rem;
  color: rgba(244, 240, 255, 0.65);
}

.module-description {
  margin: 0 0 1.25rem;
  line-height: 1.6;
  color: rgba(244, 240, 255, 0.75);
  max-width: 65ch;
}

/* Breadcrumb */
.breadcrumb-nav { margin: 20px 0; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a,
.breadcrumb-item span[aria-current="page"] {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--comet-cyan);
  padding: 4px 10px;
  border: 2px solid rgba(180, 255, 57, 0.35);
  border-radius: 6px;
}

.breadcrumb-item a:hover {
  background: rgba(180, 255, 57, 0.12);
}

.breadcrumb-separator {
  color: var(--planet-purple);
  font-weight: 700;
  user-select: none;
}

/* Header */
header {
  height: 72px;
  background: rgba(12, 11, 16, 0.92);
  border-bottom: var(--g14-border);
  border-left: none;
  border-right: none;
  border-top: none;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  backdrop-filter: blur(12px);
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-text {
  background: linear-gradient(90deg, var(--comet-cyan), var(--planet-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-desktop { display: flex; gap: 24px; min-width: 0; }

.nav-link {
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: var(--nebula-pink);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: var(--space-blue);
  border-top: var(--g14-border);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  font-size: 1.35rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.mobile-nav-item.active {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px var(--comet-cyan));
}

/* Footer */
footer {
  background: var(--space-blue);
  margin-top: auto;
  position: relative;
  padding: 56px 0 24px;
  border-top: var(--g14-border);
}

/* 详情页：弹层在 footer 之后时，页脚顶边与上方广告留出间距 */
footer:has(+ #game-modal)::before {
  content: '';
  position: absolute;
  top: -28px;
  left: 0;
  right: 0;
  height: 28px;
  pointer-events: none;
}

.footer-wave { display: none; }

.footer-content {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col > div:first-child {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--comet-cyan);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-col p,
.footer-col li {
  font-size: 0.9rem;
  line-height: 1.65;
  opacity: 0.85;
}

.footer-col ul li { margin-bottom: 8px; }

.footer-col a:hover { color: var(--comet-cyan); }

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.footer-social-link {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border: 2px solid rgba(244, 240, 255, 0.25);
  border-radius: 999px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.footer-social-link:hover {
  background: var(--comet-cyan);
  color: var(--space-dark);
  border-color: var(--comet-cyan);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(244, 240, 255, 0.1);
  font-size: 0.75rem;
  opacity: 0.55;
}

/* Hero */
.hero {
  min-height: 420px;
  margin-top: 72px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(168, 85, 247, 0.35), transparent),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(255, 107, 74, 0.2), transparent),
    var(--space-dark);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.15) 3px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 48px;
  padding-bottom: 48px;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 12px;
  text-shadow: 4px 4px 0 var(--planet-purple);
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 24px;
}

.g14-hero-search {
  display: flex;
  gap: 10px;
  max-width: 100%;
  margin: 0 auto 20px;
}

.g14-hero-search .form-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  background: var(--space-blue);
  color: var(--star-white);
  font: inherit;
  outline: none;
}

.g14-hero-search .form-input:focus {
  border-color: var(--comet-cyan);
  box-shadow: 0 0 0 3px rgba(180, 255, 57, 0.25);
}

.hero-cta {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--comet-cyan);
  color: var(--space-dark);
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  box-shadow: 6px 6px 0 var(--nebula-pink);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--nebula-pink);
}

/* Featured bento (portholes) */
.portholes.g14-bento {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: repeat(2, minmax(140px, 200px));
  gap: 14px;
  margin: 32px auto 48px;
  max-width: 1100px;
}

.porthole {
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  overflow: hidden;
  position: relative;
  display: block;
  box-shadow: 8px 8px 0 rgba(168, 85, 247, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.porthole.g14-porthole--0 {
  grid-row: 1 / -1;
}

.porthole:hover {
  transform: translate(-3px, -3px);
  box-shadow: 11px 11px 0 var(--comet-cyan);
}

.porthole img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.g14-porthole-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 11, 16, 0.88) 100%);
  color: var(--star-white);
}

.g14-porthole-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.porthole.g14-porthole--0 .g14-porthole-title {
  font-size: 1.05rem;
}

.g14-porthole-meta .game-star {
  color: var(--sun-gold);
  display: flex;
  width: 100%;
  margin-top: 4px;
}

/* Modules */
.daily-special {
  padding: 24px 0 40px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.section-header-row h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin: 0;
}

.g14-section-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--space-dark);
  background: var(--nebula-pink);
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 10px;
  vertical-align: middle;
}

.module-link-more {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--comet-cyan);
  border-bottom: 2px solid var(--comet-cyan);
  padding-bottom: 2px;
}

.module-link-more:hover { color: var(--nebula-pink); border-color: var(--nebula-pink); }

.special-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.special-card,
.carousel-card {
  background: var(--space-blue);
  border: 2px solid rgba(244, 240, 255, 0.12);
  border-radius: var(--g14-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.special-card:hover,
.carousel-card:hover {
  transform: translateY(-4px);
  border-color: var(--comet-cyan);
  box-shadow: var(--shadow-glow);
}

.special-card-img,
.carousel-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.special-card-content,
.carousel-card-content {
  padding: 14px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.special-card-content h3,
.carousel-card-content h3 {
  font-size: 0.95rem;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g14-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  margin: 0 0 8px;
}

.g14-tag-chip {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--planet-purple);
}

/* Carousel */
.special-carousel {
  position: relative;
  padding: 8px 0 16px;
}

.carousel-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-container::-webkit-scrollbar { display: none; }

.carousel-card { flex: 0 0 280px; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: var(--g14-border);
  border-radius: 50%;
  background: var(--space-dark);
  color: var(--star-white);
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.carousel-btn:hover {
  background: var(--comet-cyan);
  color: var(--space-dark);
}

.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

/* Genre rail (orbit-categories) */
.orbit-categories.g14-genre-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 48px 20px 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.orbit-categories .planet.g14-genre-chip {
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--space-blue);
  border: 2px solid rgba(244, 240, 255, 0.2);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.orbit-categories .planet.g14-genre-chip:hover {
  transform: translateY(-3px);
  border-color: var(--comet-cyan);
  background: rgba(180, 255, 57, 0.1);
}

.orbit-categories .planet.g14-genre-chip:nth-child(6n+1) { border-color: var(--comet-cyan); }
.orbit-categories .planet.g14-genre-chip:nth-child(6n+2) { border-color: var(--nebula-pink); }
.orbit-categories .planet.g14-genre-chip:nth-child(6n+3) { border-color: var(--planet-purple); }

/* Detail */
.game-detail-container {
  padding-top: 96px;
  padding-bottom: 28px;
}

.game-hero {
  display: grid;
  grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 40px;
}

.game-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  box-shadow: 10px 10px 0 var(--planet-purple);
}

.game-info h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 12px; }

.game-info .game-star--detail-hero {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
}

.tags-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.tag-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 12px;
  background: var(--planet-purple);
  border-radius: 6px;
}

.btn-launch {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 36px;
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  background: var(--nebula-pink);
  color: var(--star-white);
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--comet-cyan);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-launch:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--comet-cyan);
}

.detail-content-section { margin-top: 20px; }

.tab-btn {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 10px 18px;
  border: 2px solid rgba(244, 240, 255, 0.2);
  border-radius: var(--g14-radius);
  background: transparent;
  color: var(--star-white);
  cursor: pointer;
}

.tab-btn.active {
  background: var(--comet-cyan);
  color: var(--space-dark);
  border-color: var(--comet-cyan);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.detail-split-block {
  padding: 20px 0;
  border-bottom: 2px dashed rgba(244, 240, 255, 0.12);
}

.detail-split-block h2 {
  font-size: 1.1rem;
  color: var(--comet-cyan);
  margin-bottom: 12px;
}

.detail-split-block p,
.detail-split-block .rich-content {
  line-height: 1.75;
  opacity: 0.9;
}

#game-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 11, 16, 0.94);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#game-modal.is-open { display: flex; }

.g14-modal-panel {
  width: min(1200px, 100%);
  height: min(90vh, 800px);
  background: var(--space-blue);
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  position: relative;
  overflow: hidden;
  box-shadow: 12px 12px 0 var(--planet-purple);
}

.g14-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: var(--g14-border);
  border-radius: 50%;
  background: var(--space-dark);
  color: var(--star-white);
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
}

.g14-modal-close:hover { background: var(--nebula-pink); }

#game-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.game-empty {
  margin: 48px auto;
  padding: 48px 32px;
  max-width: 520px;
  text-align: center;
  background: var(--space-blue);
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  box-shadow: 8px 8px 0 var(--nebula-pink);
}

.game-empty-title,
.game-empty h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  color: var(--comet-cyan);
  margin: 16px 0 8px;
}

.empty-orbit {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border: 3px dashed var(--comet-cyan);
  border-radius: 8px;
  animation: g14-pulse 2s ease-in-out infinite;
}

@keyframes g14-pulse {
  50% { box-shadow: 0 0 20px rgba(180, 255, 57, 0.4); }
}

/* Tags */
.tags-box { padding-top: 96px; padding-bottom: 40px; }

.tags-layout { display: flex; gap: 28px; }

/* 广告在上方时，由内容区顶边留白（不包裹广告） */
.tags-box > * + .tags-layout {
  margin-top: 28px;
}

/* 广告在下方时，由内容区底边留白（不包裹广告） */
.tags-box > .tags-layout:not(:last-child) {
  padding-bottom: 28px;
}

/* 详情页：容器内首块为广告时，与正文间距 */
.game-detail-container > *:first-child + * {
  margin-top: 28px;
}

.g14-detail-related {
  margin: 48px auto 0;
  padding-bottom: 28px;
  display: flow-root;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--space-blue);
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  padding: 20px;
}

.sidebar-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--comet-cyan);
  margin-bottom: 16px;
}

.category-list { display: flex; flex-direction: column; gap: 6px; }

.category-item {
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 2px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.category-item:hover,
.category-item.active {
  background: rgba(180, 255, 57, 0.1);
  border-color: var(--comet-cyan);
}

.tags-main { flex: 1; min-width: 0; }

.tags-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.g14-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tags-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(244, 240, 255, 0.1);
}

.tags-header h1 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin: 0 0 6px;
}

.tag-h2 {
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(244, 240, 255, 0.65);
  margin: 0;
  line-height: 1.5;
}

.g14-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  line-height: 1;
  font: inherit;
  color: inherit;
  background: var(--space-blue);
  border: 2px solid rgba(244, 240, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  vertical-align: middle;
  transition: border-color var(--transition-fast);
}

.g14-view-btn:hover,
.g14-view-btn.is-active {
  border-color: var(--comet-cyan);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.game-card {
  background: var(--space-blue);
  border: 2px solid rgba(244, 240, 255, 0.1);
  border-radius: var(--g14-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--comet-cyan);
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-content { padding: 12px 14px; }

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta { font-size: 0.8rem; color: rgba(244, 240, 255, 0.7); }

.filter-toggle-btn {
  display: none;
  height: 40px;
  padding: 0 16px;
  margin: 0;
  box-sizing: border-box;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  background: var(--comet-cyan);
  color: var(--space-dark);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.games-grid.list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

.games-grid.list-view .game-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 130px;
}

.games-grid.list-view .card-img {
  width: 220px;
  max-width: 38%;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  align-self: center;
}

.games-grid.list-view .card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.games-grid.list-view .card-title {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.games-grid.list-view .card-meta {
  min-width: 0;
}

/* Legal */
.g14-legal-ad {
  margin-top: 88px;
}

.legal-container {
  max-width: 800px;
  margin: 88px auto 40px;
  padding: 32px 36px;
  background: var(--space-blue);
  border: var(--g14-border);
  border-radius: var(--g14-radius);
  line-height: 1.75;
}

/* 法律页：广告下方内容区仅留小间距（避免与 .legal-container 顶边距叠加） */
.container > * + .legal-container {
  margin-top: 24px;
}

.legal-container h1,
.legal-container h2 {
  color: var(--comet-cyan);
}

/* star_html 统一渲染 */
.game-star,
.game-star .star-rating,
.star-rating {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  font-size: 0.88rem;
  line-height: 1;
  color: var(--sun-gold);
  min-height: 1.25em;
}

.game-star .star-icon,
.game-star .star-full,
.game-star .star-empty,
.game-star .star-half,
.game-star .fa,
.game-star .fas,
.game-star .far,
.game-star i,
.star-rating .star-icon,
.star-rating i {
  display: inline-block;
  font-style: normal;
  font-size: 1em;
  line-height: 1;
  color: inherit;
}

.game-star .star-icon::before,
.game-star .star-full::before,
.game-star .fa-star::before,
.game-star .star-rating .star-icon::before,
.game-star .star-rating .star-full::before,
.game-star .star-rating .fa-star::before,
.star-rating .star-icon::before,
.star-rating .star-full::before {
  content: "★";
}

.game-star .star-empty::before,
.game-star .fa-star-o::before,
.game-star .far.fa-star::before,
.game-star .star-rating .star-empty::before,
.game-star .star-rating .fa-star-o::before,
.star-rating .star-empty::before {
  content: "☆";
}

.g14-porthole-meta .game-star,
.special-card-content .game-star,
.carousel-card-content .game-star,
.card-meta > .game-star {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
  margin: 0 0 6px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.card-meta > .brief-comment-game {
  width: 100%;
}

.game-title,
.card-title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 1024px) {
  .special-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { display: none; }
  .sidebar.mobile-active {
    display: block;
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    width: auto;
    z-index: 900;
  }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-toggle-btn { display: block; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .mobile-nav { display: flex; }
  .hero { min-height: 360px; }
  .hero-title { text-shadow: 3px 3px 0 var(--planet-purple); }
  .g14-hero-search { flex-direction: column; }
  .g14-hero-search .hero-cta { width: 100%; text-align: center; }
  .portholes.g14-bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .porthole.g14-porthole--0 { grid-row: auto; }
  .game-hero { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-content { grid-template-columns: 1fr; }
  .tags-header { flex-direction: column; }
  .games-grid.list-view .game-card {
    flex-direction: column;
    min-height: 0;
  }
  .games-grid.list-view .card-img {
    width: 100%;
    max-width: none;
    flex-shrink: 0;
    align-self: stretch;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
  .carousel-card { flex: 0 0 200px; }
  .legal-container { margin-top: 80px; margin-bottom: 32px; padding: 24px 20px; }
  .container > * + .legal-container { margin-top: 20px; }
}
