:root {
  --ink: #202124;
  --muted: #687079;
  --line: #e3e7e4;
  --surface: #f5f7f6;
  --green: #087f5b;
  --green-dark: #056b4c;
  --lime: #dff6aa;
  --orange: #ffb84d;
  --white: #fff;
  --shadow: 0 18px 48px rgba(25, 45, 35, .10);
  --radius-lg: 28px;
  --radius-md: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(227, 231, 228, .85);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-size: 21px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { position: relative; display: inline-block; width: 29px; height: 29px; transform: rotate(-4deg); }
.brand-mark i { position: absolute; display: block; border-radius: 4px 12px 12px 4px; transform-origin: 0 50%; }
.brand-mark i:nth-child(1) { inset: 4px 2px 4px 6px; background: var(--green); clip-path: polygon(0 0,100% 50%,0 100%); }
.brand-mark i:nth-child(2) { left: 5px; top: 4px; width: 15px; height: 10px; background: #52c878; clip-path: polygon(0 0,100% 100%,0 100%); }
.brand-mark i:nth-child(3) { left: 5px; bottom: 4px; width: 15px; height: 10px; background: var(--orange); clip-path: polygon(0 0,100% 0,0 100%); }
.main-nav { display: flex; align-self: stretch; gap: 34px; }
.main-nav a { position: relative; display: grid; place-items: center; color: #59615d; font-size: 14px; font-weight: 650; }
.main-nav a::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 4px 4px 0 0; background: transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--green); }
.main-nav a.active::after { background: var(--green); }
.search-toggle { justify-self: end; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: var(--ink); border: 0; border-radius: 50%; background: var(--surface); cursor: pointer; }
.search-toggle:hover { background: #e9eeeb; }
.search-toggle svg, .search-box svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }

.search-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 500px);
  gap: 60px;
  align-items: end;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(70px, 9vw, 124px) clamp(24px, 6vw, 80px) clamp(64px, 8vw, 100px);
  overflow: hidden;
}
.search-hero::before { content: ""; position: absolute; z-index: -1; top: 46px; right: 9%; width: 270px; height: 270px; border-radius: 50%; background: var(--lime); filter: blur(1px); opacity: .45; }
.search-hero::after { content: ""; position: absolute; z-index: -1; right: 2%; bottom: 58px; width: 96px; height: 96px; border: 18px solid #ffe0ad; border-radius: 26px; transform: rotate(24deg); opacity: .6; }
.search-copy h1 { max-width: 660px; margin: 14px 0 20px; font-size: clamp(45px, 6.2vw, 84px); line-height: .98; letter-spacing: -.065em; }
.search-copy h1 span { color: var(--green); }
.search-copy p { max-width: 560px; margin: 0; color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.8; }
.search-box { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.search-box svg { flex: 0 0 auto; color: var(--muted); }
.search-box input { min-width: 0; flex: 1; padding: 19px 0; color: var(--ink); border: 0; outline: 0; background: transparent; }
.search-box input::placeholder { color: #969d99; }
.search-box:focus-within { border-color: #80c9af; box-shadow: 0 18px 48px rgba(8,127,91,.16), 0 0 0 4px rgba(8,127,91,.08); }
.search-box kbd { padding: 6px 8px; color: #858c88; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 10px; }

.games-section { padding: clamp(60px, 7vw, 96px) clamp(24px, 6vw, 80px) clamp(80px, 10vw, 140px); background: var(--surface); }
.section-heading, .game-grid, .empty-state { max-width: 1160px; margin-right: auto; margin-left: auto; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(30px, 3.5vw, 48px); line-height: 1.1; letter-spacing: -.045em; }
.game-count { flex: 0 0 auto; padding: 9px 14px; color: var(--green); border: 1px solid #c7ddd5; border-radius: 999px; background: #eff9f5; font-size: 12px; font-weight: 750; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.game-card { display: grid; grid-template-columns: 178px 1fr; gap: 24px; min-height: 220px; padding: 20px; border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--white); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.game-card:hover { transform: translateY(-5px); border-color: #dce5e0; box-shadow: var(--shadow); }
.game-art { position: relative; align-self: center; overflow: hidden; aspect-ratio: 1; border-radius: 24px; background: #e4e9e6; }
.game-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.game-card:hover .game-art img { transform: scale(1.04); }
.art-arrow { position: absolute; right: 10px; top: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--white); background: rgba(16,25,20,.66); backdrop-filter: blur(8px); opacity: 0; transform: translate(-4px, 4px); transition: .25s ease; }
.game-card:hover .art-arrow { opacity: 1; transform: none; }
.game-info { display: flex; min-width: 0; flex-direction: column; justify-content: center; align-items: flex-start; }
.game-category { margin-bottom: 12px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.game-info h3 { margin: 0; font-size: clamp(21px, 2vw, 28px); line-height: 1.15; letter-spacing: -.035em; }
.game-info h3 a:hover { color: var(--green); }
.game-info p { margin: 8px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rating { display: flex; align-items: center; gap: 8px; color: #626965; font-size: 12px; font-weight: 750; }
.stars { color: #f3ad23; font-size: 11px; letter-spacing: .05em; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state span { display: block; margin-bottom: 18px; color: var(--muted); }
.empty-state button { padding: 10px 18px; color: var(--white); border: 0; border-radius: 999px; background: var(--green); cursor: pointer; }

/* Chinese zodiac promo */
.zodiac-promo { padding: clamp(72px, 9vw, 124px) clamp(24px, 6vw, 80px); background: var(--white); }
.zodiac-promo-inner { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(45px, 7vw, 96px); align-items: center; max-width: 1160px; margin: 0 auto; }
.zodiac-promo-copy h2 { max-width: 520px; margin: 14px 0 22px; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.04; letter-spacing: -.052em; }
.zodiac-promo-copy p { max-width: 500px; margin: 0 0 30px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.zodiac-button { display: inline-flex; align-items: center; gap: 18px; padding: 14px 20px; border-radius: 999px; color: var(--white); background: var(--green); font-size: 13px; font-weight: 800; transition: gap .25s ease, background .25s ease; }
.zodiac-button:hover { gap: 24px; background: var(--green-dark); }
.zodiac-promo-art { position: relative; overflow: hidden; border-radius: 30px; background: #f9e8c1; box-shadow: var(--shadow); }
.zodiac-promo-art::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.5); border-radius: inherit; pointer-events: none; }
.zodiac-promo-art img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .55s ease; }
.zodiac-promo-art:hover img { transform: scale(1.025); }

.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 48px clamp(24px, 6vw, 80px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-brand { color: var(--ink); }
.copyright { justify-self: end; }

/* Detail pages */
.detail-page { background: #fafcfb; }
.detail-main { overflow: hidden; }
.detail-hero { position: relative; padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 80px) clamp(62px, 8vw, 110px); background: #103f34; color: var(--white); }
.detail-hero::after { content: ""; position: absolute; top: -220px; right: -100px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle at 35% 38%, rgba(224,246,170,.28), transparent 67%); }
.detail-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); align-items: center; max-width: 1080px; margin: 0 auto; }
.detail-icon { width: 220px; aspect-ratio: 1; overflow: hidden; border: 6px solid rgba(255,255,255,.14); border-radius: 46px; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-kicker { display: block; margin-bottom: 14px; color: #b9e5d5; font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.detail-copy h1 { margin: 0; font-size: clamp(38px, 6vw, 72px); line-height: 1; letter-spacing: -.06em; }
.detail-subtitle { margin: 14px 0 28px; color: rgba(255,255,255,.74); font-size: 16px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 30px; }
.stat { min-width: 94px; padding: 0 24px; border-left: 1px solid rgba(255,255,255,.2); }
.stat:first-child { padding-left: 0; border: 0; }
.stat strong, .stat span { display: block; }
.stat strong { margin-bottom: 5px; font-size: 16px; }
.stat span { color: rgba(255,255,255,.62); font-size: 11px; }
.play-button { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; color: #0d493b; background: var(--lime); font-size: 13px; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.play-button:hover { transform: translateY(-2px); background: #ecffc5; }
.play-button svg { width: 17px; fill: currentColor; }
.detail-content { max-width: 1080px; margin: 0 auto; padding: clamp(60px, 8vw, 100px) clamp(24px, 5vw, 56px) 110px; }
.content-label { margin-bottom: 17px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.detail-content h2 { margin: 0 0 30px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; }
.shots { display: grid; grid-auto-columns: minmax(250px, 32%); grid-auto-flow: column; gap: 18px; overflow-x: auto; padding: 5px 5px 28px; scrollbar-color: #b3c4bd transparent; scroll-snap-type: x mandatory; }
.shot { overflow: hidden; aspect-ratio: 9/16; border-radius: 24px; background: #dde4e1; box-shadow: 0 12px 30px rgba(25,45,35,.12); scroll-snap-align: start; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.about-grid { display: grid; grid-template-columns: 1.55fr .75fr; gap: clamp(42px, 8vw, 100px); margin-top: 80px; }
.about-copy p { margin: 0 0 18px; color: #4d5752; font-size: 16px; line-height: 1.85; }
.feature-list { margin: 28px 0 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding: 13px 0 13px 30px; border-bottom: 1px solid var(--line); color: #3b4540; font-size: 14px; }
.feature-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 900; }
.info-card { align-self: start; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.info-row { display: flex; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-row:first-child { padding-top: 0; }
.info-row:last-child { padding-bottom: 0; border: 0; }
.info-row span { color: var(--muted); }
.info-row strong { text-align: right; font-weight: 700; }
.disclaimer { margin-top: 36px; padding: 18px 20px; border-radius: 14px; color: #63706a; background: #eef3f0; font-size: 12px; line-height: 1.7; }

/* Chinese zodiac page */
.zodiac-page { background: #fbfcf9; }
.zodiac-hero { padding: clamp(56px, 8vw, 108px) clamp(24px, 6vw, 80px); color: var(--white); background: #103f34; }
.zodiac-hero-inner { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(46px, 7vw, 96px); align-items: center; max-width: 1160px; margin: 0 auto; }
.zodiac-hero-copy .eyebrow { color: #cbea91; }
.zodiac-hero h1 { margin: 16px 0 22px; font-size: clamp(46px, 6vw, 78px); line-height: .98; letter-spacing: -.065em; }
.zodiac-hero p { max-width: 530px; margin: 0; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.8; }
.zodiac-hero-art { overflow: hidden; margin: 0; border: 6px solid rgba(255,255,255,.12); border-radius: 32px; background: #f6e3b7; box-shadow: 0 32px 80px rgba(0,0,0,.28); transform: rotate(1.25deg); }
.zodiac-hero-art img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.zodiac-story { max-width: 1080px; margin: 0 auto; padding: clamp(76px, 9vw, 124px) clamp(24px, 5vw, 56px); }
.zodiac-story-intro { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(48px, 8vw, 108px); align-items: start; }
.zodiac-story h2, .zodiac-gallery-heading h2 { margin: 12px 0 0; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -.05em; }
.story-copy p { margin: 0 0 20px; color: #4d5752; font-size: 16px; line-height: 1.9; }
.race-card { position: relative; margin-top: 68px; padding: clamp(30px, 5vw, 54px); overflow: hidden; border-radius: 28px; color: #203d35; background: #eef7d8; }
.race-card::after { content: "十二"; position: absolute; right: -8px; bottom: -56px; color: rgba(8,127,91,.08); font-family: Georgia, serif; font-size: 180px; font-weight: 900; }
.race-card-content { position: relative; z-index: 1; max-width: 820px; }
.race-card h3 { margin: 9px 0 16px; font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.035em; }
.race-card p { margin: 0; color: #52635b; font-size: 15px; line-height: 1.85; }
.zodiac-gallery { padding: clamp(76px, 9vw, 120px) clamp(24px, 6vw, 80px) clamp(90px, 11vw, 150px); background: #f1f4f1; }
.zodiac-gallery-inner { max-width: 1160px; margin: 0 auto; }
.zodiac-gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 45px; }
.zodiac-gallery-heading p { max-width: 450px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.zodiac-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.zodiac-card { overflow: hidden; border: 1px solid transparent; border-radius: 25px; background: var(--white); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.zodiac-card:hover { transform: translateY(-5px); border-color: #d7e0db; box-shadow: var(--shadow); }
.zodiac-thumb { aspect-ratio: 1.14/1; background-image: url('../images/zodiac-atlas.png'); background-repeat: no-repeat; background-size: 400% 300%; }
.zodiac-rat { background-position: 0 0; }
.zodiac-ox { background-position: 33.333% 0; }
.zodiac-tiger { background-position: 66.667% 0; }
.zodiac-rabbit { background-position: 100% 0; }
.zodiac-dragon { background-position: 0 50%; }
.zodiac-snake { background-position: 33.333% 50%; }
.zodiac-horse { background-position: 66.667% 50%; }
.zodiac-goat { background-position: 100% 50%; }
.zodiac-monkey { background-position: 0 100%; }
.zodiac-rooster { background-position: 33.333% 100%; }
.zodiac-dog { background-position: 66.667% 100%; }
.zodiac-pig { background-position: 100% 100%; }
.zodiac-card-copy { padding: 24px 25px 28px; }
.zodiac-number { display: inline-block; margin-bottom: 9px; color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.zodiac-card h3 { margin: 0 0 11px; font-size: 25px; letter-spacing: -.035em; }
.zodiac-card h3 small { margin-left: 7px; color: #87918c; font-size: 13px; font-weight: 650; }
.zodiac-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.72; }
.zodiac-note { max-width: 1160px; margin: 28px auto 0; padding: 18px 20px; border-radius: 14px; color: #66716c; background: #e6ece8; font-size: 12px; line-height: 1.65; }

@media (max-width: 920px) {
  .search-hero { grid-template-columns: 1fr; gap: 38px; align-items: start; }
  .search-box { max-width: 600px; }
  .game-card { grid-template-columns: 142px 1fr; min-height: 182px; }
  .detail-hero-inner { grid-template-columns: 180px 1fr; }
  .detail-icon { width: 180px; border-radius: 38px; }
  .zodiac-promo-inner, .zodiac-hero-inner { grid-template-columns: 1fr; }
  .zodiac-promo-copy { max-width: 680px; }
  .zodiac-hero-art { max-width: 720px; transform: none; }
  .zodiac-story-intro { grid-template-columns: 1fr; gap: 34px; }
  .zodiac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 66px; padding: 0 20px; }
  .main-nav { position: absolute; top: 66px; right: 0; left: 0; display: none; height: auto; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--white); box-shadow: 0 12px 25px rgba(0,0,0,.07); }
  .site-header.nav-open .main-nav { display: flex; }
  .main-nav a { min-height: 40px; }
  .main-nav a::after { display: none; }
  .search-hero { padding-top: 60px; }
  .search-hero::before { width: 190px; height: 190px; }
  .search-box kbd { display: none; }
  .section-heading { align-items: start; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card { grid-template-columns: 124px 1fr; gap: 18px; min-height: 158px; padding: 16px; border-radius: 22px; }
  .game-art { border-radius: 19px; }
  .art-arrow { display: none; }
  .game-info p { margin-bottom: 12px; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .footer-brand, .copyright { justify-self: center; }
  .site-footer p { margin: 0; }
  .detail-hero-inner { grid-template-columns: 118px 1fr; gap: 24px; }
  .detail-icon { width: 118px; border-width: 4px; border-radius: 26px; }
  .detail-kicker { margin-bottom: 9px; font-size: 9px; }
  .detail-subtitle { margin: 9px 0 18px; font-size: 13px; }
  .stat-row { margin-bottom: 20px; }
  .stat { min-width: 68px; padding: 0 12px; }
  .stat strong { font-size: 13px; }
  .stat span { font-size: 9px; }
  .play-button { padding: 11px 17px; font-size: 12px; }
  .shots { grid-auto-columns: minmax(230px, 72%); }
  .about-grid { grid-template-columns: 1fr; margin-top: 60px; }
  .zodiac-promo-inner { gap: 40px; }
  .zodiac-promo-art, .zodiac-hero-art { border-radius: 22px; }
  .zodiac-gallery-heading { display: block; }
  .zodiac-gallery-heading p { margin-top: 18px; }
}

@media (max-width: 440px) {
  .search-copy h1 { font-size: 45px; }
  .game-card { grid-template-columns: 104px 1fr; min-height: 136px; }
  .game-category { margin-bottom: 8px; font-size: 8px; }
  .game-info h3 { font-size: 19px; }
  .game-info p { margin: 6px 0 9px; font-size: 11px; }
  .detail-hero-inner { grid-template-columns: 86px 1fr; gap: 18px; }
  .detail-icon { width: 86px; border-radius: 21px; }
  .detail-copy h1 { font-size: 32px; }
  .detail-subtitle { display: none; }
  .stat-row { margin: 12px 0 15px; }
  .stat:nth-child(3) { display: none; }
  .zodiac-grid { grid-template-columns: 1fr; }
  .zodiac-card { display: grid; grid-template-columns: 42% 58%; }
  .zodiac-thumb { height: 100%; min-height: 190px; aspect-ratio: auto; }
  .zodiac-card-copy { align-self: center; padding: 20px; }
  .zodiac-card h3 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
