:root {
  --page-bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --line: #d8e0ea;
  --line-soft: #e8edf4;
  --text: #1f2937;
  --muted: #6b7280;
  --teal: #2f8f8f;
  --teal-deep: #246f70;
  --teal-soft: #e8f5f4;
  --shadow: 0 14px 30px rgba(25, 40, 58, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-page: 420px;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  background: var(--page-bg);
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
}

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

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, var(--max-page));
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 247, 251, 0.96)),
    var(--page-bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 36px 1fr 36px auto;
  gap: 10px;
  align-items: center;
  padding: 14px 14px 10px;
  background: rgba(245, 247, 251, 0.94);
  backdrop-filter: blur(14px);
}

.icon-button,
.login-link {
  height: 36px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #566173;
  box-shadow: 0 2px 4px rgba(36, 49, 66, 0.03);
}

.icon-button {
  padding: 0;
  cursor: pointer;
}

.icon-button span {
  width: 14px;
  height: 1.6px;
  border-radius: 999px;
  background: currentColor;
  display: block;
  margin: 1.8px 0;
}

.icon-button svg,
.searchbar svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #8c97a8;
}

.searchbar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.searchbar input::placeholder {
  color: #97a1b1;
}

.title-icon {
  display: inline-flex;
  margin-right: 8px;
  color: var(--teal);
  font-weight: 700;
}

.login-link {
  padding: 0 14px;
  font-size: 0.95rem;
}

.page-content {
  padding: 10px 14px 28px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border-radius: var(--radius-lg);
  padding: 18px;
  color: #fff;
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 30%),
    linear-gradient(145deg, rgba(25, 43, 68, 0.86), rgba(38, 116, 112, 0.94));
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 14, 24, 0.1), rgba(7, 14, 24, 0.5)),
    var(--hero-image, linear-gradient(135deg, #548f92, #263d54));
  background-size: cover;
  background-position: center;
  opacity: 0.92;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-cover-badge {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 86px;
}

.hero-cover-badge span {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.hero-subtitle {
  margin: 8px 0 14px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: var(--teal-deep);
  font-weight: 600;
}

.hero-price {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.hero-price span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
}

.hero-price strong {
  font-size: 1.2rem;
}

.hero-pagination {
  display: flex;
  gap: 7px;
  margin-top: 16px;
}

.hero-pagination button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.32);
}

.hero-pagination button.is-active {
  width: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.notice-section,
.shelf-section {
  margin-top: 18px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 700;
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-card,
.game-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.03);
}

.notice-card {
  padding: 14px;
}

.notice-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.notice-pin {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  font-weight: 600;
}

.notice-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.shelf-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.shelf-arrows {
  display: flex;
  gap: 8px;
}

.arrow {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #7b8794;
}

.arrow[disabled] {
  opacity: 0.45;
}

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

.game-card {
  overflow: hidden;
  cursor: pointer;
}

.game-cover {
  height: 112px;
  background:
    linear-gradient(180deg, transparent, rgba(9, 17, 29, 0.25)),
    var(--cover-gradient, linear-gradient(135deg, #73919b, #395469));
}

.game-cover.placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

.game-body {
  padding: 12px;
}

.game-name {
  margin: 0 0 9px;
  font-size: 0.94rem;
  line-height: 1.4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #617083;
  font-size: 0.73rem;
}

.empty-card {
  padding: 20px 14px;
  border-radius: var(--radius-md);
  border: 1px dashed #c9d4e2;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
}

.footer {
  padding: 12px 14px 20px;
  text-align: center;
  color: var(--muted);
}

.footer strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.footer p,
.footer a {
  margin: 0;
  font-size: 0.9rem;
}

.footer a {
  display: inline-block;
  margin-top: 10px;
  color: #8290a4;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 14px;
  font-size: 0.95rem;
  color: #4d5a6b;
}

.copyright {
  margin-top: 12px;
  display: grid;
  gap: 2px;
  font-size: 0.82rem;
}

.detail-dialog {
  width: min(390px, calc(100vw - 24px));
  border: 0;
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 60px rgba(25, 40, 58, 0.22);
}

.detail-dialog::backdrop {
  background: rgba(12, 18, 28, 0.3);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  color: #4e5a6a;
}

.detail-cover {
  height: 184px;
  background:
    linear-gradient(180deg, transparent, rgba(10, 18, 29, 0.2)),
    var(--cover-gradient, linear-gradient(135deg, #73919b, #395469));
}

.detail-body {
  padding: 16px;
}

.detail-body h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.detail-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.detail-link {
  text-decoration: none;
}

.store-page,
.detail-page,
.auth-page {
  min-height: calc(100vh - 198px);
}

.store-banner,
.trend-card,
.store-filters,
.auth-card,
.detail-description,
.detail-actions,
.detail-acquire {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.03);
}

.store-banner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  padding: 18px;
}

.store-chip {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 0.75rem;
  font-weight: 600;
}

.store-banner h1 {
  margin: 12px 0 10px;
  font-size: 1.6rem;
  line-height: 1.15;
}

.store-banner p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.store-banner-side {
  display: grid;
  gap: 12px;
  align-content: center;
}

.store-poster {
  min-height: 210px;
  border-radius: 18px;
  background: linear-gradient(135deg, #99ddff, #7bd2c5);
  transform: rotate(-6deg);
}

.store-heat {
  justify-self: end;
  text-align: right;
}

.store-heat span,
.trend-card p,
.detail-acquire p,
.breadcrumbs {
  color: var(--muted);
}

.store-heat strong {
  display: block;
  font-size: 1.9rem;
  color: var(--text);
}

.trend-card {
  margin-top: 16px;
  padding: 18px;
}

.trend-meta {
  color: #7a8698;
  font-size: 0.85rem;
}

.trend-card h2 {
  margin: 10px 0 8px;
  font-size: 1.2rem;
}

.trend-number {
  font-size: 2rem;
  font-weight: 700;
}

.trend-chart {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: end;
  min-height: 120px;
}

.trend-chart span {
  display: block;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #8fe2d4, #4bb5a6);
}

.store-filters {
  margin-top: 16px;
  padding: 16px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill,
.sort-button {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #4d5969;
  border-radius: 14px;
}

.pill {
  padding: 10px 13px;
}

.pill.is-active {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.sort-button {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: #fff;
}

.store-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-page {
  display: grid;
  align-items: start;
}

.auth-card {
  margin-top: 18px;
  padding: 18px;
  text-align: center;
}

.auth-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  color: var(--teal);
  background: #eef9f6;
  border: 1px solid #cce9e3;
}

.auth-card h1 {
  margin: 0;
  font-size: 2rem;
}

.auth-card p {
  margin: 8px 0 22px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #546172;
}

.auth-form input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: #fff;
}

.auth-submit {
  margin-top: 8px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #519f96, #58c688);
  color: #fff;
  font-weight: 700;
}

.auth-links {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.auth-links a {
  color: var(--teal);
}

.breadcrumbs {
  font-size: 0.94rem;
}

.detail-hero {
  display: grid;
  gap: 16px;
}

.detail-main h1 {
  margin: 10px 0 16px;
  font-size: 2rem;
}

.detail-gallery {
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.detail-gallery-main,
.detail-thumb {
  background: linear-gradient(135deg, rgba(255,255,255,.15), rgba(0,0,0,.05)), var(--cover-gradient);
  border-radius: 18px;
}

.detail-gallery-main {
  height: 280px;
}

.detail-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.detail-thumb {
  width: 72px;
  height: 56px;
  border: 2px solid transparent;
}

.detail-thumb.is-active {
  border-color: #7faaf1;
}

.detail-side {
  display: grid;
  gap: 14px;
}

.detail-actions {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.detail-actions button {
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.detail-acquire,
.detail-description {
  padding: 18px;
}

.detail-acquire span {
  color: var(--muted);
}

.detail-acquire h2,
.detail-description h3 {
  margin: 8px 0;
}

.detail-acquire strong {
  font-size: 2rem;
}

@media (min-width: 780px) {
  body {
    background:
      linear-gradient(180deg, #eef3f8, #f8fafc);
  }

  .app-shell {
    margin: 18px 0;
    width: min(100% - 32px, 1240px);
    max-width: none;
    border-radius: 28px;
    border: 1px solid #e2e9f2;
    box-shadow: 0 30px 60px rgba(22, 34, 51, 0.08);
    overflow: hidden;
  }

  .page-content {
    padding: 20px 24px 36px;
  }

  .topbar {
    grid-template-columns: 40px minmax(280px, 480px) 40px auto;
    justify-content: space-between;
    padding: 18px 24px 12px;
  }

  .searchbar {
    height: 42px;
  }

  .hero-card {
    min-height: 320px;
    padding: 24px;
  }

  .hero-card::before {
    background:
      linear-gradient(90deg, rgba(19, 35, 48, 0.46), transparent 70%),
      var(--hero-image, linear-gradient(135deg, #548f92, #263d54));
  }

  .hero-cover-badge {
    margin-bottom: 120px;
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .notice-section {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 310px;
    margin: 0;
  }

  .page-content > .hero-card {
    margin-right: 334px;
  }

  .shelf-section {
    margin-top: 22px;
  }

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

  .store-banner {
    align-items: center;
  }

  .store-page {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
  }

  .store-banner,
  .store-filters,
  .store-grid {
    grid-column: 1 / 2;
  }

  .trend-card {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    margin-top: 0;
  }

  .detail-hero {
    grid-template-columns: minmax(0, 1.25fr) 320px;
    align-items: start;
  }

  .auth-page {
    justify-items: center;
    align-items: center;
  }

  .auth-card {
    width: min(100%, 560px);
    margin-top: 24px;
    padding: 32px;
  }
}
