/**
 * 037HDDD — ดีไซน์เหลือง-ดำ ตามแบบที่เลือก
 * คง class การ์ดเดิมให้ sync กับ listing-ssr / home.js
 */
:root {
    --bg: #000000;
    --bg-space: #000000;
    --bg-primary: #000000;
    --bg-card: #121212;
    --bg-elevated: #1a1a1a;
    --bg-secondary: #0d0d0d;
    --gold: #f5c518;
    --gold-bright: #ffe566;
    --gold-dark: #c9a012;
    --accent: #f5c518;
    --accent-hover: #ffe566;
    --accent-red: #e50914;
    --text-primary: #ffffff;
    --text-secondary: #c8c8c8;
    --text-muted: #8a8a8a;
    --border: rgba(245, 197, 24, 0.35);
    --border-weak: rgba(255, 255, 255, 0.08);
    --radius: 10px;
    --radius-sm: 8px;
    --radius-lg: 14px;
    --header-bg: #000000;
    --gradient-gold: linear-gradient(180deg, #ffe566 0%, #f5c518 45%, #c9a012 100%);
    --gradient-primary: linear-gradient(135deg, #e50914, #9f0710);
    --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.55);
    --max: 1280px;
}

/* โลโก้ข้อความทอง */
.logo-text {
    font-family: 'Kanit', Impact, 'Arial Black', sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: clamp(1.6rem, 3.2vw, 2.35rem);
    letter-spacing: -0.04em;
    line-height: 1;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold);
    display: inline-block;
}
.logo-text-sub {
    display: block;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: #fff;
    -webkit-text-fill-color: #fff;
    margin-top: 4px;
    opacity: 0.9;
}
.logo-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-link img.logo-gold {
    height: 44px;
    width: auto;
    max-width: min(220px, 42vw);
    object-fit: contain;
    display: block;
}

/* หัวเว็บมาตรฐานทั้งไซต์ (แบบหน้าดูหนัง) */
.header {
    background: #000;
    border-bottom: 1px solid rgba(245, 197, 24, 0.35);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px clamp(14px, 3vw, 28px);
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.header .logo-link {
    flex-direction: row;
    align-items: center;
}
.site-top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-top-nav::-webkit-scrollbar { display: none; }
.site-top-nav a {
    flex-shrink: 0;
    color: #fff;
    font-size: 0.9rem;
    padding: 8px 10px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.site-top-nav a:hover,
.site-top-nav a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.header .header-search {
    flex: 0 1 320px;
    max-width: 320px;
    margin: 0 0 0 auto;
}
.header .header-search i {
    left: 16px;
    right: auto;
    color: #888;
}
.header .header-search input {
    background: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    color: #111 !important;
    padding: 10px 18px 10px 42px !important;
}
.header .header-search input::placeholder { color: #999 !important; }
.header-utils {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.header-utils a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--gold);
    font-size: 0.78rem;
    text-decoration: none;
    white-space: nowrap;
}
.header-utils a:hover { color: var(--gold-bright); }
@media (max-width: 900px) {
    .site-top-nav { display: none; }
    .header .header-search { flex: 1 1 auto; max-width: none; }
    .header-utils .util-label { display: none; }
}
@media (max-width: 520px) {
    .header-inner { min-height: 60px; padding: 8px 12px; gap: 10px; }
    .logo-link img.logo-gold { height: 34px; }
}

/* หัวเว็บแบบเดิม (สำรอง) — ใช้ร่วมกับ .site-top ถ้ายังมี */
.site-top {
    background: #000;
    border-bottom: 1px solid rgba(245, 197, 24, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-top-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 20px 10px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.header-search {
    flex: 1 1 auto;
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}
.header-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}
.header-search input {
    width: 100%;
    background: #fff;
    border: none;
    border-radius: 999px;
    padding: 11px 18px 11px 42px;
    color: #111;
    font-family: 'Kanit', sans-serif;
    font-size: 0.92rem;
    outline: none;
}
.header-search input::placeholder { color: #999; }
.header-utils {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.header-utils a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-size: 0.82rem;
    text-decoration: none;
    white-space: nowrap;
}
.header-utils a i { font-size: 0.95rem; }
.header-utils a:hover { color: var(--gold-bright); }

/* เมนูหมวด */
.site-nav {
    background: #000;
    border-bottom: 1px solid rgba(245, 197, 24, 0.45);
}
.site-nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.site-nav-inner::-webkit-scrollbar { display: none; }
.site-nav a,
.site-nav button.genre-tag {
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #fff;
    font-family: 'Kanit', sans-serif;
    font-size: 0.9rem;
    padding: 12px 12px 10px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.site-nav a:hover,
.site-nav button.genre-tag:hover,
.site-nav a.active,
.site-nav button.genre-tag.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* เนื้อหา */
.page-wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 22px 20px 80px;
}
.section-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(245, 197, 24, 0.45);
}
.section-head-row h1,
.section-head-row .section-gold-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--gold);
}
.see-all-gold {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    text-decoration: none;
}
.see-all-gold:hover { background: rgba(245, 197, 24, 0.12); }

/* กริดการ์ด */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}
@media (max-width: 1100px) {
    .movie-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 800px) {
    .movie-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
@media (max-width: 520px) {
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .header-utils span.util-label { display: none; }
    .site-top-inner { flex-wrap: wrap; }
    .header-search { order: 3; max-width: 100%; flex: 1 1 100%; }
}

.movie-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-weak);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
a.movie-card:visited { color: inherit; }
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(245, 197, 24, 0.18);
    border-color: rgba(245, 197, 24, 0.35);
}
.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    background: #0a0a0a;
    overflow: hidden;
}
.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.badge-sm.badge-quality,
.badge-sm.badge-quality.badge-q-hd,
.badge-sm.badge-quality.badge-q-4k,
.badge-sm.badge-quality.badge-q-zoom,
.badge-sm.badge-quality.badge-q-cam,
.badge-sm.badge-quality.badge-q-sub,
.poster-wrap > .badge-sm.badge-quality,
.poster-wrap .badge-hd-corner {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    z-index: 2;
    background: var(--gold) !important;
    color: #111 !important;
    font-weight: 800;
    font-size: 0.68rem;
    padding: 3px 7px;
    border-radius: 3px;
    box-shadow: none !important;
}
.card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 70%;
}
.card-badges .badge-quality {
    position: static;
}
.card-badge-new { position: absolute; bottom: 8px; left: 8px; z-index: 2; }

/* ป้ายพากย์ / ซับ บนปก — แถบเนียนมุมล่าง ให้อ่านรู้ทันที */
.card-audio-flag {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 8px;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    line-height: 1.2;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.card-audio-flag .cad-part { white-space: nowrap; }
.card-audio-flag .cad-sep {
    color: var(--gold, #f5c518);
    font-weight: 900;
    font-size: 0.72rem;
}
/* มีทั้งพากย์ + ซับ */
.card-audio-dual {
    background: linear-gradient(
        90deg,
        rgba(229, 9, 20, 0.94) 0%,
        rgba(18, 18, 18, 0.96) 42%,
        rgba(18, 18, 18, 0.96) 58%,
        rgba(20, 130, 80, 0.94) 100%
    );
}
/* พากย์ไทยอย่างเดียว */
.card-audio-dub {
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.95), rgba(140, 20, 30, 0.92));
}
/* ซับไทยอย่างเดียว */
.card-audio-sub {
    background: linear-gradient(90deg, rgba(20, 130, 80, 0.95), rgba(16, 90, 58, 0.92));
}
.poster-wrap:has(.card-audio-flag) .card-badge-new {
    bottom: 30px;
}
@media (max-width: 480px) {
    .card-audio-flag {
        font-size: 0.58rem;
        padding: 4px 6px;
        gap: 4px;
    }
}
.card-rating {
    display: none; /* ย้ายไปแถวใต้ชื่อตามแบบ */
}
.card-info {
    padding: 10px 10px 12px;
    background: #121212;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 5.2em;
}
.card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
.card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.card-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 600;
}
.card-stars i { font-size: 0.72rem; }

/* โอเวอร์เลย์ปุ่มเล่นบนโปสเตอร์ */
.poster-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.movie-card:hover .poster-overlay { opacity: 1; }
.play-btn-card {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 0 16px rgba(245, 197, 24, 0.4);
    transform: scale(0.85);
    transition: transform 0.25s;
}
.movie-card:hover .play-btn-card { transform: scale(1); }
.badge-sm {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
}
.badge-sm.badge-new {
    background: #e50914;
    color: #fff;
}

/* ===== หน้าข้อมูล / นโยบาย / ช่วยเหลือ ===== */
body.legal-body {
    font-family: 'Kanit', sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.7;
    min-height: 100vh;
    margin: 0;
    padding-bottom: 80px;
}
.legal-page {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px clamp(14px, 4vw, 28px) 40px;
    width: 100%;
    box-sizing: border-box;
}
.legal-article {
    max-width: 760px;
}
.legal-page .page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f5c518;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
}
.legal-page .page-lead {
    color: #8a8a8a;
    margin: 0 0 28px;
    font-size: 0.95rem;
    max-width: 720px;
}
.legal-article h2 {
    font-size: 1.08rem;
    font-weight: 700;
    color: #f5c518;
    margin: 28px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(245, 197, 24, 0.28);
}
.legal-article p,
.legal-article li {
    color: #c8c8c8;
    margin: 0 0 12px;
    font-size: 0.98rem;
}
.legal-article ul {
    padding-left: 1.25rem;
    margin: 0 0 16px;
}
.legal-article a {
    color: #f5c518;
    text-decoration: none;
}
.legal-article a:hover { color: #ffe566; text-decoration: underline; }
.legal-faq-item {
    margin-bottom: 8px;
    padding: 16px 18px;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.legal-faq-item h2 {
    margin: 0 0 8px;
    padding: 0;
    border: none;
    font-size: 1.02rem;
    color: #fff;
}
.legal-faq-item p { margin: 0; }
.legal-form label {
    display: block;
    margin-top: 16px;
    font-size: 0.88rem;
    color: #8a8a8a;
}
.legal-form input,
.legal-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(245, 197, 24, 0.35);
    background: #121212;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
}
.legal-form textarea { min-height: 140px; resize: vertical; }
.legal-form button[type="submit"] {
    margin-top: 20px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #f5c518;
    color: #111;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.legal-form button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }
.legal-form .status { margin-top: 16px; min-height: 1.5em; font-size: 0.92rem; }
.legal-form .status.ok { color: #50c878; }
.legal-form .status.err { color: #ff6b6b; }
.legal-side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}
.legal-side-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(245, 197, 24, 0.35);
    border-radius: 999px;
    color: #f5c518;
    font-size: 0.85rem;
    text-decoration: none;
}
.legal-side-links a:hover {
    background: rgba(245, 197, 24, 0.12);
    color: #fff;
}
@media (min-width: 900px) {
    .legal-page {
        padding-left: 10vw !important;
        padding-right: 10vw !important;
    }
    body.legal-body { padding-bottom: 0; }
}
@media (max-width: 768px) {
    .legal-page { padding: 16px 12px 80px !important; }
}

/* ===== ฟุตเตอร์มาตรฐานทั้งไซต์ ===== */
.site-foot {
    position: relative;
    z-index: 10;
    margin-top: 48px;
    border-top: 1px solid rgba(245, 197, 24, 0.35);
    background:
        linear-gradient(180deg, rgba(245, 197, 24, 0.06) 0%, transparent 48px),
        #050505;
    padding: 0 0 88px;
}
.site-foot-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 36px clamp(14px, 4vw, 28px) 28px;
    display: grid;
    grid-template-columns: minmax(200px, 1.1fr) minmax(0, 2fr);
    gap: 32px 48px;
    align-items: start;
}
.site-foot-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.site-foot-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    width: fit-content;
}
.site-foot-logo img {
    height: 40px;
    width: auto;
    max-width: min(220px, 70vw);
    object-fit: contain;
    display: block;
}
.site-foot-tagline {
    margin: 0;
    color: #8a8a8a;
    font-size: 0.88rem;
    line-height: 1.55;
    max-width: 280px;
}
.site-foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 28px;
}
.site-foot-col h3 {
    margin: 0 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f5c518;
}
.site-foot-col nav,
.site-foot-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.site-foot-col a {
    color: #c8c8c8;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    width: fit-content;
    transition: color 0.2s ease, transform 0.2s ease;
}
.site-foot-col a:hover {
    color: #f5c518;
    transform: translateX(2px);
}
.site-foot-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.site-foot-quick a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(245, 197, 24, 0.28);
    background: rgba(245, 197, 24, 0.06);
    color: #f5c518;
    font-size: 0.78rem;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.site-foot-quick a:hover {
    background: rgba(245, 197, 24, 0.14);
    border-color: rgba(245, 197, 24, 0.55);
    color: #fff;
    transform: none;
}
.site-foot-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px clamp(14px, 4vw, 28px) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}
.site-foot-copy {
    margin: 0;
    color: #6f6f6f;
    font-size: 0.78rem;
}
.site-foot-note {
    margin: 0;
    color: #5a5a5a;
    font-size: 0.74rem;
}
@media (min-width: 900px) {
    .site-foot-inner,
    .site-foot-bottom {
        padding-left: 10vw;
        padding-right: 10vw;
    }
    .site-foot { padding-bottom: 40px; }
}
@media (max-width: 800px) {
    .site-foot-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 28px;
    }
    .site-foot-cols {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}
@media (max-width: 560px) {
    .site-foot-cols { grid-template-columns: 1fr 1fr; }
    .site-foot-col:last-child { grid-column: 1 / -1; }
    .site-foot { padding-bottom: 92px; }
}

/* สำรองชื่อเก่า — ให้ไม่พังถ้ายังมี class เดิม */
.site-legal-footer,
.site-footer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px clamp(14px, 4vw, 28px) 100px;
    border-top: 1px solid rgba(245, 197, 24, 0.35);
    color: #8a8a8a;
    font-size: 0.8rem;
    line-height: 1.8;
}
.site-legal-footer a,
.site-footer a { color: #c8c8c8; text-decoration: none; }
.site-legal-footer a:hover,
.site-footer a:hover { color: #f5c518; }

/* แถบกรองหมวดหน้าแรก — อยู่ในเนื้อหา ห่อได้ สมส่วนกับกริด */
.home-genre-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(245, 197, 24, 0.28);
}
.home-genre-bar .genre-tag {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #c8c8c8 !important;
    padding: 6px 14px !important;
    font-size: 0.85rem !important;
    font-family: 'Kanit', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none !important;
}
.home-genre-bar .genre-tag:hover,
.home-genre-bar .genre-tag.active {
    color: #111 !important;
    background: #f5c518 !important;
    border-color: #f5c518 !important;
}

/* ===== LISTING + SHARED GOLD ===== */
:root {
    --orange: #ffb020;
    --surface-glow: none;
    --border-strong: rgba(245, 197, 24, 0.45);
}

/* บังคับชื่อการ์ด 2 บรรทัด — กันหน้า listing ทับเป็น 1 บรรทัด */
.movie-card .card-title {
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: unset !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-height: 1.35 !important;
    min-height: 2.5em;
}

/* หัว listing (movies/series) — ค้นหาขาว */
.header {
    background: #000;
    border-bottom: 1px solid rgba(245, 197, 24, 0.35);
}
.header .header-search input {
    background: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    color: #111 !important;
    padding: 11px 18px 11px 42px !important;
}
.header .header-search input::placeholder { color: #999 !important; }
.header .header-search i {
    left: 16px !important;
    right: auto !important;
    color: #888 !important;
}
.header .logo-link img.logo-gold {
    height: 44px;
    max-width: min(220px, 42vw);
}

/* หมวด listing — ขีดทอง ไม่ใช่ pill */
.genre-bar .genre-tag {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #fff !important;
    padding: 10px 12px !important;
}
.genre-bar .genre-tag:hover,
.genre-bar .genre-tag.active {
    color: #f5c518 !important;
    border-bottom-color: #f5c518 !important;
    background: transparent !important;
    transform: none !important;
}

/* ฟิลเตอร์ / pagination ทอง */
.filter-select {
    border-color: rgba(245, 197, 24, 0.55) !important;
    background-color: #121212 !important;
    background-image: none !important;
    color: #fff !important;
}
.filter-select:hover,
.filter-select:focus {
    border-color: #f5c518 !important;
    box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.2) !important;
}
.filter-btn-rating {
    border-color: rgba(245, 197, 24, 0.45) !important;
    background: rgba(245, 197, 24, 0.1) !important;
    color: #fff !important;
}
.filter-btn-rating.on {
    background: linear-gradient(135deg, #f5c518, #c9a012) !important;
    color: #111 !important;
    border-color: transparent !important;
    box-shadow: 0 4px 18px rgba(245, 197, 24, 0.3) !important;
}

/* แบ่งหน้า — สไตล์เดียวกับหน้าแรก (ใช้ร่วม hub / รายการ) */
.pagination-wrap {
    margin-top: 16px;
    margin-bottom: 0;
    padding: 10px 12px;
    background: rgba(18, 18, 18, 0.92) !important;
    border: 1px solid rgba(245, 197, 24, 0.22) !important;
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.pagination-inner { width: 100%; min-width: 0; }
.pg-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    width: 100%;
}
.pg-row-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    order: 2;
}
.pg-btn,
a.pg-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #c8c8c8;
    font-family: 'Kanit', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}
.pg-btn:hover:not(:disabled):not(.pg-btn-disabled),
a.pg-btn:hover {
    border-color: #f5c518 !important;
    color: #fff !important;
    background: rgba(245, 197, 24, 0.12) !important;
}
.pg-btn:disabled,
.pg-btn-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}
.pg-nums-scroll {
    min-width: 0;
    max-width: min(420px, 58vw);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0;
}
.pg-nums-scroll::-webkit-scrollbar { display: none; }
.pg-nums {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: max-content;
    margin: 0 auto;
    min-height: 34px;
}
.pg-num,
a.pg-num {
    flex-shrink: 0;
    min-width: 32px;
    height: 34px;
    padding: 0 6px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #c8c8c8;
    font-family: 'Kanit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.pg-num:hover,
a.pg-num:hover {
    border-color: rgba(245, 197, 24, 0.4);
    color: #fff;
}
.pg-num.active,
a.pg-num.active {
    background: linear-gradient(135deg, #ffe566, #f5c518) !important;
    color: #111 !important;
    box-shadow: none !important;
    border-color: transparent;
    font-weight: 700;
    pointer-events: none;
}
.pg-dots {
    flex-shrink: 0;
    padding: 0 2px;
    color: #8a8a8a;
    font-size: 0.8rem;
    user-select: none;
}
.pg-row-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    order: 3;
    margin: 0;
    padding: 0;
    border: none;
    width: auto;
}
.pg-jump-label { font-size: 0.78rem; color: #8a8a8a; white-space: nowrap; }
.pg-jump-input {
    width: 52px;
    padding: 6px 4px;
    border-radius: 8px;
    border: 1px solid rgba(245, 197, 24, 0.35);
    background: #0a0a0a;
    color: #fff;
    font-family: 'Kanit', sans-serif;
    font-size: 0.82rem;
    text-align: center;
    box-sizing: border-box;
}
.pg-jump-input:focus { outline: none; border-color: #f5c518; }
.pg-go-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(245, 197, 24, 0.45) !important;
    background: rgba(245, 197, 24, 0.1) !important;
    color: #f5c518;
    font-family: 'Kanit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.pg-go-btn:hover {
    background: rgba(245, 197, 24, 0.2) !important;
    color: #fff !important;
    border-color: #f5c518 !important;
}
.pg-summary {
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 0.78rem;
    color: #8a8a8a;
    line-height: 1.35;
    flex: 0 1 auto;
    order: 1;
    max-width: 280px;
}
.pg-summary .pg-sum-line { display: inline; }
@media (max-width: 720px) {
    .pg-toolbar { justify-content: center; }
    .pg-summary { order: 3; max-width: none; width: 100%; text-align: center; }
    .pg-row-nav { order: 1; width: 100%; }
    .pg-row-jump { order: 2; }
    .pg-nums-scroll { max-width: calc(100vw - 120px); }
}
@media (max-width: 480px) {
    .pagination-wrap { padding: 10px 8px; }
    .pg-btn,
    a.pg-btn { width: 32px; height: 32px; min-width: 32px; }
    .pg-num,
    a.pg-num { min-width: 30px; height: 32px; font-size: 0.78rem; }
}
.bottom-nav {
    background: #000 !important;
    border-top: 1px solid rgba(245, 197, 24, 0.35) !important;
    backdrop-filter: none !important;
}
.bottom-nav a.active,
.bottom-nav a:hover,
.mobile-nav a.active,
.mobile-nav a:hover {
    color: #f5c518 !important;
}
.bottom-nav a.active i,
.mobile-nav a.active i {
    transform: translateY(-1px);
}
.bottom-nav a i,
.mobile-nav a i {
    transition: transform 0.2s ease, color 0.2s ease;
}
.bottom-nav a.active,
.mobile-nav a.active {
    font-weight: 600;
    position: relative;
}
.bottom-nav a.active::after,
.mobile-nav a.active::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #f5c518;
}
.page-title,
.page-title i,
.hub-h1 {
    color: #f5c518 !important;
}
.listing-hub-strip-nav a {
    border-color: rgba(245, 197, 24, 0.35) !important;
    color: #f5c518 !important;
}
.listing-hub-strip-nav a:hover {
    background: rgba(245, 197, 24, 0.12) !important;
    color: #fff !important;
}

/* badge พากย์/ซับ (ถ้าเปิดใช้ภายหลัง) */
.badge-type.badge-t-dub {
    background: rgba(245, 197, 24, 0.15);
    color: #f5c518;
    border: 1px solid rgba(245, 197, 24, 0.35);
}
.badge-type.badge-t-sub {
    background: rgba(255, 255, 255, 0.08);
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== มือถือ — สมส่วน + แตะง่าย ทั้งไซต์ ===== */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        scroll-padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-x: hidden;
    }
    .header-inner,
    .site-top-inner {
        min-height: 56px;
        padding: 8px 12px;
        gap: 10px;
    }
    .logo-link img.logo-gold {
        height: 34px !important;
        max-width: min(150px, 38vw) !important;
    }
    .header-search {
        flex: 1 1 auto;
        max-width: none !important;
        min-width: 0;
    }
    .header-search input {
        width: 100%;
        min-height: 40px;
        font-size: 16px !important; /* กัน iOS ซูมตอนโฟกัส */
        padding: 9px 14px 9px 40px !important;
    }
    .bottom-nav,
    .mobile-nav {
        padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .bottom-nav-inner,
    .mobile-nav-inner {
        max-width: 560px;
        margin: 0 auto;
    }
    .bottom-nav a,
    .mobile-nav a {
        flex: 1 1 0;
        min-width: 0;
        min-height: 48px;
        padding: 6px 2px;
        justify-content: center;
        gap: 3px;
        font-size: 0.62rem;
        line-height: 1.15;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav a i,
    .mobile-nav a i {
        font-size: 1.22rem;
    }
    .bottom-nav a.active::after,
    .mobile-nav a.active::after {
        top: 2px;
        width: 16px;
    }
    .home-genre-bar {
        gap: 8px;
        margin-bottom: 14px;
        padding-bottom: 12px;
    }
    .home-genre-bar .genre-tag {
        min-height: 40px !important;
        padding: 8px 14px !important;
        font-size: 0.84rem !important;
    }
    .genre-bar {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -4px 10px;
        padding: 0 4px 6px;
    }
    .genre-bar::-webkit-scrollbar { display: none; }
    .genre-bar .genre-tag {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
    }
    .movie-grid {
        gap: 10px !important;
    }
    .movie-card .card-title {
        font-size: 0.8rem !important;
        min-height: 2.4em;
    }
    .back-to-top {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        right: 12px !important;
    }
    .site-foot {
        padding-bottom: 24px !important;
        margin-top: 28px;
    }
    .site-foot-inner {
        padding-top: 24px;
        gap: 22px;
    }
    .site-foot-tagline { max-width: none; }
    .legal-page {
        padding: 14px 12px 24px !important;
    }
    .page-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-bottom: 24px !important;
    }
    .filter-toolbar {
        gap: 8px;
        width: 100%;
    }
    .filter-select,
    .filter-btn-rating {
        min-height: 42px;
        font-size: 0.85rem !important;
    }
    .pagination-wrap {
        padding: 12px 8px !important;
        gap: 8px;
    }
    .pg-btn,
    .pg-num {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        min-height: 52px;
        padding: 6px 10px;
        gap: 8px;
    }
    .logo-link img.logo-gold {
        height: 30px !important;
        max-width: min(130px, 34vw) !important;
    }
    .movie-grid {
        gap: 8px !important;
    }
    .home-spotlight-cta .btn-cinema {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 0.84rem;
    }
    .home-spotlight-cta .btn-cinema.primary {
        flex: 1 1 100%;
    }
}
