/* =========================================================
   GameGate Platform — style.css
   ธีม Gaming/Tech มืด + นีออน | Mobile-First | Flexbox/Grid
   ========================================================= */

/* ---------- 1) ตัวแปรสี (CSS Variables) ---------- */
:root {
  --primary: #6C5CE7;      /* ม่วงหลัก */
  --primary-dark: #5544c7;
  --secondary: #00D2FF;    /* ฟ้านีออน */
  --accent: #00F5A0;       /* เขียวนีออน (ปุ่ม/เน้น) */
  --bg: #0B0E1A;           /* พื้นหลังเข้มสุด */
  --surface: #151A2E;      /* การ์ด/พื้นผิว */
  --surface-2: #1E2540;    /* พื้นผิวรอง */
  --text: #E8ECF5;         /* ตัวอักษรหลัก */
  --text-muted: #9AA3BD;   /* ตัวอักษรรอง */
  --border: #2A3252;       /* เส้นขอบ */
  --danger: #FF5470;       /* แดง (error) */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --shadow-glow: 0 0 28px rgba(108,92,231,.35);
  --max: 1180px;
  --font: "Segoe UI", "Prompt", "Sarabun", system-ui, -apple-system, sans-serif;
}

/* ---------- 2) Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
h1, h2, h3 { line-height: 1.25; font-weight: 700; }

/* พื้นหลังนีออนแบบเรเดียลจาง ๆ ทั้งหน้า */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 15% -10%, rgba(108,92,231,.20), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(0,210,255,.12), transparent 55%);
}

/* ---------- 3) Layout Helpers ---------- */
.container { width: 92%; max-width: var(--max); margin-inline: auto; }
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head .eyebrow {
  color: var(--accent); font-weight: 700; letter-spacing: 2px;
  font-size: .8rem; text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 8px 0 12px; }
.section-head p { color: var(--text-muted); }
.text-grad {
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- 4) ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700;
  cursor: pointer; border: none; font-size: .98rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  color: #04261a; box-shadow: 0 8px 24px rgba(0,245,160,.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,245,160,.42); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--secondary); color: var(--secondary); }

/* ---------- 5) Header / Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,14,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.logo .logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid; place-items: center; color: #fff; font-weight: 900;
  box-shadow: var(--shadow-glow);
}
.logo small { display: block; font-size: .65rem; color: var(--text-muted); font-weight: 500; letter-spacing: 1px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 14px; border-radius: 8px; color: var(--text-muted);
  font-weight: 600; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-links .btn { margin-left: 8px; }

/* ปุ่ม hamburger (ซ่อนบนเดสก์ท็อป) */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 3px; background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 6) Hero ---------- */
.hero { position: relative; padding: 72px 0 56px; }
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px; font-size: .82rem; color: var(--text-muted);
}
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin: 18px 0 14px; }
.hero p.lead { color: var(--text-muted); font-size: 1.08rem; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-visual {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

/* การ์ดสถิติลอยบน hero */
.hero-mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px;
}
.hero-mini-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.hero-mini-stats b { display: block; font-size: 1.3rem; color: var(--accent); }
.hero-mini-stats span { font-size: .76rem; color: var(--text-muted); }

/* ---------- 7) แถบสถิติ (Trust Stats) ---------- */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.stat-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 20px; text-align: center;
}
.stat-card b { font-size: 2rem; display: block; color: var(--text); }
.stat-card b span { color: var(--accent); }
.stat-card p { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

/* ---------- 8) จุดเด่น (Features) ---------- */
.features-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; transition: transform .2s, border-color .2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(108,92,231,.25), rgba(0,210,255,.2));
  border: 1px solid var(--border);
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: .94rem; }

/* ---------- 9) สินค้า/โมดูล (Product Cards) ---------- */
.product-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--secondary); }
.product-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(11,14,26,.8); border: 1px solid var(--border);
  color: var(--secondary); font-size: .72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px);
}
.product-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 1.08rem; }
.product-body .desc { color: var(--text-muted); font-size: .88rem; flex: 1; }
.product-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.product-price { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.product-price small { color: var(--text-muted); font-weight: 500; font-size: .72rem; }

/* ---------- 10) แถบค้นหา & ฟิลเตอร์ ---------- */
.shop-toolbar {
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px;
}
.search-box { position: relative; }
.search-box input {
  width: 100%; padding: 14px 16px 14px 44px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 1rem; font-family: var(--font);
}
.search-box input:focus { outline: none; border-color: var(--secondary); }
.search-box::before {
  content: "🔍"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); opacity: .7;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-weight: 600; font-size: .88rem; transition: all .2s;
}
.chip:hover { color: var(--text); }
.chip.active { background: linear-gradient(90deg, var(--primary), var(--secondary)); color: #fff; border-color: transparent; }
.no-result { text-align: center; color: var(--text-muted); padding: 40px; grid-column: 1/-1; }

/* ---------- 11) รีวิวลูกค้า ---------- */
.review-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.review-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.review-stars { color: #FFD166; margin-bottom: 10px; letter-spacing: 2px; }
.review-card p { color: var(--text); font-size: .96rem; }
.review-author { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.review-author img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--primary); }
.review-author b { display: block; font-size: .95rem; }
.review-author span { font-size: .8rem; color: var(--text-muted); }

/* ---------- 12) โลโก้พาร์ทเนอร์ ---------- */
.partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.partner-pill {
  background: var(--surface); border: 1px solid var(--border);
  padding: 12px 22px; border-radius: 999px; color: var(--text-muted);
  font-weight: 700; font-size: .92rem;
}

/* ---------- 13) CTA Band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  border-radius: var(--radius); padding: 44px 28px; text-align: center; color: #fff;
  box-shadow: var(--shadow-glow);
}
.cta-band h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 10px; }
.cta-band p { opacity: .92; margin-bottom: 22px; }
.cta-band .btn-primary { background: #fff; color: var(--primary); }

/* ---------- 14) ขั้นตอน (Steps / How to order) ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 18px; counter-reset: step; }
.step-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px 22px;
}
.step-card::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; left: 22px;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid; place-items: center; font-weight: 800; color: #fff;
  box-shadow: var(--shadow-glow);
}
.step-card h3 { margin: 10px 0 6px; font-size: 1.1rem; }
.step-card p { color: var(--text-muted); font-size: .92rem; }

/* ---------- 15) ตาราง (บัญชีธนาคาร / ค่าบริการ) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); color: var(--text); font-size: .9rem; }
tbody tr:hover { background: var(--surface); }
td .bank { display: flex; align-items: center; gap: 10px; font-weight: 600; }
td .bank .bank-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .8rem; color: #fff; font-weight: 800; }

/* กล่องวิธีชำระเงิน 2 แบบ */
.pay-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.pay-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.pay-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pay-card ul.dots li { color: var(--text-muted); margin: 7px 0; padding-left: 20px; position: relative; font-size: .92rem; }
.pay-card ul.dots li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* ---------- 16) FAQ (Accordion) ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; color: var(--text);
  padding: 18px 20px; font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font);
}
.faq-q .arrow { transition: transform .25s; color: var(--secondary); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 20px 18px; color: var(--text-muted); font-size: .94rem; }

/* ---------- 17) ฟอร์มติดต่อ ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.info-row { display: flex; gap: 14px; margin-bottom: 18px; }
.info-row .ico {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(108,92,231,.25), rgba(0,210,255,.2)); border: 1px solid var(--border); font-size: 1.2rem;
}
.info-row b { display: block; }
.info-row span { color: var(--text-muted); font-size: .92rem; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .92rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-size: 1rem; font-family: var(--font);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--secondary); }
.field textarea { resize: vertical; min-height: 120px; }
.field .err { color: var(--danger); font-size: .82rem; margin-top: 5px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .err { display: block; }
.form-success {
  display: none; background: rgba(0,245,160,.12); border: 1px solid var(--accent);
  color: var(--accent); padding: 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600;
}
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-wrap iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ---------- 18) Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 48px 0 28px; }
.footer-col h4 { margin-bottom: 14px; font-size: 1rem; }
.footer-col p, .footer-col a { color: var(--text-muted); font-size: .9rem; }
.footer-col a { display: block; margin: 8px 0; transition: color .2s; }
.footer-col a:hover { color: var(--secondary); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; text-align: center; color: var(--text-muted); font-size: .85rem; }

/* ---------- 19) Scroll Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 20) Responsive (Tablet/Desktop) ---------- */
@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .pay-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .shop-toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
  .search-box { flex: 1; max-width: 360px; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1.1fr; }
}

/* ---------- 21) เมนูมือถือ (≤ 860px) ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 16px 5%; transform: translateY(-130%); transition: transform .3s ease;
    box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px; border-radius: 8px; }
  .nav-links .btn { margin: 8px 0 0; justify-content: center; }
}
