/* =====================================================================
   ไฟล์ตกแต่งหน้าตา
   ✏️ แก้แค่กล่อง :root ด้านล่าง สีทั้งเว็บจะเปลี่ยนตาม
   ทำเว็บใหม่ให้หน้าตาไม่ซ้ำ → เปลี่ยนสีชุดนี้ + รูปพื้นหลัง + โลโก้
   เลือกรหัสสีได้ที่ https://htmlcolorcodes.com/
   ===================================================================== */
:root {
  /* ✏️ แก้ได้: รูปพื้นหลังทั้งหน้า (อยู่กับที่ตอนเลื่อน) */
  --page-bg-image: url("https://picsum.photos/seed/bizbg/1920/1080?blur=4");
  /* ✏️ แก้ได้: สีที่เคลือบทับรูปพื้นหลัง (ทำให้รูปเป็นโทนเดียวกับธีม) */
  --page-bg-tint: rgba(64, 64, 64, .72);

  /* ✏️ แก้ได้: สีกล่องเนื้อหา (ไล่ 3 สี จากเข้มไปอ่อน) */
  --panel-1: rgba(18, 18, 18, .87);
  --panel-2: rgba(69, 69, 69, .80);
  --panel-3: rgba(89, 89, 89, .71);
  /* ✏️ แก้ได้: สีขอบเรืองแสงของกล่อง */
  --glow: rgba(255, 234, 140, .45);

  /* ✏️ แก้ได้: สีหัวข้อ / สีตัวหนา / สีเนื้อหา */
  --heading: #ffff00;
  --highlight: #FC0A0A;
  --text: #f1f1f1;

  /* ✏️ แก้ได้: สีปุ่มเขียว (ไล่ 3 สี) และสีตัวหนังสือบนปุ่ม */
  --btn-1: #FFEA8C;
  --btn-2: #FCD935;
  --btn-3: #997E00;
  --btn-text: #000000;

  /* ✏️ แก้ได้: สีทอง (โลโก้ ปุ่มใหญ่) */
  --gold-1: #fff6b0;
  --gold-2: #f2c94c;
  --gold-3: #b7791f;

  /* ✏️ แก้ได้: สีแถบข้อความวิ่ง */
  --marquee-bg: #1F1F1F;
  --marquee-text: #E8E8E8;

  /* ✏️ แก้ได้: ฟอนต์ ความโค้งกล่อง ความกว้างหน้า */
  --font: "Kanit", system-ui, sans-serif;
  --radius: 18px;
  --page-width: 1170px;
}

/* =====================================================================
   ⚠️ ด้านล่างคือโครงสร้าง — ไม่ถนัดไม่ต้องแก้
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: #000 var(--page-bg-image) center / cover fixed no-repeat;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  background: var(--page-bg-tint);
  min-height: 100vh;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
b { color: var(--highlight); }
h1, h2, h3, h4 { color: var(--heading); font-weight: 700; line-height: 1.4; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.6rem; }

.page { max-width: var(--page-width); margin: 0 auto; overflow-x: clip; }

/* ---------- กล่องเนื้อหา ---------- */
.panel {
  background: linear-gradient(135deg, var(--panel-1), var(--panel-2), var(--panel-3));
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(11, 34, 10, .67), 0 0 9px var(--glow);
  border: 1px solid rgba(200, 233, 120, .25);
  padding: 20px 24px;
  margin: 20px 0;
}
.panel.dark { background: linear-gradient(160deg, rgba(10, 30, 8, .92), rgba(25, 60, 16, .88)); }
.panel-center { text-align: center; }
.panel-center p { margin: 0 auto; max-width: 1080px; }
.leaf { font-size: .9em; margin-right: 4px; }
.col-text { text-align: center; }
.col-text ul { text-align: left; display: inline-block; margin: 0; padding-left: 20px; }
.col-text li { margin-bottom: 8px; }

/* ---------- ส่วนหัว ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, var(--panel-1), var(--panel-2), var(--panel-3));
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
}
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 56px; padding: 0 16px; }
.nav { display: flex; align-items: center; gap: 18px; font-size: .82rem; font-weight: 700; }
.nav a { text-decoration: none; color: #fff; opacity: .9; }
.nav a.active, .nav a:hover { opacity: 1; text-shadow: 0 0 8px var(--btn-2); }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 170px; padding: 8px 0; margin-top: 10px;
  background: var(--panel-1); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.dropdown-menu a { display: block; padding: 6px 16px; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.caret { font-size: .7em; }
.logo { text-decoration: none; font-size: 1.9rem; font-weight: 900; justify-self: center; }
.header-actions { display: flex; gap: 10px; justify-self: end; }
.menu-toggle { display: none; }

/* ตัวหนังสือสีทอง (โลโก้) */
.gold-text {
  font-weight: 900; letter-spacing: .5px;
  background: linear-gradient(180deg, var(--gold-1) 10%, var(--gold-2) 50%, var(--gold-3) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(60, 40, 0, .6);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)) drop-shadow(0 0 6px rgba(242, 201, 76, .45));
}

/* ---------- ปุ่มเขียว ---------- */
.btn-green {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 16px; border: 1px solid #e7f7a5; text-decoration: none;
  background: linear-gradient(135deg, var(--btn-1), var(--btn-2), var(--btn-3));
  color: var(--btn-text); font-weight: 900; font-size: .95rem;
  box-shadow: 0 0 11px var(--btn-2), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .15s, filter .15s;
}
.btn-green:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-green .ico { font-size: .9em; }
.btn-green.lg { height: 54px; font-size: 1.15rem; justify-content: center; }

/* ---------- ข้อความวิ่ง ---------- */
.marquee {
  display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 10px 16px;
  background: var(--marquee-bg); border-radius: 0 0 10px 10px;
}
.marquee-label {
  flex: none; padding: 4px 15px; border: 1px solid var(--marquee-text); border-radius: 6px;
  color: var(--marquee-text); font-weight: 700; font-size: .875rem; box-shadow: 0 0 5px var(--marquee-text);
}
.marquee-window { overflow: hidden; flex: 1; }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { white-space: nowrap; color: var(--marquee-text); font-size: .95rem; padding-right: 40px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- แบนเนอร์ ---------- */
.hero { position: relative; margin-top: 20px; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.6); }
.hero img { width: 100%; aspect-ratio: 1170 / 658; object-fit: cover; }
.hero-logos {
  position: absolute; right: 16px; bottom: 16px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px;
  width: min(66%, 760px);
}
.hero-logos span {
  display: grid; place-items: center; height: 56px; padding: 0 4px; border-radius: 8px; text-align: center;
  background: rgba(255,255,255,.92); color: #1d3b12; font-size: .75rem; font-weight: 700; box-shadow: 0 3px 8px rgba(0,0,0,.4);
}

/* ---------- การ์ดหมุน 3D ---------- */
.coverflow { position: relative; height: 380px; margin: 10px 0; perspective: 1200px; overflow: hidden; }
.cf-stage { position: absolute; inset: 0; transform-style: preserve-3d; }
.cf-card {
  position: absolute; left: 50%; top: 20px; width: 200px; margin-left: -100px;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .6s, filter .6s;
}
.cf-card a {
  display: block; padding: 10px; border-radius: 14px; text-decoration: none; text-align: center;
  background: linear-gradient(180deg, #1c2a1a, #0d150c); border: 1px solid rgba(200,233,120,.35);
  box-shadow: 0 10px 25px rgba(0,0,0,.6);
}
.cf-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; }
.cf-card h3 { color: #fff; font-size: .95rem; margin: 8px 0 4px; }
.cf-card .tag {
  display: inline-block; padding: 1px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: linear-gradient(90deg, var(--gold-2), var(--gold-3)); color: #241600;
}
.cf-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #e7f7a5; background: rgba(16,43,12,.85); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.cf-prev { left: 10px; } .cf-next { right: 10px; }

/* ---------- ปุ่มทองใหญ่ ---------- */
.big-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 0 70px; margin: 10px 0; }
.btn-gold {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; height: 96px;
  border-radius: 999px; text-decoration: none; font-size: 2.4rem; font-weight: 900; color: var(--bigbtn-text, #fff);
  text-shadow: 0 2px 0 var(--bigbtn-3, #145a12), 0 0 10px rgba(0,0,0,.4);
  background: linear-gradient(180deg, var(--bigbtn-1, #4fb53a), var(--bigbtn-2, #1f7a1c) 60%, var(--bigbtn-3, #145a12));
  border: 5px solid var(--bigbtn-border, var(--gold-2));
  box-shadow: 0 0 0 2px var(--bigbtn-border2, var(--gold-3)), 0 0 22px var(--bigbtn-glow, rgba(242,201,76,.7)), inset 0 3px 8px rgba(255,255,255,.35);
  transition: transform .15s;
}
.btn-gold:hover { transform: scale(1.03); }
.btn-gold .crown {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; font-size: 1.8rem;
  background: radial-gradient(circle, var(--bigbtn-2, #2a6e1e), var(--bigbtn-3, #123d0e)); border: 3px solid var(--bigbtn-border, var(--gold-2));
}
.btn-gold .arrow { font-size: 3rem; color: var(--bigbtn-arrow, var(--gold-1)); line-height: 1; }

/* ---------- 2 คอลัมน์ รูป + เนื้อหา ---------- */
.two-col { display: grid; grid-template-columns: 45% 1fr; gap: 28px; align-items: center; padding: 16px; }
.two-col.reverse { grid-template-columns: 1fr 45%; }
.poster { width: 100%; border-radius: 14px; box-shadow: 0 6px 16px rgba(0,0,0,.5); }

/* ---------- รูปโปรโมชั่น ---------- */
.promo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 20px 0; }
.promo-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; box-shadow: 0 6px 16px rgba(0,0,0,.5); transition: transform .2s; }
.promo-row a:hover img { transform: translateY(-4px); }

/* ---------- ปุ่ม 3 ปุ่ม ---------- */
.three-buttons { display: grid; grid-template-columns: repeat(3, 240px); justify-content: center; gap: 20px; margin: 10px 0; }

/* ---------- 2 คอลัมน์ รีวิว + เนื้อหา ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.split > .panel { margin: 20px 0; }
.list-title { text-align: center; color: var(--heading); font-weight: 400; }
.list-window { height: 270px; overflow: hidden; }
.list-track { animation: listUp 14s linear infinite; }
.list-window:hover .list-track { animation-play-state: paused; }
@keyframes listUp { to { transform: translateY(-50%); } }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(87,149,46,.55), rgba(40,95,24,.55)); border: 1px solid rgba(200,233,120,.5);
}
.list-row img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold-2); }
.list-row > div { flex: 1; min-width: 0; }
.list-row .meta { font-size: .85rem; }
.list-row em { color: var(--gold-2); font-style: normal; font-weight: 700; }
.list-row .msg { font-size: .9rem; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stars { color: var(--gold-2); font-size: .9rem; white-space: nowrap; }

/* ---------- ส่วนท้าย ---------- */
.footer { margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 24px; align-items: center; padding: 24px; margin-bottom: 0; }
.footer-brand { text-align: center; }
.gold-text.big { font-size: 5rem; line-height: 1.2; }
.footer-info { text-align: center; }
.footer-info p { margin: 4px 0; }
.footer-info h4 { color: #fff; margin-top: 16px; }
.footer-info a { text-decoration: none; }
.logo-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin-bottom: 14px; }
.logo-grid span {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; font-size: .6rem; font-weight: 700;
  background: linear-gradient(135deg, #3a3a3a, #121212); border: 1px solid #555; color: #bbb;
}
.pay-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pay-row span { padding: 4px 12px; border-radius: 6px; background: #fff; color: #1d3b12; font-size: .8rem; font-weight: 700; }
.copyright { margin-top: 20px; padding: 26px 16px; background: #000; text-align: center; font-size: .85rem; color: #aaa; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none; font-weight: 900; color: var(--btn-text);
  background: linear-gradient(135deg, var(--btn-1), var(--btn-2), var(--btn-3)); box-shadow: 0 0 10px var(--btn-2);
}

/* ---------- จอแท็บเล็ต / มือถือ ---------- */
@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .nav, .header-actions { display: none; }
  .logo { justify-self: start; font-size: 1.6rem; }
  .menu-toggle {
    display: block; grid-column: 3; background: none; border: 1px solid #e7f7a5; color: #fff;
    border-radius: 8px; font-size: 1.3rem; width: 42px; height: 38px; cursor: pointer;
  }
  .header.open { background: linear-gradient(160deg, #102b0c, #285f18); }
  .header.open .nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
    grid-column: 1 / -1; grid-row: 2; padding: 12px 0 16px; font-size: 1rem;
  }
  .header.open .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; background: none; box-shadow: none; padding: 4px 0 0 12px; margin: 0; }
  .header.open .header-actions { display: flex; grid-column: 1 / -1; grid-row: 3; justify-self: start; padding-bottom: 14px; flex-wrap: wrap; }
  .hero-logos { position: static; width: 100%; grid-template-columns: repeat(4, 1fr); padding: 10px; background: rgba(0,0,0,.4); }
  .hero-logos span { height: 40px; font-size: .7rem; }
  .big-buttons { padding: 0 12px; gap: 12px; }
  .btn-gold { height: 70px; font-size: 1.5rem; border-width: 3px; }
  .btn-gold .crown { width: 44px; height: 44px; font-size: 1.2rem; }
  .btn-gold .arrow { font-size: 2rem; }
  .logo-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  h1 { font-size: 1.35rem; } h2 { font-size: 1.25rem; }
  .page { padding: 0 10px; }
  .panel { padding: 16px; }
  .two-col, .two-col.reverse, .split, .footer-grid { grid-template-columns: 1fr; }
  .two-col.reverse .poster { order: -1; }
  .promo-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .three-buttons { grid-template-columns: 1fr; padding: 0 20px; gap: 10px; }
  .big-buttons { grid-template-columns: 1fr; }
  .coverflow { height: 290px; }
  .cf-card { width: 160px; margin-left: -80px; }
  .gold-text.big { font-size: 3.4rem; }
  .marquee-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .list-track { animation: none; }
  .cf-card { transition: none; }
}

/* ---------- แถบปุ่มด้านล่าง (เฉพาะมือถือ) — ข้อความ/ไอคอน แก้ในหลังบ้าน ---------- */
.mobile-bar { display: none; }
@media (max-width: 700px) {
  body.has-mobile-bar { padding-bottom: 96px; }
  body.has-mobile-bar .to-top { bottom: 104px; right: 12px; }
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); align-items: end;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(135deg, var(--panel-1), var(--panel-2));
    border-top: 2px solid var(--btn-2);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .55), 0 0 12px var(--glow);
    backdrop-filter: blur(8px);
  }
  .mobile-bar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; color: var(--heading); font-weight: 600; font-size: .78rem; line-height: 1.2;
    padding: 4px 2px; text-align: center; min-width: 0;
  }
  .mb-ico { display: grid; place-items: center; height: 34px; font-size: 1.7rem; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
  .mb-ico img { height: 34px; width: auto; max-width: 48px; object-fit: contain; }
  .mb-txt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* ปุ่มเด่นตรงกลาง */
  .mobile-bar a.hl {
    margin-top: -30px; padding: 10px 4px 8px; border-radius: 18px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel-1));
    border: 2px solid var(--btn-1);
    box-shadow: 0 0 14px var(--btn-2), inset 0 1px 0 rgba(255,255,255,.25);
    color: #fff;
  }
  .mobile-bar a.hl .mb-ico { height: 46px; font-size: 2.4rem; }
  .mobile-bar a.hl .mb-ico img { height: 46px; max-width: 64px; }
  .mobile-bar a:active { transform: scale(.95); }
}
@media (max-width: 700px) {
  .mobile-bar a.hl .mb-txt { white-space: normal; font-size: .74rem; }
}

/* แบนเนอร์ที่กดได้ */
.hero-link { display: block; }
.hero-link img { transition: transform .3s, filter .3s; }
.hero-link:hover img { transform: scale(1.01); filter: brightness(1.06); }
