/* ============================================================
   yala777 — Homepage Redesign (light, premium, gaming)
   Self-contained design system + dynamic-loading animations
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --bg-tint: #eef2fb;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --border: #e6eaf2;
  --border-strong: #d4dbe8;
  --text: #0f1b2d;
  --dim: #56627a;
  --faint: #8b97a6;
  --primary: #2c63e9;
  --primary-600: #1d4ed8;
  --primary-700: #1b3fb0;
  --accent: #ff9f1c;
  --accent-soft: #fff3e0;
  --green: #18a563;
  --grad: linear-gradient(135deg, #4f8ff7 0%, #2c63e9 100%);
  --grad-deep: linear-gradient(135deg, #2c63e9 0%, #15347e 100%);
  --grad-gold: linear-gradient(135deg, #ffc24b, #ff9f1c);
  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(15, 27, 45, .06);
  --shadow: 0 10px 30px rgba(15, 27, 45, .10);
  --shadow-lg: 0 24px 60px rgba(20, 50, 126, .18);
  --maxw: 1200px;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

/* ---------- Reveal / dynamic loading ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(44,99,233,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(44,99,233,.45); }
.btn-gold { background: var(--grad-gold); color: #3a2400; box-shadow: 0 8px 22px rgba(255,159,28,.35); }
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--text); border: 1.5px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 16px 30px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- Store buttons (与 download 页 .btn-dark 保持一致) ---------- */
.btn-dark { gap: 9px; color: #fff; background: #101318; border: 1px solid #2c313c; border-radius: 14px; padding: 12px 20px; }
.btn-dark:hover { border-color: #4a5261; transform: translateY(-2px); }
.btn-dark > .ic { width: 26px; height: 26px; }
.btn-dark .store-note { display: flex; flex-direction: column; align-items: flex-start; text-align: start; line-height: 1.15; }
.btn-dark .store-note small { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.btn-dark .store-note b { font-size: 14px; }
.btn-dark .dl-short { display: none; }

/* ---------- Promo bar ---------- */
.promo {
  background: var(--grad-deep); color: #fff; font-size: 14px; font-weight: 600;
  text-align: center; padding: 9px 44px; position: relative;
}
.promo a { text-decoration: underline; text-underline-offset: 3px; }
.promo .x { position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.18); border-radius: 50%; width: 22px; height: 22px; line-height: 22px; cursor: pointer; font-size: 14px; }
.promo .x:hover { background: rgba(255,255,255,.32); }

/* ---------- Header ---------- */
/* 与其它页面一致：白→透渐变叠加品牌绿渐变 + 底部边框线 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #fffffff5, #ffffffd6), var(--grad-deep, linear-gradient(135deg, #12b886 0%, #0b8f6b 100%));
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-strong);
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; gap: 22px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 22px; letter-spacing: -.04em; }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 17px; box-shadow: 0 4px 12px rgba(44,99,233,.4); }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 4px; margin-inline-start: 10px; }
.nav-links a { padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--dim); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--bg-tint); }
.nav-spacer { flex: 1; }
.nav-ctas { display: flex; align-items: center; gap: 12px; }
.lang-switch { position: relative; }
.lang-trigger { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); font-weight: 600; font-size: 14px; color: var(--dim); }
.lang-trigger:hover { border-color: var(--border-strong); color: var(--text); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 150px; display: none; }
.lang-menu.open { display: block; }
.lang-menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--dim); }
.lang-menu a:hover { background: var(--bg-tint); color: var(--primary); }
.hamburger { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border); place-items: center; }
.hamburger span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; }
.hamburger span::before, .hamburger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); }
.hamburger span::before { top: -6px; } .hamburger span::after { top: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 80px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.blob.b1 { width: 460px; height: 460px; background: radial-gradient(circle, #6ea8ff, transparent 70%); top: -160px; inset-inline-start: -120px; animation: drift 14s ease-in-out infinite; }
.blob.b2 { width: 380px; height: 380px; background: radial-gradient(circle, #ffd79a, transparent 70%); bottom: -140px; inset-inline-end: -100px; animation: drift 18s ease-in-out infinite reverse; }
@keyframes drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,-30px); } }

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-tint); color: var(--primary-600); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(24,165,99,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(24,165,99,.5); } 70% { box-shadow: 0 0 0 8px rgba(24,165,99,0); } 100% { box-shadow: 0 0 0 0 rgba(24,165,99,0); } }
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; margin: 18px 0 16px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { font-size: clamp(16px, 2vw, 19px); color: var(--dim); max-width: 520px; }
.hero-ctas { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; margin: 30px 0 18px; }
.hero-ctas > .btn { flex: 0 1 auto; min-width: 0; }
.hero-ctas .btn-lg { padding-inline: 24px; }
.hero-ctas .btn-dark { padding-inline: 16px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--faint); font-size: 14px; font-weight: 600; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--green); }

/* phone mockup + qr */
.hero-visual { position: relative; display: grid; place-items: center; }
.phone { width: 280px; border-radius: 36px; border: 10px solid #0f1b2d; background: #0f1b2d; box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite; overflow: hidden; }
.phone img { width: 100%; display: block; border-radius: 26px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.qr-card { position: absolute; inset-inline-end: -6px; bottom: -10px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); width: 132px; text-align: center; animation: float 6s ease-in-out infinite; animation-delay: .8s; }
.qr-card img { width: 104px; height: 104px; margin: 0 auto 6px; border-radius: 8px; }
.qr-card small { font-size: 11px; color: var(--faint); font-weight: 600; }

/* ---------- Trust strip ---------- */
.trust { background: var(--bg-soft); border-block: 1px solid var(--border); }
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 26px 0; }
.trust-item { display: flex; align-items: center; gap: 14px; }
.t-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: var(--primary); }
.t-ic svg { width: 22px; height: 22px; }
.trust-item b { font-size: 15px; display: block; }
.trust-item span { font-size: 13px; color: var(--faint); }

/* ---------- Section shell ---------- */
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.sec-head .kicker { margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.sec-head p { color: var(--dim); margin-top: 8px; max-width: 560px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.link-more:hover { gap: 10px; }

/* ---------- Features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feat .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--bg-tint); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.feat .ic svg { width: 26px; height: 26px; }
.feat h3 { font-size: 18px; margin-bottom: 8px; }
.feat p { font-size: 14px; color: var(--dim); }

/* ---------- Games preview ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip { padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--border); font-weight: 700; font-size: 14px; color: var(--dim); transition: all .2s; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(44,99,233,.3); }

.game-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.game-card { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); transition: transform .25s, box-shadow .25s, opacity .3s; }
.game-card.hide { display: none; }
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gcover { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(110deg, #eef1f7 30%, #f7f9fc 50%, #eef1f7 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; overflow: hidden; }
.gcover img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease, transform .4s ease; }
.gcover.loaded { animation: none; background: var(--surface-2); }
.gcover.loaded img { opacity: 1; }
.game-card:hover .gcover img { transform: scale(1.06); }
@keyframes shimmer { to { background-position: -200% 0; } }
.glabel { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 10px; background: linear-gradient(transparent, rgba(8,14,26,.82)); color: #fff; font-weight: 700; font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.game-card:hover .glabel { opacity: 1; transform: none; }
.play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.8); background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; padding: 9px 18px; border-radius: 999px; opacity: 0; transition: opacity .25s, transform .25s; box-shadow: 0 8px 20px rgba(44,99,233,.45); }
.game-card:hover .play-btn { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.gtag { position: absolute; top: 10px; left: 10px; background: var(--grad-gold); color: #3a2400; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: .03em; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 150px; display: flex; align-items: flex-end; padding: 20px; color: #fff; transition: transform .25s, box-shadow .25s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-card .bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8,14,26,.78)); z-index: 1; }
.cat-card > * { position: relative; z-index: 2; }
.cat-card h3 { font-size: 20px; }
.cat-card span { font-size: 13px; opacity: .85; }
.cat-card .arrow { position: absolute; top: 16px; right: 16px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; }

/* ---------- Install guide ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; }
.step .num { width: 42px; height: 42px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 16px; font-size: 18px; }
.step h3 { font-size: 17px; margin-bottom: 7px; }
.step p { font-size: 14px; color: var(--dim); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad-deep); border-radius: var(--radius-lg); padding: 56px 40px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; }
.cta-band p { color: rgba(255,255,255,.82); margin: 12px auto 28px; max-width: 540px; }
.cta-band .hero-ctas { justify-content: center; margin-bottom: 0; }
.cta-band .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.18); color:#fff; }
.cta-qr { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; background: rgba(255,255,255,.1); padding: 10px 14px; border-radius: 14px; }
.cta-qr img { width: 64px; height: 64px; border-radius: 8px; background:#fff; }
.cta-qr small { font-size: 12px; color: rgba(255,255,255,.8); text-align: left; }

/* ---------- Footer ---------- */
.site-footer { background: #0c1320; color: #aeb8c9; padding: 56px 0 30px; margin-top: 80px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 30px; }
.foot-brand .logo { color: #fff; margin-bottom: 14px; }
.foot-brand p { font-size: 13px; color: #7e8aa0; max-width: 280px; }
.foot-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; letter-spacing: .02em; }
.foot-col a { display: block; font-size: 13px; color: #8c98ad; padding: 5px 0; transition: color .2s; }
.foot-col a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid #1c2738; margin-top: 36px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; font-size: 12.5px; color: #6c788e; }
.foot-bottom .badges { display: flex; gap: 10px; flex-wrap: wrap; }
.foot-bottom .badge { border: 1px solid #27344a; border-radius: 8px; padding: 6px 10px; font-size: 11px; color: #9aa6ba; }
.age { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 2px solid #ff9f1c; color: #ff9f1c; border-radius: 8px; font-weight: 800; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .feat-grid, .cat-grid, .trust-row { grid-template-columns: repeat(2, 1fr); }
  .game-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hamburger { display: grid; }
  .nav-ctas .btn { display: none; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, var(--maxw)); }
  .feat-grid, .cat-grid, .trust-row, .game-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 40px 0 56px; }
  .section { padding: 52px 0; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .phone { width: 220px; }
  .qr-card { width: 110px; }
  .foot-grid { grid-template-columns: 1fr; }
  .nav-ctas .lang-switch { display: none; }
  .btn-dark .dl-long { display: none; }
  .btn-dark .dl-short { display: inline; }
  /* 窄屏一行放不下三个按钮，改为换行，避免横向溢出 */
  .hero-ctas { flex-wrap: wrap; }
}

/* ---------- RTL ---------- */
[dir="rtl"] .nav-links { margin-inline-start: 0; margin-inline-end: 10px; }
[dir="rtl"] .hero-meta svg, [dir="rtl"] .trust-item { flex-direction: row-reverse; }
[dir="rtl"] .sec-head { text-align: right; }
[dir="rtl"] .glabel, [dir="rtl"] .gtag { left: auto; right: 10px; }
[dir="rtl"] .arrow { right: auto; left: 16px; }

/* mobile drawer */
.mobile-drawer { position: fixed; inset: 0; background: rgba(8,14,26,.5); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s; }
.mobile-drawer.open { opacity: 1; pointer-events: auto; }
.mobile-drawer .panel { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 78%; max-width: 320px; background: #fff; padding: 24px; transform: translateX(-100%); transition: transform .3s; overflow-y: auto; }
[dir="rtl"] .mobile-drawer .panel { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(100%); }
.mobile-drawer.open .panel { transform: none; }
.mobile-drawer a { display: block; padding: 14px 10px; font-weight: 700; border-bottom: 1px solid var(--border); color: var(--text); }
.mobile-drawer .close { position: absolute; top: 16px; inset-inline-end: 16px; font-size: 24px; color: var(--faint); }

/* --- graphic logo (same as sub pages) --- */
.logo .logo-img { height: 44px; width: auto; display: block; }
.foot-brand .logo .logo-img { height: 40px; }


/* ===== Featured games ticker (two opposite marquees) ===== */
.ticker { padding: 30px 0 22px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%); }
.ticker-head { text-align: center; margin-bottom: 16px; }
.ticker-head h2 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.02em; }
.ticker-head .ticker-sub { margin: 0; color: var(--faint); font-size: 14px; }
.ticker-row { overflow: hidden; margin: 6px 0; direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: flex; gap: 16px; width: max-content; padding: 6px 8px; }
/* 加快滚动速度（用户要求）；每批 18 个图标 = 1944px，远宽于视口，滚动全程铺满无空白 */
.ticker-track.row-a { animation: marqueeL 20s linear infinite; }
.ticker-track.row-b { animation: marqueeR 20s linear infinite; }
.ticker-row:hover .ticker-track { animation-play-state: paused; }
.game-pill { display: block; width: 92px; height: 92px; padding: 0; border-radius: 18px; overflow: hidden;
  background: #fff; border: 1px solid var(--border); text-decoration: none; color: var(--text);
  box-shadow: 0 4px 16px rgba(15,18,23,.06); transition: transform .2s, box-shadow .2s; }
.game-pill:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(44,99,233,.16); border-color: var(--primary); }
.game-pill img { width: 100%; height: 100%; border-radius: 18px; object-fit: cover; background: #eef2fb; display: block; }
@keyframes marqueeL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ===== Headline Events (3 big banners) ===== */
.headline-events { padding: 52px 0; }
.headline-events .section-head { text-align: center; margin-bottom: 22px; }
.headline-events .section-head h2 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; }
.headline-events .section-head p { margin: 0; color: var(--faint); }
.he-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.he-card { position: relative; border-radius: 18px; overflow: hidden; min-height: 240px; display: flex; align-items: flex-end;
  text-decoration: none; color: #fff; box-shadow: 0 12px 32px rgba(15,18,23,.14); transition: transform .25s; }
.he-card:hover { transform: translateY(-4px); }
.he-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.he-card::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,15,35,0) 28%, rgba(8,15,35,.88)); }
.he-body { position: relative; z-index: 1; padding: 20px; }
.he-tag { display: inline-block; background: var(--gold, #ff9f1c); color: #1a1300; font-weight: 800;
  font-size: 12px; padding: 3px 11px; border-radius: 999px; margin-bottom: 9px; }
.he-body h3 { font-size: 20px; margin: 0 0 4px; }
.he-body p { font-size: 13px; opacity: .92; margin: 0 0 10px; }
.he-cta { font-weight: 700; font-size: 13px; }
@media (max-width: 860px) { .he-grid { grid-template-columns: 1fr; } }

/* ===== Game modal（点击首页游戏卡片弹出，与 /games/ 的 gm-dialog 保持一致） ===== */
.game-card { cursor: pointer; }
.gm-dialog { background: none; border: none; width: 100%; max-width: min(420px, 100vw - 32px); margin: auto; padding: 0; }
.gm-dialog:focus, .gm-dialog:focus-visible { outline: none; }
.gm-dialog::backdrop { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); background: #050c0799; }
.gm-card { background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 32px 80px rgba(0,0,0,.45); }
.gm-art { position: relative; aspect-ratio: 16 / 9; background: var(--grad-deep); overflow: hidden; }
.gm-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.game-tag { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; padding: 4px 9px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.45); color: #fff;
  font-size: 9.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gm-close { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3; width: 34px; height: 34px; padding: 0;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff;
  background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); cursor: pointer; }
.gm-close:hover { background: rgba(0,0,0,.65); }
.gm-close svg { width: 16px; height: 16px; }
.gm-body { text-align: center; padding: 22px; }
.gm-body h3 { font-size: 20px; font-weight: 900; }
.gm-body p { color: var(--dim); margin-top: 8px; font-size: 13.5px; line-height: 1.6; }
.gm-ctas { display: flex; gap: 10px; margin-top: 18px; }
.gm-ctas .btn { flex: 1; }
