/* แถวเกมแต่ละหมวด (#game-rows): layout หลายแบบ + การ์ดเกม */

/* ---------- แถวเกม: layout หลายแบบ ---------- */
/* ปุ่มในการ์ดใหญ่ */
.g-btns { display: flex; gap: 8px; }
.g-btns a { flex: 1; padding: 7px 0; border-radius: 6px; text-align: center; font-size: 13px; }
/* 1) bento จัดอันดับ (เกมยอดนิยม) */
.lay-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .lay-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } }
.lay-bento > .feat { grid-column: span 2; grid-row: span 2; }
.lay-bento > .extra { display: none; }
.lay-bento.expanded > .extra { display: block; }
.rank { position: absolute; right: 6px; top: 6px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; pointer-events: none;
  font-family: Kanit, sans-serif; font-weight: 900; font-size: 14px; line-height: 1; color: #3a2300; background: radial-gradient(circle at 35% 30%, #fff6cc, #f5b301 60%, #a86b00); box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 0 12px rgba(245,179,1,.55); }
/* การ์ดเกมเด่น (ใช้ใน bento และ spotlight) */
.feat { position: relative; isolation: isolate; display: flex; min-height: 280px; overflow: hidden; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255,224,138,.35), 0 18px 30px -18px #000; }
.feat > img { position: absolute; left: 0; top: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.feat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 52%, rgba(10,6,5,.75) 76%, rgba(10,6,5,.96)); }
.feat:hover > img { transform: scale(1.06); }
.feat-info { display: flex; width: 100%; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 16px; }
.feat-ribbon { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; color: #241500; font-size: 12px; font-weight: 800;
  background: linear-gradient(180deg, #f7d27a, #e9b23a); box-shadow: 0 0 16px rgba(245,179,1,.5); }
.feat-ribbon svg { width: 16px; height: 16px; }
.feat-name { margin: 0; color: #fff; font-size: clamp(20px, 2.4vw, 30px); font-weight: 900; line-height: 1.1; text-shadow: 0 3px 10px rgba(0,0,0,.8); }
/* ภาพปกจริงมีชื่อเกมอยู่ในภาพแล้ว จึงซ่อนชื่อที่เขียนทับ (ยังให้โปรแกรมอ่านหน้าจออ่านได้) */
.feat .feat-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.feat-prov { margin: 0; color: #e7d5ad; font-size: 13px; }
.feat .g-btns { margin-top: 6px; max-width: 320px; }
/* 2) การ์ดแนวนอน (คาสิโนสด) */
.lay-split { display: grid; gap: 12px; }
@media (min-width: 640px) { .lay-split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lay-split { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.info-card { position: relative; display: flex; overflow: hidden; border-radius: 12px; background: linear-gradient(120deg, #22150f, #120b09); box-shadow: inset 0 0 0 1px rgba(255,224,138,.22); transition: transform .25s ease, box-shadow .25s ease; }
.info-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px rgba(255,224,138,.7), 0 0 22px rgba(245,179,1,.18), 0 14px 24px -16px #000; }
.info-img { position: relative; width: 34%; flex-shrink: 0; aspect-ratio: 3 / 4; overflow: hidden; }
.info-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.info-card:hover .info-img img { transform: scale(1.08); }
.info-img .live-badge { position: absolute; left: 6px; top: 6px; font-size: 10px; padding: 2px 6px; }
.info-body { display: flex; min-width: 0; flex: 1; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 14px; }
.info-body h4 { margin: 0; color: #fff; font-size: 17px; font-weight: 800; line-height: 1.2; }
.info-meta { margin: 0; color: #a8a29e; font-size: 12px; }
.info-meta b { color: #ffe08a; font-weight: 600; }
.info-body .g-btns { margin-top: 8px; }
/* 3) spotlight (ยิงปลา) */
.lay-spot { display: grid; gap: 12px; }
.lay-spot > .feat { min-height: 300px; }
/* การ์ดเด่นแนวนอน: วางปกเกมแนวตั้งไว้ฝั่งขวา แล้วไล่จางเข้าพื้นหลังทางซ้าย */
.lay-spot > .feat > img { left: auto; right: 0; width: auto; height: 100%; aspect-ratio: 1; max-width: 70%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%); mask-image: linear-gradient(90deg, transparent, #000 14%); }
.lay-spot > .feat::before { background: linear-gradient(90deg, rgba(10,6,5,.85) 8%, rgba(10,6,5,.25) 30%, transparent 45%), linear-gradient(180deg, transparent 62%, rgba(10,6,5,.85)); }
.lay-spot .feat-info { max-width: 64%; }
.lay-spot .spot-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .lay-spot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 14px; } .lay-spot > .feat { min-height: 100%; } .lay-spot .spot-side { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); } }
/* spotlight กลับด้าน: การ์ดเด่นอยู่ขวา (อาร์เคด) */
@media (min-width: 768px) { .lay-spot.rev { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .lay-spot.rev > .feat { order: 2; } }
/* 4) รายการแนวนอน (เกมด่วน) */
.lay-list { display: grid; gap: 10px; }
@media (min-width: 768px) { .lay-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.list-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 10px; background: linear-gradient(90deg, #22150f, #140c0a); box-shadow: inset 0 0 0 1px rgba(255,224,138,.18); transition: box-shadow .2s, background-color .2s; }
.list-row:hover { box-shadow: inset 0 0 0 1.5px rgba(255,224,138,.65), 0 0 18px rgba(245,179,1,.15); }
.list-num { width: 22px; flex-shrink: 0; color: #a8a29e; font-size: 15px; font-weight: 800; text-align: center; }
.list-thumb { width: 64px; height: 64px; flex-shrink: 0; overflow: hidden; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,224,138,.3); }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.list-row:hover .list-thumb img { transform: scale(1.08); }
.list-info { min-width: 0; flex: 1; }
.list-info h4 { margin: 0; overflow: hidden; color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.list-info p { margin: 2px 0 0; color: #a8a29e; font-size: 12px; }
.list-info p b { color: #ffe08a; font-weight: 600; }
.list-row .g-btns { flex-shrink: 0; gap: 6px; }
.list-row .g-btns a { flex: none; padding: 6px 14px; }
@media (max-width: 479px) { .list-row .g-btns .btn-neon { display: none; } }

/* ---------- Game rows / cards ---------- */
.row-scroll { scrollbar-width: none; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-padding-inline: 12px; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
@media (hover: hover) and (pointer: fine) { .row-scroll { cursor: grab; } }
.row-scroll.expanded { flex-wrap: wrap; overflow: visible; scroll-snap-type: none; cursor: auto; }
.game-card { transition: transform .2s ease, box-shadow .25s ease; transform-style: preserve-3d; }
.game-card:hover, .game-card.active { box-shadow: 0 0 0 1.5px rgba(255,224,138,.75), 0 10px 22px -10px rgba(0,0,0,.9); }
.game-card .ov { opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.game-card:hover .ov, .game-card:focus-within .ov, .game-card.active .ov { opacity: 1; pointer-events: auto; }
.game-card .emo { transition: transform .35s ease; }
.game-card:hover .emo, .game-card.active .emo { transform: scale(1.1); }
