/* ==========================================================================
   PGW44J — www.pgw44j.com
   ธีมเข้ม ตัวจริงเสียงจริง: พื้น #1a1a1a การ์ด #33373d เขียวนีออน #00FF88
   ========================================================================== */

:root {
  --bg: #1a1a1a;
  --bg-deep: #141414;
  --bg-header: #1f2124;
  --card: #33373d;
  --card-soft: #2a2d33;
  --line: #3f444b;
  --text: #ffffff;
  --text-dim: #b8bec6;
  --green: #00ff88;
  --green-dark: #00c96a;
  --gold: #ffdd00;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --container: 1180px;
  --font: "Prompt", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: #101214; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: transparent;
}
/* พื้นหลังโมเดิร์น: แสงเรืองแบบ aurora */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 560px at 82% -120px, rgba(0, 255, 136, .16), transparent 62%),
    radial-gradient(900px 500px at -12% 8%, rgba(0, 140, 255, .10), transparent 58%),
    radial-gradient(800px 520px at 108% 78%, rgba(255, 221, 0, .07), transparent 58%),
    radial-gradient(700px 480px at 15% 108%, rgba(0, 255, 136, .08), transparent 60%);
}
/* พื้นหลังโมเดิร์น: ลายกริดไฮเทค จางลงด้านล่าง */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 120% 85% at 50% 0%, #000 35%, transparent 92%);
  mask-image: radial-gradient(ellipse 120% 85% at 50% 0%, #000 35%, transparent 92%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: clamp(1.65rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1.3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--green); color: #08130c; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; transition: top .2s;
}
.skip-link:focus { top: 8px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-block; font-family: inherit; font-weight: 600; font-size: 1rem;
  padding: 12px 28px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary {
  background: linear-gradient(135deg, var(--green), #21e786);
  color: #08130c; box-shadow: 0 6px 18px rgba(0, 255, 136, .35);
}
.btn--primary:hover { box-shadow: 0 10px 24px rgba(0, 255, 136, .45); }
.btn--gold {
  background: linear-gradient(135deg, var(--gold), #ffb800);
  color: #241d00; box-shadow: 0 6px 18px rgba(255, 221, 0, .30);
}
.btn--ghost { background: transparent; color: var(--text); border: 2px solid var(--line); }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }
.btn--lg { font-size: 1.1rem; padding: 14px 36px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(31, 33, 36, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.25rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand small { display: block; font-size: .66rem; font-weight: 500; color: var(--green); letter-spacing: .5px; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__list a {
  display: block; padding: 10px 16px; border-radius: 8px;
  color: var(--text-dim); font-weight: 500;
}
.nav__list a:hover { color: var(--text); background: var(--card-soft); text-decoration: none; }
.nav__list a[aria-current="page"] { color: var(--green); background: rgba(0, 255, 136, .10); }
.nav__cta { margin-left: 10px; padding: 9px 22px !important; font-weight: 600 !important; color: #08130c !important; background: var(--green); border-radius: 999px !important; }
.nav__cta:hover { background: #35ffa2 !important; color: #08130c !important; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px; border-radius: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; margin: 6px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 28px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.hero__lead { color: var(--text-dim); max-width: 60ch; }
.hero__title em { color: var(--green); font-style: normal; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; }
.hero__badges li {
  font-size: .85rem; color: var(--text-dim);
  background: var(--card-soft); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
}
.hero__badges b { color: var(--gold); font-weight: 600; }
.hero__media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.banner-strip { margin-top: 22px; }
.banner-strip a { display: block; max-width: 900px; margin-inline: auto; border-radius: var(--radius); overflow: hidden; }
.banner-strip img { width: 100%; }

/* ---------- Sections / เนื้อหา ---------- */
.section { padding: 40px 0; }
.section--alt { background: var(--bg-deep); border-block: 1px solid #232323; }
.section__head { text-align: center; max-width: 760px; margin: 0 auto 26px; }
.section__head h2 { position: relative; padding-bottom: 14px; }
.section__head h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 84px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}
.section__head p { color: var(--text-dim); margin: 12px 0 0; }

.prose { max-width: 900px; margin-inline: auto; }
.prose p { color: var(--text-dim); }
.prose p:last-child { margin-bottom: 0; }
.prose .prose__label { color: var(--gold); font-weight: 600; }

/* การ์ดค่ายเกม */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.provider-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform .2s, border-color .2s;
}
.provider-card:hover { transform: translateY(-4px); border-color: rgba(0, 255, 136, .5); }
.provider-card h3 { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 1.05rem; }
.provider-card h3::before { content: "🎯"; font-size: 1rem; }
.provider-card p { color: var(--text-dim); font-size: .95rem; margin: 0; }

/* จุดเด่น */
.why-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; counter-reset: why; }
.why-list li {
  counter-increment: why; display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--text-dim);
}
.why-list li::before {
  content: counter(why); flex: 0 0 auto;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green), #21e786); color: #08130c;
  font-weight: 700; font-size: 1.05rem; border-radius: 12px;
}

/* FAQ */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 18px;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 15px 0; list-style: none;
  position: relative; padding-right: 34px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--green); font-size: 1.4rem; font-weight: 500;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-dim); padding-bottom: 15px; margin: 0; }

/* CTA กลางหน้า */
.cta-box {
  text-align: center; background: linear-gradient(160deg, #213a2d, #1c1c1c 60%);
  border: 1px solid rgba(0, 255, 136, .35); border-radius: var(--radius);
  padding: 40px 24px;
}
.cta-box p { color: var(--text-dim); max-width: 62ch; margin: 0 auto 20px; }

/* ---------- โปรโมชั่น ---------- */
.promo-card {
  display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 22px;
}
.promo-card__media img { width: 100%; height: 100%; object-fit: cover; }
.promo-card__body { padding: 24px 24px 24px 0; }
.promo-card__body h2 { color: var(--green); }
.promo-card__body ul { display: grid; gap: 10px; margin-top: 12px; }
.promo-card__body li {
  background: var(--card-soft); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 8px; padding: 10px 14px; color: var(--text-dim);
}
.promo-card__body li b { color: var(--text); }

/* ---------- บทความ ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.post-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  color: var(--text); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-5px); border-color: rgba(0, 255, 136, .55); box-shadow: var(--shadow); text-decoration: none; }
.post-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.post-card__body { padding: 16px 18px 20px; }
.post-card__body h2 { font-size: 1.02rem; margin: 0 0 6px; line-height: 1.45; }
.post-card__body span { color: var(--green); font-size: .9rem; font-weight: 500; }
.post-card__body span::after { content: " →"; }

/* ---------- หน้าบทความเดี่ยว ---------- */
.article-wrap { max-width: 860px; margin-inline: auto; }
.article-meta { color: #88909b; font-size: .9rem; margin: 4px 0 20px; }
.article-cover { border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 auto 28px; max-width: 480px; }
.article-body p { color: var(--text-dim); }
.article-body h2 { color: var(--green); margin-top: 1.5em; }
.article-body h3 { margin-top: 1.2em; }
.article-body ul { margin: 0 0 1em; padding: 0; list-style: none; display: grid; gap: 8px; }
.article-body ul li { position: relative; padding-left: 28px; color: var(--text-dim); }
.article-body ul li::before { content: "✔"; position: absolute; left: 0; color: var(--green); }
.article-body ol { margin: 0 0 1em; padding-left: 24px; color: var(--text-dim); }
.article-body ol li { margin-bottom: 6px; }
.article-body b, .article-body strong { color: var(--text); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.article-tags a, .article-tags span {
  background: var(--card-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 14px; font-size: .82rem; color: var(--text-dim);
}
.article-tags a:hover { color: var(--green); border-color: rgba(0, 255, 136, .5); text-decoration: none; }
.related { margin-top: 46px; padding-top: 34px; border-top: 1px solid var(--line); }
.related h2 { text-align: center; margin-bottom: 22px; }
@media (min-width: 768px) {
  .related .post-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Sidebar / Footer ---------- */
.site-footer { background: var(--bg-header); border-top: 1px solid var(--line); margin-top: 40px; }
.footer-widgets {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 44px 0 30px;
}
.widget h2, .widget h3 { font-size: 1.05rem; color: var(--gold); margin-bottom: 14px; }
.widget li + li { margin-top: 8px; }
.widget a { color: var(--text-dim); }
.widget a:hover { color: var(--green); }

.footer-bottom {
  border-top: 1px solid var(--line); padding: 18px 0;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center;
  color: #88909b; font-size: .88rem;
}
.footer-bottom a { color: #88909b; }
.footer-age { font-size: .8rem; }

/* ---------- Quick bar (มือถือ) ---------- */
.quick-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(31, 33, 36, .97); border-top: 1px solid var(--line);
  grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.quick-bar a, .quick-bar button {
  display: grid; place-items: center; gap: 2px; background: none; border: 0; cursor: pointer;
  color: var(--text-dim); font-family: inherit; font-size: .72rem; font-weight: 500;
  padding: 4px 2px; border-radius: 8px;
}
.quick-bar a:hover, .quick-bar button:hover { color: var(--green); text-decoration: none; }
.quick-bar .qi { font-size: 1.15rem; line-height: 1; }
.quick-bar .quick-bar__cta { color: var(--green); font-weight: 600; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
.modal__box {
  position: relative; width: min(420px, 100%); text-align: center;
  background: linear-gradient(170deg, #2b2f35, #222529);
  border: 1px solid rgba(0, 255, 136, .4); border-radius: 18px;
  padding: 38px 26px 30px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  animation: modal-pop .22s ease;
}
@keyframes modal-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__box img { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; border: 3px solid var(--green); }
.modal__box h2 { font-size: 1.2rem; margin-bottom: 8px; }
.modal__box p { color: var(--text-dim); font-size: .95rem; margin-bottom: 20px; }
.modal__box .btn { width: 100%; }
.modal__close {
  position: absolute; top: 10px; right: 12px; width: 38px; height: 38px;
  background: none; border: 0; cursor: pointer; color: var(--text-dim);
  font-size: 1.5rem; line-height: 1; border-radius: 8px;
}
.modal__close:hover { color: var(--text); background: var(--card-soft); }
body.modal-open { overflow: hidden; }

/* ---------- ลูกกลิ้งขึ้นบน ---------- */
.to-top {
  position: fixed; right: 16px; bottom: 76px; z-index: 80;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--green); font-size: 1.2rem; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 16px 0 0; font-size: .88rem; color: #88909b; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--line); }
.breadcrumb a { color: #88909b; }
.breadcrumb [aria-current] { color: var(--green); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 520px; margin-inline: auto; }
  .promo-card { grid-template-columns: 1fr; }
  .promo-card__body { padding: 0 24px 24px; }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-header); border-bottom: 1px solid var(--line);
    display: none; padding: 10px 16px 16px; box-shadow: var(--shadow);
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__list a { padding: 12px 14px; }
  .nav__cta { margin: 8px 0 0; text-align: center; }
  .quick-bar { display: grid; }
  .to-top { bottom: 84px; }
  body { padding-bottom: 58px; }
  .footer-widgets { grid-template-columns: 1fr; gap: 26px; }
  .section { padding: 30px 0; }
}
@media (min-width: 768px) {
  .nav { display: block !important; }
}

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