/*
 * popgamer-hub.css — PopGamer Platform Shared Styles
 * ใช้กับทุกหน้าในระบบ (gamehub, game detail, dashboard, etc.)
 * V1.0.6.11
 */

/* ════════════════════════════════════════════
   DESIGN TOKENS
   ════════════════════════════════════════════ */
:root {
  /* Brand colors */
  --pk: 340 82% 70%;
  --pu: 270 65% 72%;
  --green: #22c55e;
  --yellow: #fbbf24;

  /* Light mode (default) */
  --bg: 30 40% 98%;
  --fg: 240 15% 22%;
  --card: 0 0% 100%;
  --card2: 240 10% 94%;
  --muted: rgba(26,16,32,.5);
  --faint: rgba(26,16,32,.08);
  --bd: 240 10% 88%;
  --stripe1: rgba(248,180,210,0.38);
  --stripe2: rgba(255,255,255,0.60);
  --bg-body: #fce8f3;

  /* Shared */
  --ra: 1.2rem;
  --ra-lg: 1.6rem;
  --box: 1200px;
  --sh: 0 6px 20px -4px hsl(var(--pk)/.18);
  --font: 'Noto Sans Thai','Noto Color Emoji',sans-serif;
  --text: hsl(var(--fg));
}

[data-theme="dark"] {
  --bg: 240 15% 8%;
  --fg: 232 80% 95%;
  --card: 240 12% 13%;
  --card2: 240 10% 18%;
  --muted: rgba(232,216,248,.45);
  --faint: rgba(232,216,248,.08);
  --bd: 240 10% 20%;
  --stripe1: rgba(100,60,160,0.18);
  --stripe2: rgba(15,10,30,0.6);
  --bg-body: #0d0b1a;
}

/* ════════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  background: hsl(var(--bg));
  /* padding ให้ page-box ลอยบน stripe */
  padding: 0 1.5rem 2.5rem;
}
@media (max-width: 900px) { body { padding: 0 .75rem 2rem; } }
@media (max-width: 500px) { body { padding: 0 .5rem 1.5rem; } }

a { text-decoration: none; color: inherit; cursor: pointer; }
button { cursor: pointer; font-family: var(--font); }
img { display: block; }

/* ════════════════════════════════════════════
   BACKGROUND STRIPE
   ════════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg-body);
  background-image: repeating-linear-gradient(
    -45deg,
    var(--stripe1) 0px, var(--stripe1) 24px,
    var(--stripe2) 24px, var(--stripe2) 48px
  );
}

/* ════════════════════════════════════════════
   BOXED PAGE WRAPPER
   ════════════════════════════════════════════ */
#page-box {
  max-width: var(--box);
  margin: 0 auto;
  overflow: hidden; /* clip hero ให้อยู่ใน box */
  box-shadow:
    0 0 0 1px rgba(255,255,255,.7),
    0 8px 40px rgba(200,100,180,.12);
  border-radius: 0 0 20px 20px;
  position: relative;
  z-index: 1;
}
[data-theme="dark"] #page-box {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    0 8px 40px rgba(0,0,0,.4);
}

/* ════════════════════════════════════════════
   TOPBAR
   ════════════════════════════════════════════ */
#topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 2px 12px rgba(240,100,180,.09);
}
[data-theme="dark"] #topbar {
  background: rgba(13,11,26,.95);
  border-bottom-color: rgba(255,255,255,.08);
}
.topbar-inner {
  padding: .55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
}

/* Logo */
.logo { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.logo-ico {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, hsl(var(--pk)), hsl(var(--pu)));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 10px hsl(var(--pk)/.3);
}
.logo-txt {
  font-size: 1.05rem; font-weight: 700;
  background: linear-gradient(135deg, hsl(var(--pk)), hsl(var(--pu)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search */
.search-wrap { flex: 1; max-width: 320px; position: relative; }
.search-wrap input {
  width: 100%;
  background: rgba(240,240,248,.8);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 20px;
  padding: .42rem 1rem .42rem 2.1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: .83rem;
  outline: none;
  transition: .2s;
}
[data-theme="dark"] .search-wrap input {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  color: hsl(var(--fg));
}
.search-wrap input:focus {
  border-color: hsl(var(--pk)/.5);
  box-shadow: 0 0 0 3px hsl(var(--pk)/.12);
}
.search-ico {
  position: absolute; left: .65rem; top: 50%;
  transform: translateY(-50%);
  opacity: .4; font-size: .83rem;
  pointer-events: none;
}

/* Stats */
.topbar-stats {
  font-size: .78rem; color: var(--muted);
  white-space: nowrap;
  display: flex; gap: .6rem; align-items: center;
}
.topbar-stats strong { font-weight: 700; }
.stat-on  { color: var(--green); }
.stat-vis { color: var(--yellow); }

/* Right section */
.topbar-right {
  display: flex; align-items: center;
  gap: .5rem; margin-left: auto; flex-shrink: 0;
}

/* Theme toggle — ปุ่มลอยมุมขวาล่าง แคปซูลแนวตั้ง (แบบ Goodapp.pro) */
.theme-toggle {
  position: relative;
  width: 38px; height: 72px;
  border-radius: 19px;
  background: rgba(255,255,255,.92);
  border: 1px solid hsl(var(--bd)/.7);
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
  cursor: pointer; transition: .3s;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .theme-toggle { background: rgba(20,15,40,.92); border-color: rgba(255,255,255,.12); }
.theme-toggle::after {
  content: '☀️';
  position: absolute; top: 6px;
  width: 26px; height: 26px; line-height: 26px; text-align: center;
  font-size: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--pk)), hsl(var(--pu)));
  transition: .3s;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
[data-theme="light"] .theme-toggle::after { top: 6px; content: '☀️'; }
[data-theme="dark"]  .theme-toggle::after { top: 40px; content: '🌙'; }
/* กลุ่มปุ่มลอยมุมขวาล่าง: [ภาษา (มือถือเท่านั้น)] + [ธีม] */
.float-ctrl { position: fixed; right: 22px; bottom: 22px; z-index: 2147483000; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.float-lang {
  display: none; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 1px solid hsl(var(--bd)/.7);
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
  font-family: var(--font); font-size: .72rem; font-weight: 800; color: hsl(var(--pk)); cursor: pointer;
}
[data-theme="dark"] .float-lang { background: rgba(20,15,40,.92); border-color: rgba(255,255,255,.12); }
.genre-select { display: none; }

@media (max-width: 640px) {
  /* คาดว่าโฆษณา AdSense แบบแถบล่าง (anchor) ทับปุ่มเดิม → ยกปุ่มขึ้น + z-index สูงสุด */
  .float-ctrl { right: 14px; bottom: 96px; }
  .theme-toggle { width: 34px; height: 64px; }
  .float-lang { display: block; width: 34px; height: 34px; }
  .topbar-right .lang-btn { display: none; }             /* ภาษาย้ายไปปุ่มลอย */
  /* แถว 1: โลโก้ + ค้นหา · แถว 2: สถิติ (ซ้าย) + บัญชี (ขวา) */
  .topbar-inner { gap: .45rem .6rem; padding: .5rem .85rem; }
  .search-wrap { flex: 1 1 0; max-width: none; min-width: 0; }
  .topbar-stats { order: 3; flex: 1 1 0; min-width: 0; flex-wrap: wrap; gap: 1px .4rem; font-size: .72rem; line-height: 1.35; }
  .topbar-stats > span:first-child { flex-basis: 100%; }      /* บรรทัด 1: สมาชิกทั้งหมด */
  .topbar-stats > span:nth-child(2) { display: none; }       /* ซ่อน | ตัวแรก · บรรทัด 2: ออนไลน์ | เยี่ยมชม */
  .topbar-right { order: 4; margin-left: auto; }
  .logo + .search-wrap { margin-right: 0; }
  .topbar-inner::after { content: ''; order: 2; flex-basis: 100%; height: 0; }   /* ตัดบรรทัดหลังช่องค้นหา */
  .user-pill { max-width: 132px; }
  .user-pill .user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .filter-bar .tag-btn { display: none; }                /* ไม่แสดง tags ประเภทเกม (คงตัวเลือกเรียงลำดับไว้) */
  #genre-list, .sidebar-search { display: none; }        /* ลิสต์ประเภท → dropdown */
  .genre-select {
    display: block; width: 100%; padding: .6rem .8rem; border-radius: 10px;
    border: 1px solid hsl(var(--bd)); background: hsl(var(--card)); color: inherit;
    font-family: var(--font); font-size: .88rem;
  }
}

/* Lang buttons */
.lang-btn {
  background: none;
  border: 1px solid hsl(var(--bd)/.8);
  border-radius: 8px;
  padding: .28rem .5rem;
  color: var(--muted);
  font-size: .78rem;
  font-family: var(--font);
  transition: .2s;
}
.lang-btn.active {
  border-color: hsl(var(--pk)/.6);
  color: hsl(var(--pk));
  background: hsl(var(--pk)/.08);
}

/* User pill */
.user-pill {
  display: flex; align-items: center; gap: .45rem;
  background: rgba(240,240,248,.7);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 20px;
  padding: .28rem .7rem .28rem .28rem;
  transition: .2s;
}
.user-pill:hover { border-color: hsl(var(--pk)/.5); }
[data-theme="dark"] .user-pill {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
}
.user-av {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: hsl(var(--card2));
}
.user-name {
  font-size: .8rem; font-weight: 600;
  max-width: 90px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Login button */
/* ════════════════════════════════════════════
   HERO SLIDER
   ════════════════════════════════════════════ */
#hero {
  width: 100%; aspect-ratio: 16/7;
  overflow: hidden;
  background: hsl(var(--card2));
  position: relative;
  display: none;
}
#hero-skeleton {
  width: 100%; aspect-ratio: 16/7;
  background: hsl(var(--card2));
}
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; pointer-events: none; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide-img { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 55%, transparent 100%);
}
.slide-content {
  position: absolute; bottom: 10%; left: 5%; max-width: 500px;
}
.slide-title {
  font-size: clamp(1.4rem,3vw,2.2rem); font-weight: 800;
  color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5);
  margin-bottom: .4rem;
}
.slide-desc {
  font-size: clamp(.8rem,1.4vw,.95rem);
  color: rgba(255,255,255,.82);
  margin-bottom: .9rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* slide-btn: outline style ตาม template */
.slide-dots {
  position: absolute; bottom: .75rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: .4rem;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  cursor: pointer; border: none; padding: 0; transition: .25s;
}
.dot.active { background: hsl(var(--pk)); width: 22px; border-radius: 4px; }
.slide-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.18); backdrop-filter: blur(8px);
  border: none; color: #fff;
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.slide-arrow:hover { background: rgba(255,255,255,.35); }
.slide-arrow.prev { left: .75rem; }
.slide-arrow.next { right: .75rem; }

/* ════════════════════════════════════════════
   CONTENT BACKGROUND (ใต้ hero)
   ════════════════════════════════════════════ */
.content-bg {
  background: rgba(255,255,255,.75);
}
[data-theme="dark"] .content-bg {
  background: rgba(13,11,26,.90);
}

/* ════════════════════════════════════════════
   BOX / INNER PADDING
   ════════════════════════════════════════════ */
.box { padding: 0 1.25rem; }

/* ════════════════════════════════════════════
   FILTER BAR
   ════════════════════════════════════════════ */
.filter-bar {
  display: flex; gap: .5rem; flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
[data-theme="dark"] .filter-bar { border-bottom-color: rgba(255,255,255,.08); }

.tag-btn {
  background: rgba(255,255,255,.8);
  border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 20px;
  padding: .3rem .85rem;
  font-family: var(--font); font-size: .82rem;
  color: var(--muted);
  cursor: pointer; transition: .2s; white-space: nowrap;
  display: flex; align-items: center; gap: .35rem;
}
[data-theme="dark"] .tag-btn {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
}
.tag-btn:hover, .tag-btn.active {
  background: hsl(var(--pk)/.12);
  border-color: hsl(var(--pk)/.5);
  color: hsl(var(--pk));
}
/* count badge ใน tag */
.tag-count {
  background: hsl(var(--pk)/.15);
  color: hsl(var(--pk));
  border-radius: 10px;
  padding: .05rem .35rem;
  font-size: .7rem; font-weight: 700;
}
.tag-btn.active .tag-count { background: hsl(var(--pk)/.25); }

.sort-sel {
  background: rgba(255,255,255,.8);
  border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 20px;
  padding: .32rem .85rem;
  font-family: var(--font); font-size: .82rem;
  color: var(--text);
  cursor: pointer; margin-left: auto; outline: none;
}
[data-theme="dark"] .sort-sel {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
  color: hsl(var(--fg));
}

/* ════════════════════════════════════════════
   LAYOUT — SIDEBAR + GRID
   ════════════════════════════════════════════ */
.hub-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 700px) { .hub-layout { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════ */
.sidebar {
  background: rgba(255,255,255,.7);
  border-radius: var(--ra);
  padding: 1rem;
  border: 1.5px solid rgba(255,255,255,.6);
  box-shadow: 0 2px 16px rgba(200,100,180,.08);
  position: sticky; top: 58px;
}
[data-theme="dark"] .sidebar {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
}
.sidebar-title {
  font-size: .85rem; font-weight: 800;
  color: var(--text); margin-bottom: .75rem;
}
/* search ใน sidebar */
.sidebar-search {
  position: relative; margin-bottom: .75rem;
}
.sidebar-search input {
  width: 100%;
  background: rgba(240,240,248,.7);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 10px;
  padding: .35rem .75rem .35rem 1.8rem;
  font-family: var(--font); font-size: .8rem;
  color: var(--text); outline: none; transition: .2s;
}
[data-theme="dark"] .sidebar-search input {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
  color: hsl(var(--fg));
}
.sidebar-search input:focus {
  border-color: hsl(var(--pk)/.5);
  box-shadow: 0 0 0 2px hsl(var(--pk)/.1);
}
.sidebar-search-ico {
  position: absolute; left: .55rem; top: 50%;
  transform: translateY(-50%);
  font-size: .75rem; opacity: .4;
  pointer-events: none;
}
/* genre items */
.genre-item {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: .38rem .5rem;
  border-radius: 8px;
  cursor: pointer; font-size: .83rem;
  color: var(--muted); transition: .2s;
}
.genre-item:hover, .genre-item.active {
  background: hsl(var(--pk)/.1);
  color: hsl(var(--pk));
}
.genre-count {
  font-size: .7rem; font-weight: 700;
  background: rgba(240,240,248,.8);
  border-radius: 10px; padding: .1rem .4rem;
}
[data-theme="dark"] .genre-count { background: rgba(255,255,255,.1); }

/* ════════════════════════════════════════════
   GAME GRID
   ════════════════════════════════════════════ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 1rem;
}
@media (max-width: 500px) { .game-grid { grid-template-columns: repeat(2,1fr); gap: .75rem; } }

/* ════════════════════════════════════════════
   GAME CARD — solid white (ตาม template)
   ════════════════════════════════════════════ */
.game-card {
  background: #fff;
  border-radius: var(--ra);
  overflow: hidden;
  border: none;
  box-shadow: 0 2px 12px rgba(200,100,180,.1), 0 1px 3px rgba(0,0,0,.06);
  cursor: pointer;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
  text-decoration: none;
  display: flex; flex-direction: column;
  position: relative;
}
.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(200,100,180,.18), 0 2px 8px rgba(0,0,0,.08);
}
[data-theme="dark"] .game-card {
  background: hsl(var(--card));
  box-shadow: 0 2px 12px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.2);
}

/* รูปเกม — portrait 2:3 */
.game-card-img {
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
  background: hsl(var(--card2));
  flex-shrink: 0;
}
.game-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.game-card:hover .game-card-img img { transform: scale(1.04); }

/* Featured badge */
/* Testing / Beta badge */
/* Version badge */
/* Play / Install button — แสดงตลอดเวลาที่ bottom ของรูป */
.card-play-wrap {
  position: absolute; bottom: .6rem; left: 0; right: 0;
  display: flex; justify-content: center;
  z-index: 2;
}
/* Coming Soon overlay */
/* Card info ใต้รูป */
.game-card-info {
  padding: .75rem;
  display: flex; flex-direction: column;
  flex: 1;
  background: #fff;
}
[data-theme="dark"] .game-card-info { background: hsl(var(--card)); }

.game-card-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: .25rem;
}
.game-card-title {
  font-weight: 700; font-size: .86rem;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  flex: 1;
}
/* ปุ่ม ... more */
.card-more-btn {
  background: none; border: none;
  color: var(--muted); font-size: .9rem;
  padding: 0 .1rem; flex-shrink: 0;
  line-height: 1; cursor: pointer;
  opacity: .5; transition: opacity .18s;
}
.game-card:hover .card-more-btn { opacity: 1; }

.game-card-desc {
  font-size: .75rem; color: var(--muted);
  margin-top: .2rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.4;
}
.game-card-meta {
  display: flex; align-items: center;
  gap: .5rem; margin-top: .4rem;
  font-size: .72rem; color: var(--muted);
}
.rating-stars { color: #f59e0b; letter-spacing: -.5px; }
/* การ์ดเกมแบบหน้าแรก: ชื่อ · คำอธิบาย 2 บรรทัด · ป้ายสถิติ · ปุ่มเล่นเต็มกว้างล่างสุด */
.game-card-info .game-card-title { font-size: .98rem; font-weight: 700; margin-bottom: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card-info .game-card-desc { flex: 1; min-height: 2.3em; margin-bottom: .55rem; }
.game-card-info .game-card-meta { margin: 0 0 .7rem; }
.game-card-info .card-play { margin-top: auto; }
/* ป้ายสถิติการ์ดเกม: ⭐ คะแนน · 🐰 สมาชิกที่เล่น · 🎮 จำนวนครั้งที่เล่น */
.game-card-meta { flex-wrap: nowrap; gap: .3rem; overflow: hidden; }   /* 3 ป้ายแถวเดียวเหมือนหน้าแรก */
.game-card-meta .pg-stat { height: 20px; font-size: .68rem; padding-right: 6px; }
.game-card-meta .pg-stat img { width: 20px; height: 20px; }
.pg-stat { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 8px 0 0; border-radius: 99px; border: 1.5px solid; font-weight: 800; font-size: .74rem; line-height: 1; white-space: nowrap; }
.pg-stat img { width: 22px; height: 22px; margin: 0 1px 0 -3px; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.pg-stat--star   { background: #fff8e1; border-color: #f7d774; color: #7a4f00; }
.pg-stat--member { background: #eaf3ff; border-color: #b7d3ff; color: #e2622b; }
.pg-stat--play   { background: #f2ecff; border-color: #d3c3ff; color: #4f46e5; }
[data-theme="dark"] .pg-stat--star   { background: rgba(247,215,116,.14); border-color: rgba(247,215,116,.45); color: #fcd34d; }
[data-theme="dark"] .pg-stat--member { background: rgba(96,165,250,.14); border-color: rgba(96,165,250,.45); color: #fdba74; }
@media (max-width: 640px) {   /* การ์ด 2 คอลัมน์: 3 ป้ายอยู่แถวเดียว */
  .game-card-meta { flex-wrap: nowrap; gap: .22rem; overflow: hidden; }
  .pg-stat { height: 19px; font-size: .64rem; padding-right: 5px; border-width: 1px; }
  .pg-stat img { width: 19px; height: 19px; margin-left: -2px; }
}
[data-theme="dark"] .pg-stat--play   { background: rgba(167,139,250,.16); border-color: rgba(167,139,250,.45); color: #c4b5fd; }
.rating-num { font-weight: 700; color: var(--text); }

/* ════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════ */
.pagination {
  display: flex; gap: .4rem;
  justify-content: center; margin: 1.5rem 0;
}
.page-btn {
  background: rgba(255,255,255,.7);
  border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 8px; padding: .38rem .75rem;
  cursor: pointer; font-family: var(--font);
  font-size: .8rem; color: var(--muted); transition: .2s;
}
[data-theme="dark"] .page-btn {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
}
.page-btn:hover, .page-btn.active {
  background: hsl(var(--pk)/.15);
  border-color: hsl(var(--pk)/.5);
  color: hsl(var(--pk));
}

/* ════════════════════════════════════════════
   CTA SECTION (Image 2)
   ════════════════════════════════════════════ */
.cta-section {
  position: relative;
  padding: 3rem 1.5rem;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--pk)), hsl(var(--pu)));
}
/* dot pattern overlay */
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 2px, transparent 2px);
  background-size: 28px 28px;
  pointer-events: none;
}
.cta-title {
  font-size: clamp(1.6rem,4vw,2.4rem);
  font-weight: 800; color: #fff;
  margin-bottom: .75rem;
  position: relative; z-index: 1;
}
.cta-desc {
  font-size: .95rem; color: rgba(255,255,255,.88);
  max-width: 600px; margin: 0 auto 1.5rem;
  line-height: 1.7; position: relative; z-index: 1;
}
/* ════════════════════════════════════════════
   SKELETON
   ════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    90deg,
    hsl(var(--card2)) 25%,
    rgba(0,0,0,.04) 50%,
    hsl(var(--card2)) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(
    90deg,
    hsl(var(--card2)) 25%,
    rgba(255,255,255,.04) 50%,
    hsl(var(--card2)) 75%
  );
  background-size: 200% 100%;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: .78rem; color: var(--muted);
  border-top: 1px solid hsl(var(--bd)/.4);
  background: rgba(255,255,255,.5);
}
[data-theme="dark"] footer { background: rgba(13,11,26,.5); }
footer a { color: hsl(var(--pk)); }

/* ════════════════════════════════════════════════════════
   V5 ADDITIONS — Banner Zones · Logo Image · Layout Sections
   ════════════════════════════════════════════════════════ */

/* hub-sections — flex container เรียง order จาก Layout config */
#hub-sections { display:flex; flex-direction:column; }

/* ── Banner Zones ── */
.bn-zone {
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: .9rem 1rem;
  display: flex; flex-direction: column; gap: .8rem;
}
.bn-zone .bn-item {
  display: block; border-radius: 14px; overflow: hidden;
  border: 1px solid hsl(var(--bd, 240 12% 88%));
  box-shadow: 0 2px 10px rgba(20,20,50,.07);
  transition: transform .18s, box-shadow .18s;
  line-height: 0;
}
.bn-zone a.bn-item:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20,20,50,.14); }
.bn-zone .bn-item img { width: 100%; height: auto; display: block; }
.bn-top    { padding-top: 1rem; }
.bn-bottom { padding-bottom: 1.5rem; }
[data-theme="dark"] .bn-zone .bn-item { border-color: rgba(255,255,255,.1); box-shadow: 0 2px 12px rgba(0,0,0,.35); }

/* ── Logo image จาก SEO config ── */
.logo-img { height: 36px; width: auto; display: block; }
@media (max-width: 700px) { .logo-img { height: 30px; } }

/* ── genres ถูกซ่อนจาก Layout config ── */
.content-bg.no-genres .filter-bar { display: none; }
.content-bg.no-genres .sidebar    { display: none; }
.content-bg.no-genres .hub-layout { grid-template-columns: 1fr; }
