/* ============================================================
   GameHub — PlayStation-inspired design system
   ============================================================ */

:root {
  /* colors */
  --primary:           #0070d1;
  --primary-pressed:   #0064b7;
  --primary-active:    #004d8d;
  --on-primary:        #ffffff;
  --link-light:        #0064b7;
  --link-dark:         #53b1ff;
  --commerce:          #d53b00;
  --commerce-pressed:  #aa2f00;

  --ink:               #000000;
  --ink-deep:          #121314;
  --ink-elevated:      #181818;
  --charcoal:          #1f2024;

  --body-light:        rgba(0,0,0,0.6);
  --mute-light:        #6b6b6b;
  --ash-light:         #cccccc;
  --body-dark:         rgba(255,255,255,0.7);
  --mute-dark:         rgba(229,229,229,0.55);
  --ash-dark:          rgba(229,229,229,0.2);

  --canvas-light:      #ffffff;
  --surface-soft:      #f3f3f3;
  --surface-card:      #f5f7fa;
  --surface-filter:    rgba(245,247,250,0.3);

  --canvas-dark:       #000000;
  --surface-dark-elevated: #121314;
  --surface-dark-card: #181818;

  --hairline-light:    #f3f3f3;
  --hairline-dark:     rgba(229,229,229,0.2);
  --on-dark:           #ffffff;
  --on-dark-mute:      #cccccc;

  --warning:           #c81b3a;

  /* radius */
  --r-none: 0px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-full: 9999px;

  /* spacing */
  --s-xxs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-xxl: 48px;
  --s-section: 96px;

  /* type */
  --font-display: 'Roboto','Helvetica Neue',Arial,sans-serif;
  --font-body:    'Inter','Helvetica Neue',Arial,sans-serif;

  --t-display-xl: 300 54px/1.25 var(--font-display);
  --t-display-lg: 300 44px/1.25 var(--font-display);
  --t-display-md: 300 35px/1.25 var(--font-display);
  --t-heading-xl: 300 28px/1.25 var(--font-display);
  --t-heading-lg: 300 22px/1.25 var(--font-display);
  --t-heading-md: 600 18px/1   var(--font-body);
  --t-body-md:    400 18px/1.5 var(--font-body);
  --t-body-strong:500 18px/1.25 var(--font-body);
  --t-body-sm:    400 16px/1.5 var(--font-body);
  --t-caption-md: 400 14px/1.5 var(--font-body);
  --t-caption-sm: 500 12px/1.5 var(--font-body);
  --t-button-lg:  700 18px/1.25 var(--font-body);
  --t-button-md:  700 14px/1.25 var(--font-body);
}

/* ===== reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  font: var(--t-body-md);
  color: var(--ink);
  background: var(--canvas-light);
  font-feature-settings: "ss01" on, "cv11" on;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ===== logo 通用样式（响应式 + 自适应颜色） ===== */
.logo {
  display: block;
  width: auto;
  height: 32px;          /* 默认桌面尺寸 */
  max-width: 100%;
  color: inherit;        /* 跟随父元素的 color，配合 fill="currentColor" */
  fill: currentColor;    /* Safari 等浏览器对 inline SVG 的兼容 */
}
@media (max-width: 768px) {
  .logo { height: 28px; }   /* 手机端稍小 */
}
@media (max-width: 480px) {
  .logo { height: 24px; }
}
.logo--light  { color: var(--ink); }      /* 浅色背景用黑色 logo */
.logo--dark   { color: var(--on-dark); }  /* 深色背景用白色 logo */

/* ===== layout ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--s-lg); }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 var(--s-lg); }

/* ===== primary nav ===== */
.nav {
  background: var(--canvas-dark);
  color: var(--on-dark);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-xl);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav__brand {
  font: var(--t-heading-md);
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  gap: var(--s-sm);
}
.nav__brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--primary);
  display: grid;
  place-items: center;
  color: var(--on-primary);
  font-weight: 700;
  font-size: 14px;
}
.nav__menu {
  display: flex;
  gap: var(--s-lg);
  list-style: none;
  margin: 0;
  padding: 0;
  font: var(--t-body-strong);
}
.nav__menu a { color: var(--on-dark); opacity: 0.75; transition: opacity .15s; }
.nav__menu a:hover, .nav__menu a.is-active { opacity: 1; }
.nav__icons { display: flex; gap: var(--s-md); }
.nav__icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: transparent; border: none; color: var(--on-dark);
  display: grid; place-items: center; padding: 0;
}
.nav__icon-btn:hover { background: rgba(255,255,255,0.08); }
.nav__hamburger { display: none; }

/* ===== hero band: dark ===== */
.hero-band-dark {
  background: var(--canvas-dark);
  color: var(--on-dark);
  padding: var(--s-section) var(--s-xxl);
  position: relative;
  overflow: hidden;
}
.hero-band-dark__inner {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 1.3fr;
  gap: var(--s-xxl);
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
}
.hero-band-dark h1 {
  font: var(--t-display-xl);
  margin: 0 0 var(--s-md);
  letter-spacing: -0.5px;
}
.hero-band-dark .eyebrow {
  font: var(--t-caption-sm);
  letter-spacing: 4px;
  color: var(--mute-dark);
  margin-bottom: var(--s-md);
  text-transform: uppercase;
}
.hero-band-dark p {
  font: var(--t-body-md);
  color: var(--body-dark);
  max-width: 480px;
  margin: 0 0 var(--s-xl);
}
.hero-band-dark__visual {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-dark-elevated);
  position: relative;
}
.hero-band-dark__visual svg { width: 100%; height: 100%; }

/* ===== button system ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-xs);
  height: 48px;
  padding: 12px 28px;
  border-radius: var(--r-full);
  font: var(--t-button-lg);
  border: 1px solid transparent;
  transition: background-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-pressed); }
.btn--primary:active { background: var(--primary-active); }
.btn--commerce { background: var(--commerce); color: var(--on-primary); }
.btn--commerce:hover { background: var(--commerce-pressed); }
.btn--ghost-light { background: transparent; color: var(--ink); border-color: var(--ash-light); }
.btn--ghost-light:hover { background: var(--surface-soft); }
.btn--ghost-dark  { background: transparent; color: var(--on-dark); border-color: var(--hairline-dark); }
.btn--ghost-dark:hover  { background: rgba(255,255,255,0.06); }
.btn--sm { height: 36px; padding: 8px 16px; font: var(--t-button-md); }

/* ===== sub nav / filter pills ===== */
.subnav {
  background: var(--canvas-dark);
  color: var(--on-dark);
  border-top: 1px solid var(--hairline-dark);
}
.subnav__inner {
  display: flex;
  gap: var(--s-sm);
  align-items: center;
  padding: 12px var(--s-xl);
  overflow-x: auto;
  max-width: 1440px;
  margin: 0 auto;
  scrollbar-width: thin;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  height: 36px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: var(--surface-filter);
  color: var(--ink);
  font: var(--t-button-md);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.pill--on-dark { color: var(--on-dark); background: rgba(255,255,255,0.06); }
.pill--on-dark:hover { background: rgba(255,255,255,0.12); }
.pill.is-active {
  background: var(--canvas-light);
  color: var(--ink);
}
.pill--on-dark.is-active {
  background: var(--on-dark);
  color: var(--ink);
}
.subnav__count {
  margin-left: auto;
  color: var(--mute-dark);
  font: var(--t-caption-md);
}

/* ===== section padding & headings ===== */
.section { padding: var(--s-section) 0; }
.section--light { background: var(--canvas-light); color: var(--ink); }
.section--dark  { background: var(--canvas-dark); color: var(--on-dark); }
.section--blue  { background: var(--primary); color: var(--on-primary); }

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-lg);
  margin-bottom: var(--s-xl);
}
.section__title {
  font: var(--t-display-lg);
  margin: 0;
  letter-spacing: -0.2px;
}
.section__kicker {
  font: var(--t-caption-sm);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--mute-light);
  margin-bottom: var(--s-xs);
}
.section--dark .section__kicker { color: var(--mute-dark); }
.section__subtitle {
  font: var(--t-body-md);
  color: var(--body-light);
  max-width: 520px;
  margin: var(--s-xs) 0 0;
}
.section--dark .section__subtitle { color: var(--body-dark); }

/* ===== game tile grid ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-lg);
}
@media (max-width: 1024px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .game-grid { grid-template-columns: 1fr; } }

.game-tile {
  background: var(--surface-dark-elevated);
  color: var(--on-dark);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  border: 1px solid transparent;
}
.game-tile:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.game-tile__cover {
  aspect-ratio: 16 / 9;
  background: var(--surface-dark-card);
  overflow: hidden;
  position: relative;
}
.game-tile__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-tile__cover svg { width: 100%; height: 100%; }
.game-tile__body {
  padding: var(--s-md);
  display: flex;
  flex-direction: column;
  gap: var(--s-xs);
}
.game-tile__id {
  font: var(--t-caption-sm);
  color: var(--mute-dark);
  letter-spacing: 2px;
}
.game-tile__title {
  font: var(--t-heading-md);
  margin: 0;
}
.game-tile__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-xs);
}
.game-tile__cat {
  font: var(--t-caption-md);
  color: var(--mute-dark);
}
.game-tile__badge {
  position: absolute;
  top: var(--s-sm);
  left: var(--s-sm);
  background: var(--primary);
  color: var(--on-primary);
  font: var(--t-caption-sm);
  padding: 4px 10px;
  border-radius: var(--r-full);
  letter-spacing: 0.5px;
}
.game-tile__badge--commerce { background: var(--commerce); }
.game-tile__badge--soon { background: rgba(255,255,255,0.85); color: var(--ink); }
.game-tile.is-soon { opacity: 0.55; filter: grayscale(0.5); }
.game-tile.is-soon:hover { transform: none; box-shadow: none; cursor: not-allowed; }
.game-tile.is-soon .game-tile__fav { display: none; }
.game-tile__fav {
  position: absolute;
  top: var(--s-sm);
  right: var(--s-sm);
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: rgba(0,0,0,0.55);
  border: none; color: var(--on-dark);
  display: grid; place-items: center;
  backdrop-filter: blur(8px);
}
.game-tile__fav.is-on { color: var(--commerce); }

/* ===== product / feature card ===== */
.feature-card {
  background: var(--canvas-light);
  padding: var(--s-xl);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: var(--s-md);
  border: 1px solid var(--hairline-light);
}
.feature-card__icon {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: var(--surface-card);
  display: grid; place-items: center;
  font-size: 24px;
}
.feature-card__title { font: var(--t-heading-lg); margin: 0; }
.feature-card__body  { font: var(--t-body-md); color: var(--body-light); margin: 0; }
.feature-card__cta   { color: var(--link-light); font: var(--t-link-md, var(--t-body-md)); }

/* ===== hero band: light (console showcase) ===== */
.hero-band-light {
  background: var(--canvas-light);
  color: var(--ink);
  padding: var(--s-section) 0;
}
.hero-band-light__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--s-xxl);
  align-items: center;
}
.hero-band-light h2 {
  font: var(--t-display-xl);
  margin: 0 0 var(--s-md);
}
.hero-band-light p {
  color: var(--body-light);
  margin: 0 0 var(--s-xl);
  max-width: 480px;
}
.hero-band-light__thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-sm);
  margin-top: var(--s-lg);
}

/* ===== PS Plus-style tier banner ===== */
.tier-band {
  background: linear-gradient(135deg, var(--surface-dark-elevated) 0%, var(--canvas-dark) 100%);
  color: var(--on-dark);
  padding: var(--s-section) 0;
}
.tier-band__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s-xxl);
  align-items: center;
}
.tier-card {
  background: var(--surface-dark-card);
  padding: var(--s-xxl) var(--s-xl);
  border-radius: var(--r-md);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-lg);
}
.tier-card__col h3 {
  font: var(--t-heading-xl);
  margin: 0 0 var(--s-xs);
  background: linear-gradient(90deg, var(--ps-gold-1, #ffce21), var(--ps-gold-3, #ee8e00));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tier-card__col p { color: var(--body-dark); margin: 0 0 var(--s-md); font: var(--t-body-sm); }

/* ===== 30 years banner ===== */
.years-banner {
  background: var(--canvas-light);
  color: var(--ink);
  padding: var(--s-section) 0;
  text-align: center;
}
.years-banner h2 { font: var(--t-display-md); margin: 0 0 var(--s-sm); }
.years-banner p  { font: var(--t-body-md); color: var(--body-light); margin: 0 auto var(--s-xl); max-width: 640px; }

/* ===== on playstation strip ===== */
.on-ps {
  background: linear-gradient(180deg, var(--surface-dark-elevated), var(--canvas-dark));
  color: var(--on-dark);
  padding: var(--s-xxl) 0;
}
.on-ps__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-xl);
  flex-wrap: wrap;
}
.on-ps h2 { font: var(--t-display-md); margin: 0; }

/* ===== news strip ===== */
.news-strip {
  background: var(--canvas-light);
  color: var(--ink);
  padding: var(--s-section) 0;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-lg);
}
@media (max-width: 1024px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  background: var(--surface-card);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--hairline-light);
}
.news-card__img {
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
}
.news-card__body { padding: var(--s-md); display: flex; flex-direction: column; gap: var(--s-xs); }
.news-card__date { font: var(--t-caption-sm); color: var(--mute-light); letter-spacing: 1px; text-transform: uppercase; }
.news-card__title { font: var(--t-heading-md); margin: 0; }

/* ===== footer ===== */
.footer {
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--s-xxl) var(--s-xl);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: var(--s-xl);
  max-width: 1440px;
  margin: 0 auto;
}
.footer__brand {
  font: var(--t-display-md);
  margin: 0 0 var(--s-md);
  letter-spacing: -0.5px;
}
.footer__col h4 {
  font: var(--t-caption-sm);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 var(--s-md);
  opacity: 0.85;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-xs); }
.footer__col a { color: var(--on-primary); font: var(--t-caption-md); opacity: 0.85; }
.footer__col a:hover { opacity: 1; text-decoration: underline; }
.footer__bottom {
  max-width: 1440px;
  margin: var(--s-xl) auto 0;
  padding-top: var(--s-md);
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: var(--t-caption-sm);
  color: rgba(255,255,255,0.85);
}
.footer__socials { display: flex; gap: var(--s-sm); }
.footer__socials a {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.12);
  display: grid; place-items: center;
}
.footer__socials a:hover { background: rgba(255,255,255,0.24); }

@media (max-width: 1024px) {
  .footer__inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: var(--s-md); align-items: flex-start; }
}

/* ===== search overlay ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh var(--s-xl);
  backdrop-filter: blur(8px);
}
.search-overlay.is-open { display: flex; }
.search-overlay__panel {
  width: 100%;
  max-width: 720px;
  background: var(--canvas-light);
  border-radius: var(--r-md);
  padding: var(--s-xl);
  display: flex;
  flex-direction: column;
  gap: var(--s-lg);
}
.search-overlay__input {
  height: 56px;
  border-radius: var(--r-full);
  border: 1px solid var(--ash-light);
  padding: 0 var(--s-lg);
  font: var(--t-body-md);
  outline: none;
}
.search-overlay__input:focus { border-color: var(--primary); border-width: 2px; padding: 0 calc(var(--s-lg) - 1px); }
.search-overlay__results {
  display: flex;
  flex-direction: column;
  gap: var(--s-xs);
  max-height: 50vh;
  overflow-y: auto;
}
.search-overlay__hit {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  padding: var(--s-sm);
  border-radius: var(--r-sm);
  color: var(--ink);
}
.search-overlay__hit:hover, .search-overlay__hit.is-focused { background: var(--surface-card); }
.search-overlay__hit-cover {
  width: 56px; height: 32px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.search-overlay__hit-title { font: var(--t-body-strong); }
.search-overlay__hit-sub   { font: var(--t-caption-md); color: var(--mute-light); }

/* ===== misc ===== */
.empty-state {
  padding: var(--s-xxl);
  text-align: center;
  color: var(--mute-light);
  font: var(--t-body-md);
}
.section--dark .empty-state { color: var(--mute-dark); }

.kbd {
  font: var(--t-caption-sm);
  background: var(--surface-soft);
  color: var(--mute-light);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--ash-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ===== responsive hero ===== */
@media (max-width: 1024px) {
  .hero-band-dark__inner,
  .hero-band-light__inner,
  .tier-band__inner {
    grid-template-columns: 1fr;
  }
  .hero-band-dark { padding: 64px var(--s-lg); }
  .hero-band-light__thumbs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  :root {
    --s-section: 64px;
  }
  .hero-band-dark h1 { font-size: 36px; }
  .hero-band-light h2 { font-size: 36px; }
  .section__title { font-size: 32px; }
  .nav__menu { display: none; }
  .nav__hamburger { display: grid; }
  .hero-band-light__thumbs { grid-template-columns: repeat(2, 1fr); }
  .tier-card { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  :root { --s-section: 48px; }
  .hero-band-dark h1 { font-size: 28px; }
  .hero-band-light h2 { font-size: 28px; }
  .section__title { font-size: 28px; }
  .section__head { flex-direction: column; align-items: stretch; }
}