/* ==========================================================================
   ขึ้นโครง 2 — สไตล์รวม
   เลย์เอาต์ถอดจาก truecrimethailand.com ทุกจุด
   แต่ชุดสีเป็น "ม่วงนีออน" ของงานนี้โดยเฉพาะ

   พื้นหลังหน้า      #12071F  ม่วงเข้มเกือบดำ
   หัวเว็บ           ไล่สี #0C0416 -> #2A1152
   ฟุตเตอร์          ไล่สี #2A1152 -> #000000 ขอบบน 2px #22D3EE
   กล่องเนื้อหา      พื้น #20103A ขอบ 2px #8B5CF6 เงา 0 0 14px ม่วง
   หัวข้อ H1 H2      #FF4FA3  ชมพูนีออน
   ตัวอักษรเนื้อหา   #ECE8F6  ขาวอมม่วง ขนาด 18px
   ปุ่ม              ไล่สี #FF4FA3 -> #7C3AED ตัวอักษรขาว มุมโค้ง 25px
   รูป               ขอบ 2px #8B5CF6 มุมโค้ง 5px
   ความกว้างคอนเทนเนอร์ 1140px
   ========================================================================== */

/* ---------- 1) ตัวแปร ---------- */
:root {
  --bg:          #12071F;
  --surface:     #20103A;
  --head-1:      #0C0416;
  --head-2:      #2A1152;

  --line:        #8B5CF6;   /* ม่วงอ่อน ใช้เป็นเส้นขอบ */
  --pink:        #FF4FA3;   /* ชมพูนีออน หัวข้อกับปุ่ม */
  --violet:      #7C3AED;   /* ม่วงเข้ม ปลายไล่สีปุ่ม */
  --cyan:        #22D3EE;   /* ฟ้านีออน เส้นคั่นกับหัวข้อฟุตเตอร์ */

  --text:        #ECE8F6;
  --shadow:      0 0 14px 0 rgba(124, 58, 237, .55);

  --wrap:        1140px;
}

/* ---------- 2) รีเซ็ต ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Prompt", "Noto Sans Thai", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: "Prompt", sans-serif; font-weight: 600; line-height: 1.4; margin: 0 0 16px; color: var(--pink); }
h1 { font-size: 32px; }
h2 { font-size: 27px; margin-top: 40px; }
h3 { font-size: 20px; }
p  { margin: 0 0 18px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--pink); color: #fff; padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- 3) ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px;
  background-image: linear-gradient(180deg, var(--pink) 0%, var(--violet) 100%);
  color: #FFFFFF;
  border: 0; border-radius: 25px;
  box-shadow: var(--shadow);
  font-family: "Prompt", sans-serif; font-size: 15px; font-weight: 500; line-height: 1;
  cursor: pointer; transition: transform .18s, filter .18s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.12); text-decoration: none; color: #FFFFFF; }
.btn-lg { padding: 16px 40px; font-size: 17px; }

.btn-outline {
  background-image: none; background-color: transparent;
  color: var(--cyan); border: 2px solid var(--cyan); box-shadow: none;
}
.btn-outline:hover { background-color: rgba(34, 211, 238, .14); color: var(--cyan); }

/* ---------- 4) หัวเว็บ ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background-image: linear-gradient(180deg, var(--head-1) 0%, var(--head-2) 100%);
  border-bottom: 2px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 68px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--pink); }
.logo img { height: 38px; width: auto; }
.logo:hover { text-decoration: none; }

.nav { margin-left: auto; }
.nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 15px 29px; color: #FFFFFF; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--cyan); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--cyan); }

.header-social { display: flex; gap: 8px; }
.header-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 2px solid var(--line); border-radius: 50%; color: var(--cyan);
}
.header-social a:hover { background: rgba(139, 92, 246, .22); }
.header-social svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.header-cta { display: flex; gap: 8px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; border: 2px solid var(--line); color: var(--cyan);
  width: 44px; height: 44px; border-radius: 5px; font-size: 1.15rem; cursor: pointer;
}

/* ---------- 5) รูป ---------- */
/* ต้นแบบใส่ขอบสีให้รูปทุกใบ หนา 2px มุมโค้ง 5px */
.banner { margin: 0 0 30px; }
.banner img {
  width: 100%;
  border: 2px solid var(--line); border-radius: 5px;
  box-shadow: var(--shadow);
}
.band { margin-block: 36px; }

/* แบนเนอร์หน้าแรก เว้นระยะบนเท่าหน้าย่อย ไม่ให้ติดหัวเว็บ */
.hero-top { padding-top: 42px; }

/* แถวโปรโมชั่น 3 ใบ รูปจัตุรัส */
.promo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.promo-card { display: block; transition: transform .2s; }
.promo-card img { width: 100%; border: 2px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.promo-card:hover { transform: translateY(-4px); text-decoration: none; }
.promo-card:hover img { border-color: var(--pink); }

/* แถวหมวดเกม 4 ใบ */
.game-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-block: 34px; }

/* ปุ่มเรียกให้สมัคร คั่นกลางเนื้อหา */
.cta-center { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-block: 34px 40px; }

/* ---------- 6) คีย์เวิร์ดในเนื้อหา ---------- */
/* คำหลัก = ลิงก์ชมพู ขีดเส้นใต้ */
.kw { color: var(--pink); font-weight: 700; font-style: italic; text-decoration: underline; text-underline-offset: 3px; }
/* คำญาติ = ข้อความสี ไม่ทำลิงก์ เลือกสีที่เด่นบนพื้นม่วง */
.kw-alt { font-weight: 700; font-style: italic; white-space: nowrap; }
.kw-alt-1 { color: #A3F76B; }
.kw-alt-2 { color: #FFC857; }
.kw-alt-3 { color: #5EE7F5; }
.kw-alt-4 { color: #FF9F5A; }
.kw-alt-5 { color: #7CFFC4; }
.kw-alt-6 { color: #9DB8FF; }

/* ---------- 8) FAQ ---------- */
.faq details {
  background: var(--surface); border: 2px solid var(--line); border-radius: 5px;
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.faq details[open] { border-color: var(--cyan); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 54px 16px 22px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%); color: var(--cyan); font-size: 26px; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq summary h3 { display: inline; font-size: 18px; margin: 0; color: var(--pink); }
.faq .faq-body { padding: 0 22px 18px; color: var(--text); font-size: 16px; }
.faq .faq-body p { margin: 0; }

/* ---------- 9) ฟุตเตอร์ ---------- */
.site-footer {
  background-image: linear-gradient(180deg, var(--head-2) 30%, #000000 100%);
  border-top: 2px solid var(--cyan);
  margin-top: 55px; padding-block: 42px 36px;
}
.footer-top { text-align: center; }
.footer-logo { width: 220px; max-width: 70%; height: auto; margin: 0 auto 18px; }
.footer-top p { color: var(--text); font-size: 16px; max-width: 64ch; margin-inline: auto; }
.partner-link { display: inline-block; margin-bottom: 18px; font-weight: 600; color: var(--cyan); }

.partnership { text-align: center; margin-top: 32px; }
.partnership-title { font-size: 17px; font-weight: 600; letter-spacing: 2px; color: var(--cyan); margin: 0 0 14px; }
.partnership img { margin-inline: auto; max-width: 320px; border-radius: 5px; }

.copyright { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(236, 232, 246, .35); color: var(--text); font-size: 14px; text-align: center; }

.footer-lists { display: flex; flex-wrap: wrap; gap: 48px; justify-content: center; margin-top: 28px; }
.footer-lists h3 { font-size: 17px; font-weight: 600; color: var(--cyan); margin-bottom: 12px; }
.footer-lists ul { list-style: none; margin: 0; padding: 0; }
.footer-lists li { margin-bottom: 8px; }
.footer-lists a { color: var(--text); font-size: 16px; }
.footer-lists a:hover { color: var(--pink); }

.pay-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.pay-row img { width: 100%; max-width: 340px; height: auto; }

/* ---------- 10) หน้าย่อย (บางตามต้นแบบ) ---------- */
.thin-page { padding-block: 42px 12px; text-align: center; }
.thin-page h1 { margin-bottom: 26px; }
.thin-page .banner { margin-bottom: 0; }

/* ---------- 11) เส้นคั่น ---------- */
.divider { border-bottom: 2px solid var(--line); margin-block: 38px; }

/* ---------- 12) จอเล็ก ---------- */
@media (max-width: 1024px) {
  :root { --wrap: 1024px; }
}

@media (max-width: 767px) {
  body { font-size: 16px; line-height: 1.85; }
  h1 { font-size: 26px; }
  h2 { font-size: 22px; margin-top: 32px; }

  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #190C2B; border-bottom: 2px solid var(--line); padding: 8px 0;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 13px 20px; }
  .nav a:hover { background: #2A1152; }

  .nav-toggle { display: block; }
  .header-social, .header-cta { display: none; }

  /* รูปทะลุขอบจอ */
  .banner { margin-inline: -16px; }
  .banner img { border-left: 0; border-right: 0; border-radius: 0; }

  /* โปรโมชั่นเรียงลงมาทีละใบ หมวดเกมเหลือ 2 คอลัมน์ */
  .promo-row { grid-template-columns: 1fr; gap: 14px; }
  .game-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .footer-lists { gap: 30px; }
}

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