/* =========================================================================
   Landing page stylesheet.

   Ported verbatim from the project's existing Ninja Six Paths landing page
   (`index.php`, inline <style> block) so the visual design is unchanged.
   Only the delivery changed: this lives in an external file because the site
   ships a CSP with `style-src 'self'`, which forbids inline <style> blocks.

   Fonts (Kanit, Chakra Petch) are self-hosted — see fonts.css.
   This file is loaded ONLY by layouts/landing.php and is deliberately isolated
   from app.css, which styles the rest of the site.
   ========================================================================= */

/* ══════════════════════════════════════════════════════
   NINJA SIX PATHS — New Landing Page v2
   Design: Premium Dark · Fire · Gold
   ══════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════
   PALETTE — ดึงมาจากโลโก้ Ninja Origins Online โดยตรง
     NINJA   เหลือง → ส้ม → แดง
     ORIGINS ฟ้า    → น้ำเงิน
     ONLINE  ชมพู   → บานเย็น
     พื้นหลัง สาดสีม่วง + ใบไม้เขียว
   ══════════════════════════════════════════════════════ */
:root {
  /* NINJA — ส้ม/ทอง ใช้เป็นสีปุ่มหลัก */
  --gold:    #ffc21a;
  --amber:   #ff9518;
  --fire:    #ff6a1a;
  --ember:   #ff8a3d;
  --crimson: #e8452a;
  --fire-rgb: 255, 106, 26;

  /* ORIGINS — ฟ้า/น้ำเงิน สีรองที่ใช้เป็นไฮไลต์ */
  --sky:     #6fd8ff;
  --azure:   #2ba8ff;
  --cobalt:  #0b6fdb;
  --azure-rgb: 43, 168, 255;

  /* ONLINE — ชมพู */
  --pink:    #f45fbf;
  --magenta: #d62e96;
  --pink-rgb: 244, 95, 191;

  /* สาดสีม่วงหลังโลโก้ ใช้เป็นโทนพื้นทั้งหน้า */
  --violet:  #7b3fd4;
  --grape:   #4b1d8f;
  --violet-rgb: 123, 63, 212;

  /* ใบไม้ */
  --leaf:    #7ed957;

  /* พื้นหลัง ไล่จากดำอมม่วง */
  --deep:    #0b0616;
  --dark:    #120a22;
  --mid:     #180f2c;
  --surface: #1f1438;
  --raised:  #2a1c4a;
  --deep-rgb: 11, 6, 22;

  --border:  rgba(255, 255, 255, .09);
  --glow-f:  rgba(var(--fire-rgb), .35);
  --glow-g:  rgba(var(--azure-rgb), .3);

  --txt:     #f4f0ff;
  --txt2:    #b0a3c8;
  --txt3:    #6f6288;
}

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Kanit', sans-serif;
  background: var(--deep);
  color: var(--txt);
  overflow-x: hidden;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ──────────────────────────────────────────────────────
   SCROLLBAR
────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--ember); border-radius: 99px; }

/* ──────────────────────────────────────────────────────
   VIDEO BACKGROUND
────────────────────────────────────────────────────── */
#vid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Fallback gradient ถ้า video โหลดไม่ได้หรือ RAM น้อย */
  background: radial-gradient(ellipse 120% 80% at 50% -10%, rgba(140,40,0,.5) 0%, rgba(var(--deep-rgb), 1) 55%);
}
#vid-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .18;
  filter: saturate(1.4) brightness(.8);
  /* ไม่ preload บนมือถือ — โหลดเมื่อพร้อมเท่านั้น */
  will-change: auto;
}
#vid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(var(--fire-rgb), .12) 0%, transparent 60%),
    linear-gradient(180deg, rgba(var(--deep-rgb), .3) 0%, rgba(var(--deep-rgb), .7) 60%, var(--deep) 100%);
}
/* มือถือ: ซ่อน video ถ้า screen เล็ก/หน่วยความจำน้อย ใช้ gradient แทน */
@media (max-width: 640px) and (max-height: 900px) {
  #vid-bg video { display: none; }
}

/* Noise grain ลบออก — SVG feTurbulence กิน GPU บนมือถือ */

/* Everything above bg */
.above { position: relative; z-index: 2; }

/* ──────────────────────────────────────────────────────
   NAVBAR
────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  transition: background .4s, box-shadow .4s;
}
#navbar.scrolled {
  background: rgba(var(--deep-rgb), .95); /* เพิ่ม opacity แทน blur — ไม่ต้อง composite layer */
  box-shadow: 0 2px 40px rgba(0,0,0,.6), 0 1px 0 var(--border);
  /* backdrop-filter ลบออก — สร้าง GPU layer บนมือถือ */
}
.nb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nb-logo {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(var(--fire-rgb), .6));
  transition: filter .3s;
}
.nb-logo:hover { filter: drop-shadow(0 0 20px rgba(255,215,0,.7)); }
.nb-title {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--gold), var(--ember));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: .5px;
}
.nb-sub {
  font-size: 10px;
  color: var(--txt3);
  letter-spacing: 2px;
  text-transform: uppercase;
  -webkit-text-fill-color: var(--txt3);
}

.nb-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nb-link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--txt2);
  transition: .2s;
  white-space: nowrap;
}
.nb-link:hover { color: var(--txt); background: rgba(255,255,255,.06); }

.nb-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nb-lang {
  display: flex;
  align-items: center;
  padding: 3px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  gap: 2px;
}
.nb-lang button {
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--txt3);
  cursor: pointer;
  transition: .2s;
  letter-spacing: .5px;
}
.nb-lang button.on {
  background: linear-gradient(135deg, var(--fire), var(--crimson));
  color: #fff;
  box-shadow: 0 0 14px rgba(var(--fire-rgb), .3);
}
.nb-cta {
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--fire), var(--crimson));
  border: none;
  border-radius: 12px;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(var(--fire-rgb), .35);
  transition: .2s;
  white-space: nowrap;
}
.nb-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--fire-rgb), .5); }

/* Hamburger */
#nb-burger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
#nb-burger span {
  width: 20px; height: 2px;
  background: var(--txt2);
  border-radius: 2px;
  transition: .3s;
}
#nb-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nb-burger.open span:nth-child(2) { opacity: 0; }
#nb-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
#mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(var(--deep-rgb), .98); /* solid เกือบสุด ไม่ต้อง blur */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 80px 24px 40px;
}
#mobile-nav.open { display: flex; }
.mnav-link {
  width: 100%;
  max-width: 280px;
  padding: 16px 24px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--txt2);
  text-align: center;
  transition: .2s;
}
.mnav-link:hover, .mnav-link:active {
  background: rgba(var(--fire-rgb), .1);
  border-color: rgba(var(--fire-rgb), .3);
  color: var(--txt);
}
.mnav-cta {
  width: 100%;
  max-width: 280px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--fire), var(--crimson));
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  box-shadow: 0 6px 24px rgba(var(--fire-rgb), .4);
  margin-top: 8px;
}

/* ──────────────────────────────────────────────────────
   HERO
────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px clamp(16px, 5vw, 80px) 60px;
  position: relative;
}

/* Decorative fire lines */
#hero::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fire), var(--gold), var(--fire), transparent);
  opacity: .6;
}

.hero-inner {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Badge above title */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(var(--fire-rgb), .12);
  border: 1px solid rgba(var(--fire-rgb), .3);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ember);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: fadeDown .6s ease both;
}
.hero-badge i { font-size: 11px; }
@keyframes fadeDown { from { opacity:0; transform:translateY(-16px); } to { opacity:1; transform:none; } }

.hero-logo {
  width: clamp(220px, 45vw, 540px);
  height: auto;
  /* ใช้ static drop-shadow แทน animation — เบากว่า 10x */
  filter: drop-shadow(0 0 30px rgba(255,100,0,.45));
  animation: fadeUp .8s ease .1s both;
  margin-bottom: 8px;
}
/* Logo glow ทำด้วย pseudo-element แทน filter animation */
.hero-logo-wrap {
  position: relative;
  display: inline-block;
}
.hero-logo-wrap::after {
  content: '';
  position: absolute;
  bottom: -10px; left: 10%; right: 10%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(255,100,0,.35), transparent 70%);
  border-radius: 50%;
  /* animate เฉพาะ opacity — เบามาก */
  animation: glowPulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glowPulse {
  0%,100% { opacity: .6; }
  50%      { opacity: 1; }
}
@keyframes fadeUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:none; } }

.hero-eyebrow {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(11px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
  animation: fadeUp .8s ease .25s both;
}

.hero-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(42px, 7vw, 88px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -2px;
  margin-bottom: 12px;
  animation: fadeUp .8s ease .35s both;
}
.hero-title .line1 {
  display: block;
  background: linear-gradient(135deg, #fff 0%, #ffe4c4 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title .line2 {
  display: block;
  background: linear-gradient(135deg, var(--fire) 0%, var(--gold) 60%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  font-style: italic;
}

.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 400;
  color: var(--txt2);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 36px;
  animation: fadeUp .8s ease .45s both;
}
.hero-sub strong { color: var(--gold); font-weight: 700; }

/* CTA Buttons */
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
  animation: fadeUp .8s ease .55s both;
}
.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 14px;
  font-family: 'Kanit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: .25s;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.hbtn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transform: translateX(-100%);
  transition: transform .4s;
}
.hbtn:hover::before { transform: translateX(100%); }
.hbtn-fire {
  background: linear-gradient(135deg, var(--fire), #a01010);
  color: #fff;
  box-shadow: 0 6px 30px rgba(var(--fire-rgb), .45), 0 0 0 1px rgba(var(--fire-rgb), .2);
}
.hbtn-fire:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(var(--fire-rgb), .6), 0 0 0 1px rgba(var(--fire-rgb), .3); }
.hbtn-ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--txt2);
}
.hbtn-ghost:hover { background: rgba(255,255,255,.1); color: var(--txt); border-color: rgba(255,255,255,.15); transform: translateY(-2px); }
.hbtn i { font-size: 17px; }

/* Stats row */
.hero-stats {
  display: flex;
  gap: clamp(24px, 4vw, 60px);
  justify-content: center;
  flex-wrap: wrap;
  padding: 24px 36px;
  background: rgba(20,20,25,.7); /* solid แทน blur */
  border: 1px solid var(--border);
  border-radius: 20px;
  animation: fadeUp .8s ease .65s both;
  margin-bottom: 52px;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  display: block;
}
.stat-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--txt3);
  letter-spacing: .5px;
  margin-top: 4px;
  display: block;
}
.stat-sep { width: 1px; height: 40px; background: var(--border); align-self: center; }

/* ──────────────────────────────────────────────────────
   DOWNLOAD SECTION
────────────────────────────────────────────────────── */
#download {
  padding: clamp(60px, 8vw, 100px) clamp(16px, 5vw, 80px);
  position: relative;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  background: rgba(255,215,0,.08);
  border: 1px solid rgba(255,215,0,.2);
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -1px;
}
.section-title span {
  background: linear-gradient(135deg, var(--fire), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-sub {
  font-size: 15px;
  color: var(--txt2);
  margin-bottom: 48px;
  max-width: 500px;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.dl-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: center;
  transition: .3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.dl-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--fire-rgb), .06), transparent);
  opacity: 0;
  transition: .3s;
}
.dl-card:hover { border-color: rgba(var(--fire-rgb), .35); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(var(--fire-rgb), .15); }
.dl-card:hover::before { opacity: 1; }
.dl-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
  z-index: 1;
}
.dl-icon--android { background: linear-gradient(135deg, #3ddc84, #1a8c4e); }
.dl-icon--drive   { background: linear-gradient(135deg, #4285f4, #1a56c0); }
.dl-icon--mfire   { background: linear-gradient(135deg, var(--fire), var(--crimson)); }
.dl-icon--topup   { background: linear-gradient(135deg, var(--gold), var(--amber)); }
.dl-icon--reward  { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.dl-card h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--txt);
  position: relative;
  z-index: 1;
}
.dl-card p {
  font-size: 12px;
  color: var(--txt2);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.dl-badge {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  position: relative;
  z-index: 1;
}
.dl-badge--android { background: rgba(61,220,132,.15); border: 1px solid rgba(61,220,132,.3); color: #3ddc84; }
.dl-badge--hot { background: rgba(var(--fire-rgb), .15); border: 1px solid rgba(var(--fire-rgb), .3); color: var(--ember); }
.dl-badge--free { background: rgba(168,85,247,.15); border: 1px solid rgba(168,85,247,.3); color: #a855f7; }

/* ──────────────────────────────────────────────────────
   FEATURES
────────────────────────────────────────────────────── */
#features {
  padding: clamp(60px, 8vw, 100px) clamp(16px, 5vw, 80px);
  background: linear-gradient(180deg, transparent, rgba(var(--fire-rgb), .03), transparent);
}
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.feat-card {
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: .3s;
  position: relative;
  overflow: hidden;
}
.feat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fire), var(--gold), var(--fire), transparent);
  opacity: 0;
  transition: .3s;
}
.feat-card:hover { transform: translateY(-5px); border-color: rgba(var(--fire-rgb), .25); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.feat-card:hover::after { opacity: 1; }
.feat-icon {
  font-size: 32px;
  margin-bottom: 18px;
  display: block;
  line-height: 1;
}
.feat-card h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--txt);
  margin-bottom: 10px;
}
.feat-card p {
  font-size: 14px;
  color: var(--txt2);
  line-height: 1.7;
}

/* ──────────────────────────────────────────────────────
   GAME MODES
────────────────────────────────────────────────────── */
#modes {
  padding: clamp(60px, 8vw, 100px) clamp(16px, 5vw, 80px);
}
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.mode-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: .3s;
  position: relative;
}
.mode-card:hover { transform: translateY(-5px) scale(1.02); border-color: rgba(var(--fire-rgb), .3); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.mode-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.mode-card:hover .mode-thumb { transform: scale(1.06); }
.mode-info {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mode-info h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--txt);
}
.mode-info p { font-size: 12px; color: var(--txt2); margin-top: 3px; }
.mode-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(var(--fire-rgb), .15);
  border: 1px solid rgba(var(--fire-rgb), .3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ember);
  flex-shrink: 0;
  transition: .2s;
}
.mode-card:hover .mode-arrow { background: var(--fire); border-color: var(--fire); color: #fff; }

/* ──────────────────────────────────────────────────────
   NEWS SECTION
────────────────────────────────────────────────────── */
#news {
  padding: clamp(60px, 8vw, 100px) clamp(16px, 5vw, 80px);
  background: linear-gradient(180deg, transparent, rgba(255,215,0,.02), transparent);
}
.news-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.ntab {
  padding: 9px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--txt2);
  cursor: pointer;
  transition: .2s;
}
.ntab.on, .ntab:hover {
  background: linear-gradient(135deg, var(--fire), var(--crimson));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(var(--fire-rgb), .3);
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1100px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: .3s;
  cursor: pointer;
}
.news-card:hover { transform: translateY(-4px); border-color: rgba(var(--fire-rgb), .25); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.news-img-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--raised);
  position: relative;
}
.news-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.news-card:hover .news-img { transform: scale(1.05); }
.news-tag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--fire), var(--crimson));
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.news-body { padding: 20px; }
.news-date {
  font-size: 12px;
  color: var(--txt3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.news-card h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--txt);
  margin-bottom: 8px;
  line-height: 1.3;
}
.news-card p { font-size: 13px; color: var(--txt2); line-height: 1.6; }
.news-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ember);
  transition: gap .2s;
}
.news-card:hover .news-more { gap: 9px; }

/* ──────────────────────────────────────────────────────
   COMMUNITY STRIP
────────────────────────────────────────────────────── */
#community {
  padding: clamp(50px, 6vw, 80px) clamp(16px, 5vw, 80px);
}
.community-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(var(--fire-rgb), .06), rgba(255,215,0,.04), rgba(192,57,43,.06));
  border: 1px solid rgba(var(--fire-rgb), .15);
  border-radius: 24px;
  padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.com-text h2 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.com-text p { font-size: 15px; color: var(--txt2); }
.com-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.com-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 14px;
  font-family: 'Kanit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  transition: .2s;
  white-space: nowrap;
}
.com-btn--fb  { background: #1877f2; color: #fff; box-shadow: 0 4px 16px rgba(24,119,242,.35); }
.com-btn--dc  { background: #5865f2; color: #fff; box-shadow: 0 4px 16px rgba(88,101,242,.35); }
.com-btn--grp { background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--txt2); }
.com-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* ──────────────────────────────────────────────────────
   FOOTER
────────────────────────────────────────────────────── */
footer {
  padding: clamp(50px, 6vw, 80px) clamp(16px, 5vw, 80px) 30px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(var(--deep-rgb), .8));
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 40px;
}
.footer-brand img {
  height: 44px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 10px rgba(var(--fire-rgb), .4));
}
.footer-brand p {
  font-size: 14px;
  color: var(--txt2);
  line-height: 1.7;
  max-width: 260px;
  margin-bottom: 20px;
}
.footer-socials {
  display: flex;
  gap: 10px;
}
.fsoc {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--txt2);
  transition: .2s;
}
.fsoc:hover { background: rgba(var(--fire-rgb), .15); border-color: rgba(var(--fire-rgb), .3); color: var(--ember); transform: translateY(-2px); }
.footer-col h4 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 13px;
  color: var(--txt2);
  transition: .2s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.footer-col ul li a:hover { color: var(--ember); transform: translateX(3px); }
.footer-col ul li a i { font-size: 12px; color: var(--txt3); }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 13px; color: var(--txt3); }
.footer-brand-name {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ──────────────────────────────────────────────────────
   FLOATING DOWNLOAD BUTTON
────────────────────────────────────────────────────── */
#fab {
  position: fixed;
  bottom: 28px; right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--fire), var(--crimson));
  border-radius: 50px;
  box-shadow: 0 6px 30px rgba(var(--fire-rgb), .5);
  font-family: 'Kanit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: .3s;
  animation: fabPulse 2.5s ease-in-out infinite;
}
#fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 12px 40px rgba(var(--fire-rgb), .65); animation: none; }
@keyframes fabPulse {
  0%,100% { box-shadow: 0 6px 30px rgba(var(--fire-rgb), .5); }
  50%      { box-shadow: 0 6px 40px rgba(var(--fire-rgb), .75), 0 0 0 8px rgba(var(--fire-rgb), .1); }
}
@media (max-width: 480px) {
  #fab { bottom: 20px; right: 16px; padding: 11px 18px; font-size: 13px; }
}

/* ──────────────────────────────────────────────────────
   SCROLL REVEAL
────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ──────────────────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nb-nav { display: none; }
  #nb-burger { display: flex; }
  .nb-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero-stats { gap: 16px; padding: 18px 20px; }
  .stat-sep { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .community-inner { flex-direction: column; text-align: center; justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 420px) {
  .dl-grid { grid-template-columns: 1fr 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .modes-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════
   UTILITIES
   Replacements for the style="" attributes the original markup carried.
   The CSP (`style-src 'self'`) blocks inline style attributes, so each one
   became a class with identical declarations.
   ══════════════════════════════════════════════════════ */

.sec-inner       { max-width: 1100px; margin: 0 auto; }
.mt-40           { margin-top: 40px; }
.mt-28           { margin-top: 28px; }
.mt-24           { margin-top: 24px; }
.ico-white       { color: #fff; }
.pos-top         { object-position: top; }
.pos-center      { object-position: center; }
.pos-bottom      { object-position: bottom; }
.img-hue         { filter: hue-rotate(180deg); }
.news-tag--event { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.news-tag--patch { background: linear-gradient(135deg, #059669, #10b981); }

/* Inline SVG icons replacing the FontAwesome <i> elements. Sized from the
   surrounding font-size so they sit where the glyphs used to. */
.ico {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
    flex: none;
}

/* Empty state for the news grid until a news backend exists. */
.news-empty {
    grid-column: 1 / -1;
    padding: 46px 20px;
    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: 16px;
    background: rgba(255, 255, 255, .02);
    text-align: center;
}

.news-empty p { margin: 0 0 6px; color: var(--txt2); font-size: 14px; }
.news-empty strong { color: var(--txt); font-size: 16px; }

/* Body scroll lock while the mobile menu is open. The original set
   document.body.style.overflow directly, which the CSP blocks. */
body.nav-open { overflow: hidden; }

/* ══════════════════════════════════════════════════════
   LOGO THEME TUNING
   ปรับจุดที่ยัง hardcode สีส้มเดิมไว้ ให้รับกับโลโก้
   ฟ้า (ORIGINS) = สีไฮไลต์, ม่วง (สาดสีหลังโลโก้) = โทนพื้น,
   ส้ม/ทอง (NINJA) = ปุ่มหลัก, ชมพู (ONLINE) = จุดแต้ม
   ══════════════════════════════════════════════════════ */

/* พื้นหลัง: ไล่ม่วงเข้มแบบสาดสีหลังโลโก้ */
body {
  background:
    radial-gradient(70rem 46rem at 78% -6%, rgba(var(--violet-rgb), .30), transparent 62%),
    radial-gradient(52rem 40rem at 8% 6%,  rgba(var(--azure-rgb), .16),  transparent 60%),
    radial-gradient(60rem 44rem at 50% 104%, rgba(var(--pink-rgb), .12), transparent 64%),
    linear-gradient(180deg, var(--dark), var(--deep) 55%, #070310);
}

/* ฟิล์มคลุมวิดีโอพื้นหลัง ให้อมม่วงแทนอมส้ม */
#vid-bg::after {
  background:
    radial-gradient(circle at 50% 40%, transparent, rgba(var(--deep-rgb), .82) 70%),
    linear-gradient(180deg, rgba(var(--violet-rgb), .18), rgba(var(--deep-rgb), .92));
}

/* NAVBAR — ขอบเรืองฟ้า */
#navbar.scrolled {
  border-bottom: 1px solid rgba(var(--azure-rgb), .28);
  box-shadow: 0 8px 32px rgba(var(--deep-rgb), .6);
}

.nb-logo:hover { filter: drop-shadow(0 0 20px rgba(var(--azure-rgb), .75)); }
.nb-link:hover { color: var(--sky); }

.nb-cta {
  background: linear-gradient(135deg, var(--gold), var(--fire));
  box-shadow: 0 6px 22px rgba(var(--fire-rgb), .38);
}

/* HERO — เรืองแสงหลังโลโก้ใช้ม่วง+ฟ้า ตามสาดสีในโลโก้ */
.hero-logo {
  filter: drop-shadow(0 0 42px rgba(var(--violet-rgb), .60))
          drop-shadow(0 0 90px rgba(var(--azure-rgb), .34));
}

.hero-logo-wrap::after {
  background: radial-gradient(ellipse,
      rgba(var(--violet-rgb), .48),
      rgba(var(--azure-rgb), .22) 55%,
      transparent 72%);
  height: 60px;
}

/* Badge — ฟ้าแทนส้ม เพื่อไม่ให้ชนกับปุ่ม CTA */
.hero-badge {
  background: rgba(var(--azure-rgb), .12);
  border-color: rgba(var(--azure-rgb), .34);
  color: var(--sky);
}

.hero-eyebrow { color: var(--sky); }

/* บรรทัดแรกไล่ขาว→ฟ้า (ORIGINS) บรรทัดสองคงส้ม→ทอง (NINJA)
   ต้องใช้ background-image ไม่ใช่ background: shorthand ตัวเต็มจะรีเซ็ต
   background-clip กลับเป็น border-box ทำให้ข้อความที่ตั้ง text-fill-color
   เป็น transparent ไว้ กลายเป็นแถบสีตันแทนตัวอักษรไล่สี */
.hero-title .line1 {
  background-image: linear-gradient(135deg, #ffffff 0%, #d8f2ff 45%, var(--sky) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .line2 {
  background-image: linear-gradient(135deg, var(--gold) 0%, var(--amber) 45%, var(--fire) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub strong { color: var(--sky); }

/* เส้นคั่นล่าง hero ไล่สีครบทั้งโลโก้ */
#hero::before {
  background: linear-gradient(90deg,
      transparent, var(--azure), var(--violet), var(--pink), var(--gold), transparent);
  opacity: .75;
  height: 2px;
}

/* ปุ่มรอง — ขอบฟ้า */
.hbtn-ghost {
  border: 1px solid rgba(var(--azure-rgb), .38);
  color: var(--sky);
}

.hbtn-ghost:hover {
  background: rgba(var(--azure-rgb), .14);
  border-color: var(--azure);
  color: #fff;
}

/* FOOTER แบบแถบเดียวสำหรับหน้า splash */
.splash-footer {
  padding: 22px 20px;
  border-top: 1px solid var(--border);
  background: rgba(var(--deep-rgb), .5);
  text-align: center;
}

.splash-footer p { margin: 0; color: var(--txt3); font-size: 13px; }

.splash-footer .footer-brand-name {
  background: linear-gradient(135deg, var(--sky), var(--violet) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ══════════════════════════════════════════════════════
   SPLASH FIT
   หน้านี้เหลือแค่ hero แล้ว จึงบีบให้พอดีจอเดียวไม่ต้องเลื่อน
   ขนาดโลโก้อิงทั้งความกว้างและความสูงจอ กันโดนตัดหัวบนจอเตี้ย
   ══════════════════════════════════════════════════════ */
#hero {
  min-height: 100svh;
  padding-top: 96px;
  padding-bottom: 40px;
}

.hero-logo {
  width: clamp(170px, min(26vw, 32vh), 340px);
  margin-bottom: 0;
}

.hero-badge  { margin-bottom: 16px; }
.hero-eyebrow { margin-bottom: 10px; }
.hero-title  { margin-bottom: 10px; }
.hero-sub    { margin-bottom: 26px; }
.hero-btns   { margin-bottom: 0; }

/* จอเตี้ยมาก ๆ (โน้ตบุ๊ก 768p แนวนอน) ตัดของที่ไม่จำเป็นออกก่อน */
@media (max-height: 720px) and (min-width: 901px) {
  .hero-badge { display: none; }
  .hero-sub { margin-bottom: 20px; }
}

/* ══════════════════════════════════════════════════════
   SPLASH HEADLINE
   บรรทัดบนเป็นวลีไทยยาว บรรทัดล่างเป็นชื่อเกม จึงคุมขนาดแยกกัน
   letter-spacing ติดลบของต้นฉบับทำให้สระ/วรรณยุกต์ไทยเบียดกัน
   จึงคืนเป็นปกติเฉพาะบรรทัดไทย
   ══════════════════════════════════════════════════════ */
.hero-title { letter-spacing: normal; }

.hero-title .line1 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(18px, 2.6vw, 30px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: normal;
  margin-bottom: 6px;
}

.hero-title .line2 {
  font-size: clamp(32px, 5.6vw, 68px);
  line-height: 1.1;
  letter-spacing: -1px;
  font-style: normal;
}

.hero-sub strong {
  display: inline-block;
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--sky);
}
