:root {
  --navy: #1e293b;
  --navy-2: #334155;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --page: #f8fafc;
  --white: #fff;
  --shadow: 0 4px 20px rgb(15 23 42 / 8%);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--navy);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

.home-page,
.subpage {
  min-height: 100vh;
  background-color: var(--page);
  background-image: url("https://waterkid02-1436308186.cos.ap-guangzhou.myqcloud.com/images/首页/页面背景.jpg");
  background-position: center top;
  background-repeat: repeat-y;
  background-size: cover;
}

.home-container,
.subpage-container {
  width: min(1196px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.hero-banner {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e5e7eb;
  box-shadow: 0 4px 24px rgb(0 0 0 / 12%);
}

.hero-banner img {
  display: block;
  width: 100%;
}

.welcome-card,
.section-card,
.game-selector {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid rgb(0 0 0 / 4%);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.welcome-card {
  padding: 30px 24px;
}

.welcome-card h1 {
  margin: 0 0 12px;
  font-size: clamp(18px, 3vw, 26px);
}

.welcome-card p {
  margin: 8px 0;
  line-height: 1.8;
}

.welcome-card span {
  display: inline-block;
  padding: 0 5px;
}

.section-title {
  margin: 0;
  padding: 14px 24px;
  color: var(--white);
  background: linear-gradient(135deg, #1f2937, #374151);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
}

.game-list {
  display: flex;
  min-height: 78px;
  padding: 16px 20px;
  gap: 16px;
}

.game-option {
  display: flex;
  width: 74px;
  gap: 7px;
  align-items: center;
  flex-direction: column;
}

.game-option img {
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 2px solid #3b82f6;
  border-radius: 10px;
  object-fit: cover;
}

.game-option span {
  color: #2563eb;
  font-size: 12px;
  text-align: center;
}

.menu-grid {
  display: grid;
  padding: 20px;
  grid-template-columns: repeat(var(--menu-columns, 6), minmax(0, 1fr));
  gap: 24px 18px;
}

.menu-item {
  display: flex;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--navy-2);
  background: transparent;
  align-items: center;
  flex-direction: column;
}

.menu-item img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgb(15 23 42 / 15%);
  object-fit: cover;
  transition: transform .18s ease;
}

.menu-item:hover img {
  transform: translateY(-2px) scale(1.04);
}

.menu-item span {
  max-width: 100%;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.single-image {
  padding: 20px;
}

.single-image img {
  display: block;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgb(0 0 0 / 8%);
}

.subpage-toolbar {
  height: 64px;
  border-bottom: 1px solid #f1f5f9;
  background: var(--white);
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.subpage-toolbar-inner {
  display: flex;
  width: min(1196px, 100%);
  height: 64px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: center;
}

.back-button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--navy);
  font-weight: 600;
}

.subpage-title {
  margin: 18px 0;
  text-align: center;
  font-size: clamp(22px, 3vw, 32px);
}

.tabs {
  display: flex;
  width: min(620px, 100%);
  margin: 0 auto 20px;
  justify-content: center;
}

.tab {
  display: inline-flex;
  min-width: 190px;
  min-height: 52px;
  padding: 0 22px;
  border: 4px solid #ef4444;
  border-radius: 11px;
  color: var(--white);
  background: #e11d22;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-align: center;
}

.tab::before {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border: 2px solid var(--navy);
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
}

.price-image {
  display: block;
  width: min(100%, 960px);
  margin: 0 auto;
  border-radius: 16px;
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  padding: 30px;
  background: rgb(0 0 0 / 88%);
  place-items: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  padding: 8px 12px;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 28px;
}

@media (max-width: 767px) {
  .home-container,
  .subpage-container {
    padding: 12px 16px 18px;
  }

  .welcome-card {
    padding: 26px 16px;
  }

  .welcome-card p {
    margin: 7px 0;
    font-size: 13px;
  }

  .section-title {
    padding: 13px 16px;
    font-size: 14px;
  }

  .menu-grid {
    padding: 18px 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 10px;
  }

  .menu-item img {
    width: 48px;
    height: 48px;
  }

  .single-image {
    padding: 12px;
  }
}
