/* WEIFANG GAMES — official site styles */
:root {
  --bg: #fffdf8;
  --surface: #ffffff;
  --ink: #17142a;
  --muted: #646a80;
  --line: #e7ebf4;
  /* brand colours come from the WEIFANG GAMES logo */
  --brand: #1e6bf0;
  --brand-soft: #eaf1ff;
  --brand-orange: #ff8a1f;
  --purple: #7b5cf0;
  --purple-soft: #f1ecff;
  --orange: #e8890c;
  --orange-soft: #fff3e0;
  --green: #3fae64;
  --green-soft: #e8f7ec;
  --sky: #eaf3ff;
  --radius: 24px;
  --shadow: 0 10px 30px rgba(23, 40, 90, 0.08);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.5vw, 58px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 800; }
p { margin: 0 0 14px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); font-size: 18px; }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; flex: none; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; transition: transform 0.2s ease; }
.brand:hover .brand-logo { transform: scale(1.04); }
.site-footer .brand-logo { height: 52px; margin-bottom: 16px; }
.nav { margin-left: auto; display: flex; gap: 6px; }
.nav a {
  color: var(--ink); font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover, .nav a.active { background: var(--brand-soft); color: var(--brand); text-decoration: none; }

.lang { display: flex; flex: none; padding: 3px; border-radius: 999px; background: var(--brand-soft); }
.lang a { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--brand); }
.lang a:hover { text-decoration: none; }
.lang a.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(23, 40, 90, 0.12); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 16px;
  padding: 14px 26px; border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 22px rgba(30, 107, 240, 0.32); }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(30, 107, 240, 0.14), transparent 70%),
    radial-gradient(500px 300px at 10% 90%, rgba(255, 138, 31, 0.16), transparent 70%),
    linear-gradient(180deg, var(--sky), var(--bg));
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 80px; padding-bottom: 96px; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin-bottom: 28px; }
/* solid brand blue: a blue→orange text gradient turns muddy grey in the middle */
.hero h1 .hl { color: var(--brand); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; }
.hero-stats b { display: block; font-size: 26px; font-weight: 800; }
.hero-stats span { font-size: 14px; color: var(--muted); }

.hero-art { position: relative; height: 460px; }
.hero-art .icon {
  position: absolute; width: 58%; border-radius: 22%;
  box-shadow: 0 24px 50px rgba(42, 35, 64, 0.22);
  border: 6px solid #fff;
}
.hero-art .icon-a { top: 0; left: 4%; transform: rotate(-7deg); animation: float 6s ease-in-out infinite; }
.hero-art .icon-b { bottom: 0; right: 2%; transform: rotate(6deg); animation: float 6s ease-in-out -3s infinite; }
.sparkle { position: absolute; color: #ffc93c; animation: twinkle 2.4s ease-in-out infinite; }
.sparkle.s1 { top: 6%; right: 18%; }
.sparkle.s2 { bottom: 14%; left: 8%; animation-delay: -1.2s; }
.sparkle.s3 { top: 46%; right: 2%; animation-delay: -0.6s; color: var(--brand-orange); }
@keyframes float { 50% { translate: 0 -14px; } }
@keyframes twinkle { 50% { opacity: 0.3; scale: 0.7; } }
@media (prefers-reduced-motion: reduce) { .hero-art .icon, .sparkle { animation: none; } }

/* ---------- games ---------- */
.game {
  display: grid; grid-template-columns: 420px 1fr; gap: 48px; align-items: center;
  background: var(--surface); border-radius: 32px; padding: 32px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.game + .game { margin-top: 32px; }
.game.reverse { grid-template-columns: 1fr 420px; }
.game.reverse .game-media { order: 2; }
/* source art has its own rounded (dark) corners: crop them with a larger radius + slight zoom */
.game-media { border-radius: 18%; overflow: hidden; aspect-ratio: 1; }
.game-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform 0.4s ease; }
.game:hover .game-media img { transform: scale(1.07); }
.game-body h3 { font-size: 32px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tag { font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.features { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.features li { display: flex; gap: 10px; align-items: flex-start; }
.features li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a2340' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.game-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.game-meta span { background: var(--bg); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-weight: 700; }
.theme-mergic { --accent: var(--purple); --accent-soft: var(--purple-soft); }
.theme-chicken { --accent: var(--orange); --accent-soft: var(--orange-soft); }
.theme-mergic .tag, .theme-chicken .tag { background: var(--accent-soft); color: var(--accent); }
.theme-mergic h3, .theme-chicken h3 { color: var(--accent); }

/* ---------- store ---------- */
.store-bg { background: linear-gradient(180deg, var(--bg), #f0f5ff); }
.store-group + .store-group { margin-top: 44px; }
.store-group-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.store-group-title img { width: 44px; height: 44px; border-radius: 12px; }
.store-group-title h3 { margin: 0; }
.items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.item:hover { transform: translateY(-4px); }
.item-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 16px; background: var(--accent-soft); }
.item p { color: var(--muted); font-size: 15px; margin: 0; }
.item .delivery { margin-top: 14px; font-size: 13px; font-weight: 800; color: var(--green); }
.store-note {
  margin-top: 40px; padding: 20px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px dashed #c9d9fb; color: var(--muted); text-align: center;
}

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { text-align: center; padding: 8px 12px; }
.step-num {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, var(--brand), #4d8dff);
  box-shadow: 0 8px 18px rgba(30, 107, 240, 0.3);
}
.step p { color: var(--muted); }

/* ---------- cta band ---------- */
.cta-band {
  border-radius: 32px; padding: 48px;
  background: linear-gradient(120deg, var(--brand), #4b8cff 55%, #ff9a3d);
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; opacity: 0.92; }
.cta-band .btn { background: #fff; color: var(--brand); }

/* ---------- inner pages ---------- */
.page-hero { background: linear-gradient(180deg, var(--sky), var(--bg)); padding: 72px 0 40px; text-align: center; }
.page-hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto; }
.doc { max-width: 820px; margin: 0 auto; padding: 24px 24px 88px; }
.doc h2 { font-size: 24px; margin-top: 40px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 14px; text-align: center; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.company-logo { height: 52px; width: auto; margin: 4px 0 18px; }
.callout { background: var(--green-soft); border-radius: 18px; padding: 18px 22px; margin: 20px 0; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { width: 34%; color: var(--muted); font-weight: 700; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.contact-grid .card h3 { font-size: 18px; }
.contact-grid .card p { color: var(--muted); font-size: 15px; }
.contact-grid .card a { font-weight: 800; word-break: break-all; }

/* ---------- footer ---------- */
.site-footer { background: #17142a; color: #c5c8d8; padding: 56px 0 28px; font-size: 15px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid #312d48; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #8a8ca4; }
.footer-bottom a { color: #8a8ca4; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 64px; }
  .hero-art { height: 380px; max-width: 460px; width: 100%; margin: 0 auto; }
  .game, .game.reverse { grid-template-columns: 1fr; gap: 28px; padding: 22px; }
  .game.reverse .game-media { order: 0; }
  .items, .steps, .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .section { padding: 64px 0; }
  .site-header .wrap { height: auto; flex-wrap: wrap; gap: 4px; padding-top: 10px; padding-bottom: 8px; }
  .nav { order: 3; margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .lang { margin-left: auto; }
  .brand-logo { height: 38px; }
  .nav a { padding: 6px 12px; font-size: 14px; }
  .hero-art { height: 300px; }
  .hero-stats { gap: 22px; }
  .items, .steps, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 24px; }
  .info-table th { width: 40%; }
}
