/**
 * Landing Page Styles
 * INFINITY X - Theme Matched
 * Color Scheme: INFINITY X (Blue #1D4ED8 + Light)
 * ย้ายแล้ว: navbar · hero · screenshots · ranking · bringer · character
 *           beginner-guide · preview-video · footer · character modal · scrollbar
 * ยังไม่ได้ย้าย: .team-section (Dev Team) — ยังเป็น Red #ec1b1b + Dark #0d0b0c
 */


/* ==================== INFINITY X PALETTE TOKENS ====================
   ดึงมาจาก C:\infinityx\index.html (:root) — ใช้เป็นชุดสีกลางของธีมใหม่
   ค่อย ๆ ทยอยเปลี่ยนทีละส่วน: [x] navbar  [ ] hero  [ ] ส่วนที่เหลือ    */
:root {
    --ix-blue:       #1D4ED8;   /* สีหลัก */
    --ix-blue-deep:  #1E3A8A;
    --ix-blue-soft:  #3B82F6;
    --ix-ink:        #0F1E3D;   /* ตัวหนังสือหลัก */
    --ix-ink-2:      #44557A;   /* ตัวหนังสือรอง (ฟ้าหม่น ไม่ใช่เทา) */
    --ix-navy:       #0A1430;   /* footer */
    --ix-sky:        #EAF2FC;
    --ix-white:      #FFFFFF;
    --ix-line:       #DCE6F5;   /* เส้นขอบ */
    --ix-tint:       #EFF5FF;   /* พื้น hover อ่อน */
    --ix-shadow-card: 0 10px 30px -12px rgba(15,30,61,.14);

    /* ความสูง navbar — hero ใช้ค่านี้คำนวณให้เต็มจอพอดี (100vh - navbar) */
    --ix-nav-h: 78px;

    /* บอกเบราว์เซอร์ว่าหน้านี้เป็นธีมสว่าง — scrollbar/ตัวควบคุมพื้นฐานจะไม่ออกมาโทนมืด */
    color-scheme: light;
}
/* ซ่อนข้อความไว้ให้เฉพาะ screen reader (ใช้กับ label ของฟอร์ม newsletter) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ==================== BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Prompt', sans-serif;
    /* พื้นหลังสำรองของ document — โผล่ตอน overscroll, หน้าสั้นกว่าจอ, และ "ช่องว่าง 1px
       ระหว่าง section" ที่เกิดจากความสูงเศษพิกเซล (subpixel gap)
       SEAM-FIX: ใช้ #F2F7FD ให้ตรงกับพื้นหลังของ section สว่างทั้งหมด (เดิม --ix-sky=#EAF2FC เข้มกว่า
       จึงโผล่เป็น "เส้นเข้ม" ตรงรอยต่อ section) → ช่องว่างกลืนหายสนิท ทุกรอยต่อเนียน */
    background: #F2F7FD;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Language Toggle Button */
.lang-toggle-btn {
    background: var(--ix-white);
    border: 1.5px solid var(--ix-line);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.lang-toggle-btn:hover {
    border-color: var(--ix-blue);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 16px -8px rgba(29, 78, 216, 0.55);
}

.lang-toggle-btn img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Mobile Discord Button */
.mobile-discord-btn {
    display: block;
    position: fixed;
    bottom: 80px;
    right: 15px;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.mobile-discord-btn img {
    width: 200px;
    height: auto;
    display: block;
}

.mobile-discord-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mobile-discord-btn img {
        width: 150px;
    }
}

/* ==================== MOBILE BOTTOM BAR ==================== */
.mobile-bottom-btns {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 10px 10px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 65;   /* เหนือ navbar กลาง (60) · ใต้ overlay/drawer เมนูมือถือ (70/80) — nav-unify 11 ก.ย. 2569 */
    border-top: 1px solid var(--ix-line);
    box-shadow: 0 -8px 26px -18px rgba(15, 30, 61, 0.5);
}

/* เส้นเรืองแสงแดงด้านบน — infinityx ไม่มี */
.mobile-bottom-btns::before {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-btns {
        display: flex;
    }
}

/* เมนูมือถือเปิด (body.menu-open จาก js/site-nav.js) → หลบแถบล่าง — ใช้ทั้ง landing/news/news_detail (news ไม่โหลด polish) */
body.menu-open .mobile-bottom-btns {
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
}

.mobile-action-btn {
    display: inline-block;
    padding: 10px 14px;
    text-align: center;
    font-family: 'Prompt', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    background: var(--ix-white);
    color: var(--ix-blue);
    border: 1.5px solid var(--ix-blue);
    white-space: nowrap;
    letter-spacing: 0.06em;
}

.mobile-action-btn:hover,
.mobile-action-btn:active {
    color: var(--ix-blue);
    background: var(--ix-tint);
    border-color: var(--ix-blue);
    box-shadow: none;
}

/* Primary (แดชบอร์ด / สมัครสมาชิก) — น้ำเงินทึบ */
.mobile-action-btn.btn-register {
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    color: #fff;
    font-weight: 700;
    padding: 10px 18px;
    border: 1px solid var(--ix-blue);
    border-radius: 6px;
    box-shadow: 0 6px 18px -6px rgba(29, 78, 216, 0.5);
    text-shadow: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mobile-action-btn.btn-register:hover,
.mobile-action-btn.btn-register:active {
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue-deep) 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -6px rgba(29, 78, 216, 0.6);
}

/* ปุ่มจุดสามจุด */
.mobile-menu-dots {
    font-size: 22px;
    line-height: 1;
    padding: 9px 10px;
    cursor: pointer;
    color: var(--ix-ink-2);
    background: var(--ix-white);
    border: 1.5px solid var(--ix-line);
    border-radius: 6px;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    margin-left: auto;
    min-width: 36px;
    text-align: center;
}

.mobile-menu-dots:hover,
.mobile-menu-dots:active {
    color: #fff;
    background: var(--ix-blue);
    border-color: var(--ix-blue);
    box-shadow: none;
}

/* คอนเทนเนอร์กลางแบบ infinityx */
.wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 28px;
}

/* nav-ix / dropdown / เมนูมือถือ → ย้ายไป css/site-nav.css ทั้งหมด (nav-unify 11 ก.ย. 2569 · navbar กลางไฟล์เดียวทุกหน้า)
   คงเฉพาะของหน้า: ความสูง nav ที่ hero ใช้คำนวณ (--ix-nav-h · site-nav.css ก็ประกาศค่าเดียวกัน) + .wrap ของ .hero-inner */
@media (max-width: 900px) {
    :root {
        --ix-nav-h: 66px;
    }
}

@media (max-width: 768px) {
    .wrap {
        padding: 0 18px;
    }
}

/* ==================== HERO SECTION — INFINITY X ====================
   อ้างอิง: C:\infinityx\index.html — .hero / .hero-inner / .particles
   วิดีโอพื้นหลัง: img/landing/hero-ix.mp4 (คัดลอกมาจาก assets/bg-vdo.mp4)
   poster:        img/landing/hero-ix-poster.png (จาก assets/bg-new2.png)   */
.hero {
    position: relative;
    background-color: #DEEBFB;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 100% 30%;
    z-index: 0;
}

/* ผ้าคลุมขาวฝั่งข้อความ — วิดีโอฝั่งขวาชัดเต็ม */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, rgba(255,255,255,.97) 0%, rgba(250,253,255,.9) 30%, rgba(244,250,255,.55) 52%, rgba(255,255,255,0) 72%);
    pointer-events: none;
}

/* หมอกขาวรับขอบล่าง ปิดรอยตัดของภาพ */
.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 260px;
    z-index: 1;
    background: linear-gradient(180deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.35) 38%,
        rgba(255,255,255,.75) 62%,
        rgba(255,255,255,.96) 82%,
        #FFFFFF 100%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    align-items: center;
    /* เต็มความสูงจอพอดี = viewport ลบความสูง navbar (navbar เป็น sticky อยู่เหนือ hero)
       ธีมเดิมใช้ min-height:100vh กับ navbar แบบ fixed ที่ทับ hero — ผลลัพธ์ที่เห็นเท่ากัน */
    min-height: calc(100vh - var(--ix-nav-h));
    padding-top: 34px;
    padding-bottom: 120px;
}

.tagline {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ix-ink-2);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.24em;
}

.tagline svg {
    display: block;
    flex: none;
}

.hero h1 {
    margin-top: 18px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(2.7rem, 5.8vw, 5rem);
    line-height: 1.06;
    letter-spacing: 0.02em;
    color: var(--ix-ink);
}

.hero h1 .legend {
    color: var(--ix-blue);
}

.hero-rule {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 26px;
    max-width: 420px;
}

.hero-rule::before,
.hero-rule::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #B7CCEC);
}

.hero-rule::after {
    background: linear-gradient(90deg, #B7CCEC, transparent);
}

.hero-rule svg {
    display: block;
    margin: 0 12px;
    flex: none;
}

.hero-sub {
    margin-top: 24px;
    max-width: 30rem;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.9;
    color: var(--ix-ink-2);
}

/* ชิปข้อมูลเซิร์ฟเวอร์ */
.server-chips {
    /* flex-wrap เพื่อรองรับจำนวนชิปที่แก้ได้จากหลังบ้าน (server_info_rows)
       — เดิมล็อก 4 คอลัมน์ ทำให้ชิปที่ 5+ (WExp/MAX LEVEL) ตกบรรทัดเดี่ยว ๆ */
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid rgba(29, 78, 216, .45);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--ix-blue-deep);
    white-space: nowrap;
}

.chip b {
    font-weight: 700;
    color: var(--ix-blue);
}

.chip.war {
    border-color: rgba(217, 38, 56, .5);
    color: #B01D2E;
}

.chip.war b {
    color: #D92638;
}

.chip.online {
    border-color: rgba(21, 128, 61, .45);
    color: #166534;
}

.chip.online b {
    color: var(--i-green, #15803D);
}

.chip.online .dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22C55E;
    animation: ix-pulse 2.2s ease-out infinite;
}

@keyframes ix-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(.7); opacity: .6; }
}

@media (prefers-reduced-motion: reduce) {
    .chip.online .dot { animation: none; }
}

.chips-note {
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--ix-ink-2);
}

/* ══════════ กล่องดันเจี้ยน — pill ในแถบ hero ══════════
   ไอคอนกล่องจริงจากไคลเอนต์เกม (assets/chest/*.webp) + ×จำนวนดรอปจริง
   แถวเล็กใต้ชิปอัตราเซิร์ฟใน hero (กะทัดรัด · ไม่มีหัวข้อ/หมายเหตุ) */
.hero-chests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.chest-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 12px 3px 4px;
    border: 1.5px solid rgba(29, 78, 216, .30);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
}

.chest-pill-ico {
    width: 28px;
    height: 28px;
    flex: none;
    object-fit: cover;
    /* วงกลม: คลิปกรอบสี่เหลี่ยมของไอคอนเกมให้เป็นวงกลม */
    border-radius: 50%;
    background: rgba(255, 255, 255, .6);
    box-shadow: 0 1px 3px rgba(15, 30, 61, .22), inset 0 0 0 1px rgba(15, 30, 61, .12);
    image-rendering: -webkit-optimize-contrast;
}
.chest-pill-ico-svg { display: grid; place-items: center; color: var(--ix-blue); background: var(--ix-tint); }
.chest-pill-ico-svg svg { width: 18px; height: 18px; }

.chest-pill-name {
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--ix-blue-deep);
    white-space: nowrap;
}
.chest-pill-x {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ix-ink-2);
    white-space: nowrap;
}
.chest-pill-x b {
    font-weight: 800;
    color: var(--ix-blue);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
    .hero-chests { gap: 6px; }
    .chest-pill { padding: 3px 10px 3px 4px; }
    .chest-pill-name, .chest-pill-x { font-size: 0.74rem; }
}

/* ปุ่มโซเชียลใน hero */
.hero-social {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 14px 26px;
    border-radius: 8px;
    color: #fff;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 0.94rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, filter 0.18s ease-out;
}

.btn-social svg {
    display: block;
    flex: none;
}

.btn-fb {
    background: #1877F2;
    box-shadow: 0 8px 22px -8px rgba(24, 119, 242, .55);
}

.btn-dc {
    background: #5865F2;
    box-shadow: 0 8px 22px -8px rgba(88, 101, 242, .55);
}

.btn-social:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

/* จุดแสงลอยขึ้นแล้วจางหาย */
.particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particles span {
    position: absolute;
    left: var(--l);
    bottom: -12px;
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: var(--c, #FFFFFF);
    opacity: 0;
    animation: ix-rise var(--d) linear infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes ix-rise {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: var(--o, .8); }
    55%  { opacity: calc(var(--o, .8) * .55); }
    100% { transform: translateY(-560px) translateX(var(--x, 0px)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .particles { display: none; }
}

/* พื้นที่โชว์ภาพพื้นหลังฝั่งขวา */
.hero-art {
    align-self: stretch;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

/* =====================================================
   แผงข้อมูลเซิร์ฟเวอร์บน hero
   เนื้อหาแก้ได้ที่ system_settings.server_info_rows (บรรทัดละ "ป้าย|ค่า")
   วางลอยเหนือภาพ hero ฝั่งขวา — โปร่งแสงเล็กน้อยให้ภาพข้างหลังยังเห็น
   ===================================================== */
.server-info {
    width: min(330px, 100%);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    backdrop-filter: blur(14px) saturate(1.1);
    box-shadow: 0 18px 44px -20px rgba(15, 30, 61, .40);
    overflow: hidden;
}

.server-info-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(15, 30, 61, .08);
    background: rgba(255, 255, 255, .55);
    color: var(--ix-ink);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 2.2px;
}
.server-info-head svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--ix-blue-soft);
}

.server-info-list {
    margin: 0;
    padding: 6px 0;
}

.server-info-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 14px;
    padding: 9px 18px;
}
.server-info-row + .server-info-row {
    border-top: 1px solid rgba(15, 30, 61, .06);
}

.server-info-row dt {
    position: relative;
    min-width: 0;
    padding-left: 16px;
    color: var(--ix-ink-2);
    font-size: 13.5px;
    overflow-wrap: anywhere;
}
/* หัวลูกศร » หน้าแต่ละบรรทัด */
.server-info-row dt::before {
    content: '\00BB';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--ix-blue-soft);
    font-weight: 700;
}

.server-info-row dd {
    margin: 0;
    color: var(--ix-blue);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
    .hero-art {
        min-height: 0;
        justify-content: flex-start;
        padding-right: 0;
        margin-top: 30px;
    }
    .server-info { width: min(360px, 100%); }
}
@media (prefers-reduced-motion: reduce) {
    .server-info { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.92); }
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding-top: 44px;
        padding-bottom: 120px;
    }
    .hero::before {
        background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(250,253,255,.9) 30%, rgba(255,255,255,.4) 52%, rgba(255,255,255,0) 72%);
    }
    .hero-video {
        object-position: 74% center;
    }
    .hero-art {
        min-height: 400px;
        order: 2;
        margin-top: 10px;
    }
}

@media (max-width: 560px) {
    .btn-social {
        flex: 1;
        justify-content: center;
    }
}

/* ==================== SERVER LAUNCH COUNTDOWN ==================== */
.countdown-section {
    margin-top: 25px;
    text-align: center;
}

.countdown-title {
    font-size: clamp(14px, 2vw, 16px);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.countdown-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 30px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.countdown-label {
    font-size: clamp(10px, 1.5vw, 12px);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    margin-top: 4px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.countdown-value {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    color: #10b981;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
    font-family: 'Orbitron', monospace;
    line-height: 1;
}

.countdown-unit {
    font-size: clamp(10px, 1.5vw, 12px);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    margin-top: 4px;
}

.countdown-separator {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 15px;
}

@media (max-width: 480px) {
    .countdown-container {
        gap: 4px;
        padding: 10px 16px;
    }

    .countdown-item {
        min-width: 40px;
    }

    .countdown-separator {
        margin-bottom: 12px;
    }
}

/* ==================== CTA BUTTONS ==================== */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-image {
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.btn-image img {
    height: 120px;
    width: auto;
    display: block;
}

.btn-image:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.btn-hexagon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 50px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Prompt', sans-serif;
    text-decoration: none;
    color: #ffffff;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

/* Hexagon shape with pointed edges */
.btn-hexagon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    clip-path: polygon(0% 50%,
            8% 0%,
            92% 0%,
            100% 50%,
            92% 100%,
            8% 100%);
    transition: all 0.3s ease;
}

/* Border effect using ::after */
.btn-hexagon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    clip-path: polygon(0% 50%,
            6% -4%,
            94% -4%,
            100% 50%,
            94% 104%,
            6% 104%);
    transition: all 0.3s ease;
}

.btn-hexagon:hover {
    transform: translateY(-3px);
}

/* Gold Button */
.btn-gold::before {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.btn-gold::after {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-gold {
    color: #1a0a0a;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-gold:hover {}

.btn-gold:hover::before {
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
}

.btn-gold:hover::after {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Red Button */
.btn-red::before {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-red::after {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.btn-red {
    color: #ffffff;
}

.btn-red:hover {}

.btn-red:hover::before {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

.btn-red:hover::after {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Blue/Cyan Button - เติมเงิน */
.btn-dark::before {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-dark::after {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-dark {
    color: #ffffff;
}

.btn-dark:hover {}

.btn-dark:hover::before {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-dark:hover::after {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Discord Button */
.btn-discord::before {
    background: linear-gradient(135deg, #7289da 0%, #5865f2 100%);
}

.btn-discord::after {
    background: linear-gradient(135deg, #4752c4 0%, #3c45a5 100%);
}

.btn-discord {
    color: #ffffff;
}

.btn-discord:hover::before {
    background: linear-gradient(135deg, #8ea1e1 0%, #7289da 100%);
}

.btn-discord:hover::after {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
}

/* ==================== SCROLL INDICATOR ==================== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-arrow {
    display: block;
    width: 30px;
    height: 30px;
    border-right: 2px solid rgba(236, 27, 27, 0.6);
    border-bottom: 2px solid rgba(236, 27, 27, 0.6);
    transform: rotate(45deg);
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {

    0%,
    100% {
        margin-top: 0;
        opacity: 0.5;
    }

    50% {
        margin-top: 10px;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .scroll-indicator {
        bottom: 100px;
    }
}

/* ==================== GAME SCREENSHOTS — INFINITY X ====================
   อ้างอิง: C:\infinityx\index.html — .card / .boards / .thumb
   การ์ดขาวขอบ line มุมมน เงานุ่ม · หัวข้อ Cinzel สี ink · เส้นคั่น #B7CCEC + เพชรน้ำเงิน
   ชื่อคลาสเดิมทั้งหมด ไม่แตะ markup และ JS (lightbox ยังทำงานเหมือนเดิม)          */
.screenshots-section {
    position: relative;
    padding: 110px 40px 100px;
    background: linear-gradient(180deg, #F2F7FD 0%, #FFFFFF 40%, #F2F7FD 100%);
    overflow: hidden;
}

.screenshots-bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* ถอด radial-gradient แสงนวลออกตามที่ผู้ใช้ขอ — เหลือเฉพาะเส้นตารางใน ::after */
    z-index: 0;
}

.screenshots-bg-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(29, 78, 216, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 78, 216, .04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    opacity: 0.75;
}

.screenshots-container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
}

/* --- Header (ชุดเดียวกับ .guide-header / .pvs-header) --- */
.screenshots-header {
    text-align: center;
    margin-bottom: 54px;
}

.screenshots-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.screenshots-title-icon {
    width: 34px;
    height: 34px;
    color: var(--ix-blue);
    filter: none;
    flex-shrink: 0;
}

.screenshots-title {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--ix-ink);
    margin: 0;
    text-shadow: none;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.screenshots-bar {
    position: relative;
    flex: 0 0 120px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #B7CCEC 50%, transparent 100%);
}
.screenshots-bar.right {
    background: linear-gradient(to left, transparent 0%, #B7CCEC 50%, transparent 100%);
}
.screenshots-bar::before,
.screenshots-bar::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #2563EB;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: none;
}
.screenshots-bar.left::before  { right: 0; }
.screenshots-bar.left::after   { left: 0; opacity: 0.4; width: 3px; height: 3px; }
.screenshots-bar.right::before { left: 0; }
.screenshots-bar.right::after  { right: 0; opacity: 0.4; width: 3px; height: 3px; }

.screenshots-subtitle {
    font-size: 14px;
    color: var(--ix-ink-2);
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
    font-weight: 500;
}

/* --- Grid (Bento / Mosaic) --- */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 148px;
    gap: 14px;
}

.screenshots-grid a {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    box-shadow: var(--ix-shadow-card);
    transition:
        transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
        border-color 0.35s ease,
        box-shadow 0.45s ease;
    isolation: isolate;
}

/* การ์ดเด่น = 2x2 — ใบที่ 1, 2 (ภาพตัวละครเต็มตัว) และใบที่ 8 (ตู้เสื้อผ้า)
   ตำแหน่งนี้เลือกมาแล้วว่าเรียงเต็ม 5 แถวพอดีไม่มีช่องโหว่ ในกริด 4 คอลัมน์:
       [1][1][2][2]
       [1][1][2][2]
       [3][4][5][6]
       [7][8][8][9]
      [10][8][8][11]
   ถ้าเพิ่ม/ลดจำนวนภาพ ต้องคำนวณตำแหน่งใบใหญ่ใหม่ ไม่งั้นจะเหลือช่องว่าง
   (สูตร: จำนวนช่อง = N + 3 x จำนวนใบใหญ่ ต้องหารด้วย 4 ลงตัว) */
.screenshots-grid a:nth-child(1),
.screenshots-grid a:nth-child(2),
.screenshots-grid a:nth-child(8) {
    grid-column: span 2;
    grid-row: span 2;
}

/* รูปภาพ — ธีมสว่างโชว์สีจริง ไม่หรี่แสงเหมือนธีมมืดเดิม */
.screenshots-grid img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition:
        transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
        filter 0.45s ease;
    filter: saturate(1.02);
    z-index: 0;
}

/* แถบคำบรรยายใต้ภาพ — ฉากมืดโปร่งวางทับรูป (จำเป็นเพื่อให้อ่านออก) ใช้โทน navy */
.screenshots-grid a::before {
    content: attr(data-caption);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 36px 16px 14px;
    background: linear-gradient(180deg,
        rgba(10, 20, 48, 0) 0%,
        rgba(10, 20, 48, 0.5) 45%,
        rgba(10, 20, 48, 0.92) 100%);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-align: left;
    text-shadow: 0 1px 4px rgba(10, 20, 48, 0.8);
    transform: translateY(4px);
    opacity: 0.95;
    transition: transform 0.4s ease, color 0.3s ease, padding 0.3s ease;
    z-index: 3;
    pointer-events: none;
    /* ยอมให้ตกได้ 2 บรรทัด แทนที่จะตัดด้วย … ตั้งแต่บรรทัดแรก
       (ของเดิม nowrap ทำให้ "Newbie Support · Achieve Level" โดนตัดเหลือ "ACHIEVE LEV…") */
    white-space: normal;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ขีดมุมตัว L สีแดงของธีมเดิม — infinityx ไม่มี */
.screenshots-grid a::after {
    display: none;
}

/* การ์ดเด่น — คำบรรยายใหญ่ขึ้น */
.screenshots-grid a:nth-child(1)::before,
.screenshots-grid a:nth-child(2)::before,
.screenshots-grid a:nth-child(8)::before {
    font-size: 16px;
    padding: 52px 22px 20px;
    letter-spacing: 2px;
}

/* ปุ่มขยาย (มุมขวาบน) */
.screenshots-grid a .ss-zoom-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--ix-line);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(-6px) scale(0.85);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 6px 16px -8px rgba(15, 30, 61, .5);
}
.screenshots-grid a .ss-zoom-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--ix-blue);
    filter: none;
}
.screenshots-grid a .ss-zoom-icon svg path {
    fill: var(--ix-blue);
}

/* --- HOVER --- */
.screenshots-grid a:hover {
    transform: translateY(-4px);
    border-color: rgba(29, 78, 216, .45);
    box-shadow: 0 20px 40px -18px rgba(15, 30, 61, .35);
    z-index: 4;
}

.screenshots-grid a:hover img {
    transform: scale(1.06);
    filter: saturate(1.1) contrast(1.03);
}

.screenshots-grid a:hover::before {
    transform: translateY(0);
    color: #fff;
    padding-bottom: 18px;
}

.screenshots-grid a:hover .ss-zoom-icon {
    opacity: 1;
    transform: translateY(0) scale(1);
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    border-color: var(--ix-blue);
    box-shadow: 0 8px 20px -8px rgba(29, 78, 216, .65);
}
.screenshots-grid a:hover .ss-zoom-icon svg,
.screenshots-grid a:hover .ss-zoom-icon svg path {
    fill: #ffffff;
}

/* --- Responsive (layout เท่านั้น) --- */
@media (max-width: 1024px) {
    .screenshots-grid {
        grid-auto-rows: 132px;
        gap: 12px;
    }
    .screenshots-title { font-size: 30px; letter-spacing: 6px; }
    .screenshots-bar { flex: 0 0 90px; }
    .screenshots-section { padding: 90px 32px 80px; }
}

@media (max-width: 768px) {
    .screenshots-section {
        padding: 70px 16px 60px;
    }
    .screenshots-header { margin-bottom: 36px; }
    .screenshots-title { font-size: 22px; letter-spacing: 4px; }
    .screenshots-title-icon { width: 26px; height: 26px; }
    .screenshots-bar { flex: 0 0 40px; }
    .screenshots-subtitle { font-size: 12px; letter-spacing: 1.5px; }

    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 116px;
        gap: 10px;
    }
    /* จอเล็ก 2 คอลัมน์: ใบ 1, 2, 11 กินเต็มความกว้าง สูงแถวเดียว
       ได้ 7 แถวพอดีไม่มีช่องโหว่ (11 เป็นเลขคี่ ถ้าไม่ขยายจะเหลือรูแถวสุดท้าย)
       ไม่ใช้ 2x2 เหมือนเดสก์ท็อป เพราะจอแคบการ์ดจะสูงเกินจนดันตัวอื่นตกจอ */
    .screenshots-grid a:nth-child(1),
    .screenshots-grid a:nth-child(2),
    .screenshots-grid a:nth-child(11) {
        grid-column: span 2;
        grid-row: span 1;
    }
    .screenshots-grid a:nth-child(8) {
        grid-column: span 1;
        grid-row: span 1;
    }
    .screenshots-grid a::before {
        font-size: 11px;
        padding: 24px 12px 10px;
        letter-spacing: 0.6px;
    }
    /* ใบ 8 เป็นการ์ดปกติบนมือถือ — ต้องรีเซ็ตคำบรรยายกลับเป็นขนาดปกติด้วย
       ไม่งั้นกฎ nth-child(8) ของเดสก์ท็อปจะชนะเพราะ specificity สูงกว่า */
    .screenshots-grid a:nth-child(8)::before {
        font-size: 11px;
        padding: 24px 12px 10px;
        letter-spacing: 0.6px;
    }
    .screenshots-grid a:nth-child(1)::before,
    .screenshots-grid a:nth-child(2)::before,
    .screenshots-grid a:nth-child(11)::before {
        font-size: 13px;
        padding: 36px 14px 14px;
        letter-spacing: 1.2px;
    }
    .screenshots-grid a .ss-zoom-icon {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .screenshots-grid { grid-auto-rows: 98px; gap: 8px; }
}

/* Lightbox keyframes */
@keyframes ss-lb-open {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ss-lb-exit {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes ss-lb-enter {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Lightbox — ฉากหลังยังเป็นโทนเข้ม (navy) เพราะรูปต้องเด่น แต่เปลี่ยนจากแดงเป็นน้ำเงิน */
#ss-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(15, 30, 61, 0.95) 0%, rgba(10, 20, 48, 0.985) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}
#ss-lightbox.active { display: flex; }

/* กรอบรูป — การ์ดขาวแบบ .card ของ infinityx */
.ss-lb-frame {
    position: relative;
    display: inline-flex;
    padding: 8px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 14px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.75);
    overflow: hidden;
}

/* ขีดมุมสีแดงของธีมเดิม — infinityx ไม่มี */
.ss-lb-frame::before,
.ss-lb-frame::after,
.ss-lb-corner-bl,
.ss-lb-corner-br {
    display: none;
}

#ss-lb-img {
    max-width: 86vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* ตัวนับรูป */
#ss-lb-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    letter-spacing: 2px;
    font-family: monospace;
}

/* ปุ่มปิด */
.ss-lb-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--ix-line);
    color: var(--ix-ink-2);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    z-index: 10001;
}
.ss-lb-close:hover {
    background: var(--ix-blue);
    border-color: var(--ix-blue);
    color: #fff;
}

/* ปุ่มเลื่อนซ้าย/ขวา */
.ss-lb-prev, .ss-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ix-line);
    color: var(--ix-blue);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    width: 44px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    user-select: none;
    z-index: 10001;
}
.ss-lb-prev { left: 14px; }
.ss-lb-next { right: 14px; }
.ss-lb-prev:hover, .ss-lb-next:hover {
    background: var(--ix-blue);
    border-color: var(--ix-blue);
    color: #fff;
}
/* ==================== RANKING SECTION (TOP PLAYERS) — INFINITY X ====================
   อ้างอิง: C:\infinityx\index.html — .card / .boards / .chip
   ⚠️ .section-header / .section-title / .section-bar / .title-icon / .section-subtitle
      ใช้ร่วมกับ bringer-section ด้วย แก้ที่นี่ที่เดียวมีผลทั้งสอง section
   สีประจำอาชีพ (class-color) และเหรียญทอง/เงิน/ทองแดง คงไว้ เพราะเป็นสีที่สื่อความหมาย
   แค่ปรับให้อ่านออกบนพื้นขาว                                                          */
.ranking-section {
    position: relative;
    padding: 110px 40px 100px;
    /* SEAM-FIX: ขอบบน #F2F7FD ให้ตรงกับขอบล่างของ .screenshots-section (รอยต่อเนียน)
       ไฮไลต์ขาวไว้กลาง section (40%) ห่างจากรอยต่อ — แพทเทิร์นเดียวกับเซกชันที่เนียนแล้ว */
    background: linear-gradient(180deg, #F2F7FD 0%, #FFFFFF 40%, #F2F7FD 100%);
    overflow: hidden;
}

.ranking-bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.ranking-bg-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(29, 78, 216, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 78, 216, .04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    opacity: 0.75;
}

.ranking-container {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
}

/* Section Header — ใช้ร่วมกับ bringer */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--ix-ink);
    margin: 0;
    letter-spacing: 8px;
    text-shadow: none;
    background: none;
    -webkit-text-fill-color: currentColor;
    display: inline-block;
}

.title-icon {
    width: 34px;
    height: 34px;
    color: var(--ix-blue);
    filter: none;
    flex-shrink: 0;
}

.section-bar {
    position: relative;
    flex: 0 0 120px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #B7CCEC 50%, transparent 100%);
}
.section-bar.right {
    background: linear-gradient(to left, transparent 0%, #B7CCEC 50%, transparent 100%);
}
.section-bar::before,
.section-bar::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #2563EB;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: none;
}
.section-bar.left::before  { right: 0; }
.section-bar.left::after   { left: 0; opacity: 0.4; width: 3px; height: 3px; }
.section-bar.right::before { left: 0; }
.section-bar.right::after  { right: 0; opacity: 0.4; width: 3px; height: 3px; }

.section-subtitle {
    font-size: 14px;
    color: var(--ix-ink-2);
    margin: 0;
    letter-spacing: 1px;
}

/* Ranking Controls */
.ranking-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

/* Nation Filter */
.nation-filter {
    display: flex;
    gap: 10px;
}

.nation-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 8px;
    color: var(--ix-ink-2);
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nation-btn:hover {
    border-color: rgba(29, 78, 216, .45);
    color: var(--ix-ink);
}

.nation-icon {
    font-size: 16px;
}

/* Capella — โทนน้ำเงิน (สีประจำชาติ คงไว้) */
.nation-btn.capella.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 6px 18px -6px rgba(59, 130, 246, .55);
}

.nation-btn.capella:hover:not(.active) {
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Procyon — โทนม่วง (สีประจำชาติ คงไว้) */
.nation-btn.procyon.active {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 6px 18px -6px rgba(168, 85, 247, .55);
}

.nation-btn.procyon:hover:not(.active) {
    border-color: #a855f7;
    color: #7c3aed;
}

/* Ranking Tabs */
.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 12px;
    box-shadow: var(--ix-shadow-card);
}

.rank-tab {
    position: relative;
    padding: 11px 28px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--ix-ink-2);
    font-family: 'Prompt', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
}

.rank-tab:hover {
    color: var(--ix-blue);
    background: var(--ix-tint);
}

.rank-tab.active {
    color: #fff;
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    box-shadow: 0 6px 18px -6px rgba(29, 78, 216, .5);
    text-shadow: none;
}
.rank-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--ix-blue);
    filter: none;
}

/* War Class Filter */
.war-class-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
    align-items: center;
    padding: 4px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 10px;
}

.war-class-filter.hidden {
    display: none;
}

.class-filter-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--ix-ink-2);
    font-family: 'Prompt', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 36px;
    text-align: center;
    letter-spacing: 0.6px;
}

.class-filter-btn:hover {
    border-color: rgba(29, 78, 216, .4);
    color: var(--ix-blue);
    background: var(--ix-tint);
}

.class-filter-btn.active {
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    border-color: var(--ix-blue);
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(29, 78, 216, .55);
}

/* สีประจำอาชีพ — คงไว้ตามเดิม (ผู้เล่นจำสีพวกนี้ได้) */
.class-filter-btn[data-class="1"] { --class-color: #ef4444; }
.class-filter-btn[data-class="2"] { --class-color: #f97316; }
.class-filter-btn[data-class="3"] { --class-color: #8b5cf6; }
.class-filter-btn[data-class="4"] { --class-color: #22c55e; }
.class-filter-btn[data-class="5"] { --class-color: #3b82f6; }
.class-filter-btn[data-class="6"] { --class-color: #eab308; }
.class-filter-btn[data-class="7"] { --class-color: var(--i-red, #DC2626); }
.class-filter-btn[data-class="8"] { --class-color: #06b6d4; }
.class-filter-btn[data-class="9"] { --class-color: #6366f1; }

.class-filter-btn[data-class]:not([data-class="all"]).active {
    background: var(--class-color);
    border-color: var(--class-color);
    color: #ffffff;
    box-shadow: none;
}

.class-filter-btn[data-class]:not([data-class="all"]):hover:not(.active) {
    border-color: var(--class-color);
    color: var(--class-color);
    background: var(--ix-white);
}

/* Ranking Table — การ์ดขาวแบบ .card ของ infinityx */
.ranking-table-wrapper {
    position: relative;
    background: var(--ix-white);
    border-radius: 14px;
    border: 1px solid var(--ix-line);
    overflow: auto;
    box-shadow: var(--ix-shadow-card);
    max-height: 540px;
    margin-top: 8px;
}
.ranking-table-wrapper::before,
.ranking-table-wrapper::after {
    content: '';
    position: sticky;
    pointer-events: none;
    z-index: 5;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    position: relative;
}

.ranking-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--ix-sky);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.ranking-table thead::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--ix-line);
    box-shadow: none;
}

.ranking-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ix-ink);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: none;
    font-family: 'Cinzel', 'Prompt', sans-serif;
}

.ranking-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--ix-ink);
    border-bottom: 1px solid var(--ix-line);
    position: relative;
}

.ranking-table tbody tr {
    transition: background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.ranking-table tbody tr:hover {
    background: var(--ix-tint);
    box-shadow: inset 3px 0 0 var(--ix-blue);
}

.ranking-table tbody tr:last-child td {
    border-bottom: none;
}

/* Rank Badge — เหรียญ ทอง/เงิน/ทองแดง คงไว้ ลดแสง glow ให้เข้ากับพื้นขาว */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    background: var(--ix-sky);
    color: var(--ix-ink-2);
    border: 1px solid var(--ix-line);
    font-family: 'Cinzel', serif;
    position: relative;
}

.rank-badge.rank-1 {
    background: linear-gradient(145deg, #ffd86b 0%, #f59e0b 55%, #c17600 100%);
    color: #4A2B00;
    border-color: #E8A317;
    box-shadow: 0 4px 12px -4px rgba(217, 119, 6, .55), inset 0 1px 0 rgba(255,255,255,0.5);
    text-shadow: 0 1px 1px rgba(255,255,255,0.35);
}

.rank-badge.rank-2 {
    background: linear-gradient(145deg, #f1f5f9 0%, #94a3b8 55%, #64748b 100%);
    color: #1F2937;
    border-color: #B6C2D1;
    box-shadow: 0 4px 12px -4px rgba(100, 116, 139, .45), inset 0 1px 0 rgba(255,255,255,0.6);
}

.rank-badge.rank-3 {
    background: linear-gradient(145deg, #e69656 0%, #cd7f32 55%, #8b4513 100%);
    color: #3A1D06;
    border-color: #C2803F;
    box-shadow: 0 4px 12px -4px rgba(139, 69, 19, .45), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* แถวอันดับ 1-3 */
.rank-gold,
.rank-silver,
.rank-bronze {
    position: relative;
}
.rank-gold td:first-child,
.rank-silver td:first-child,
.rank-bronze td:first-child {
    position: relative;
}
.rank-gold {
    background: linear-gradient(90deg, rgba(245, 158, 11, .12) 0%, transparent 55%);
    box-shadow: inset 3px 0 0 #E8A317;
}
.rank-silver {
    background: linear-gradient(90deg, rgba(100, 116, 139, .10) 0%, transparent 55%);
    box-shadow: inset 3px 0 0 #94A3B8;
}
.rank-bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, .10) 0%, transparent 55%);
    box-shadow: inset 3px 0 0 #C2803F;
}
.rank-gold:hover, .rank-silver:hover, .rank-bronze:hover {
    background: var(--ix-tint);
}

/* Nation Icon */
.nation-icon {
    width: 25px;
    height: 25px;
    vertical-align: middle;
    margin-left: 6px;
    border-radius: 4px;
}

.nation-icon-gm {
    width: 30px;
    height: 30px;
}

/* Column Widths */
.col-rank {
    width: 80px;
    text-align: center;
}

.col-name {
    width: auto;
}

.col-class {
    width: 140px;
}

.col-level {
    width: 80px;
    text-align: center;
}

.col-combat {
    width: 100px;
    text-align: right;
}

/* สีตัวเลขในคอลัมน์ — เข้มขึ้นให้อ่านออกบนพื้นขาว */
.col-alz {
    width: 120px;
    text-align: right;
    color: var(--i-amber, #B45309);
    font-weight: 600;
}

.col-exp {
    width: 100px;
    text-align: right;
    color: var(--ix-blue);
    font-weight: 600;
}

.col-warpoint {
    width: 100px;
    text-align: right;
    color: var(--i-amber, #B45309);
    font-weight: 600;
}

.col-playtime {
    width: 140px;
    text-align: right;
    color: var(--i-green, #15803D);
    font-weight: 600;
}

.col-status {
    width: 90px;
    text-align: center;
}

/* คอลัมน์กิลด์ — ชื่อกิลด์มีอักขระตกแต่ง (๏ ๛ ๊) ซึ่งเบราว์เซอร์ถือเป็นจุดตัดบรรทัดได้
   ชื่ออย่าง ๏๛NEMESIS๛๏ เลยขึ้นบรรทัดใหม่ทั้งที่ตารางยังมีที่ว่างเหลือ
   nowrap ทำให้คอลัมน์กว้างตามชื่อที่ยาวที่สุดแทนการตัดบรรทัด (ตารางเป็น table-layout: auto)
   แท็บ GUILDS ใช้คอลัมน์นี้เก็บจำนวนสมาชิกซึ่งเป็นตัวเลขสั้น ๆ จึงไม่กว้างขึ้นตาม
   max-width กันชื่อที่ยาวผิดปกติไม่ให้ดันจนตารางมี scroll แนวนอน */
.col-guild {
    width: 120px;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* สถานะออนไลน์/ออฟไลน์ — ชิปแบบเดียวกับ .chip บน hero */
.status-online,
.status-offline {
    display: inline-block;
    width: 70px;
    padding: 3px 0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.status-online {
    background: rgba(34, 197, 94, .12);
    color: var(--i-green, #15803D);
    border: 1px solid rgba(21, 128, 61, .4);
}

.status-offline {
    background: rgba(100, 116, 139, .1);
    color: #64748B;
    border: 1px solid rgba(100, 116, 139, .32);
}

.ranking-table th.col-rank,
.ranking-table td.col-rank {
    text-align: center;
}

.ranking-table th.col-level,
.ranking-table td.col-level {
    text-align: center;
}

.ranking-table th.col-combat,
.ranking-table td.col-combat,
.ranking-table th.col-alz,
.ranking-table td.col-alz,
.ranking-table th.col-exp,
.ranking-table td.col-exp,
.ranking-table th.col-warpoint,
.ranking-table td.col-warpoint,
.ranking-table th.col-playtime,
.ranking-table td.col-playtime {
    text-align: right;
}

/* Loading & Empty States */
.loading-row,
.empty-row,
.error-row {
    background: transparent !important;
}

.loading-cell,
.empty-cell,
.error-cell {
    padding: 60px 20px !important;
    text-align: center !important;
    color: var(--ix-ink-2);
    font-size: 15px;
}

.loading-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--ix-line);
    border-top-color: var(--ix-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-cell {
    color: var(--i-red, #DC2626);
}

/* ==================== CHARACTER MODAL — INFINITY X ====================
   ลอกมาจาก C:\infinityx\ranking.html — .char-scrim / .char-modal / .cm-*
   เดิมเป็น tooltip โผล่ตอนเอาเมาส์ชี้ (desktop) + popup กลางจอ (mobile)
   เปลี่ยนเป็น modal กลางจอ คลิกเปิด/กดปิด เหมือนกันทุกอุปกรณ์
   หัว modal ไล่สีตามชาติ: .cap = Capella น้ำเงิน · .pro = Procyon แดง · .gm = ทีมงาน */
.char-scrim {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 20, 48, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease-out;
    overflow-y: auto;
}
.char-scrim.open {
    opacity: 1;
    pointer-events: auto;
}

.char-modal {
    width: min(520px, 100%);
    background: var(--ix-white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px -30px rgba(10, 20, 48, .6);
    transform: translateY(14px) scale(.97);
    transition: transform .2s ease-out;
}
.char-scrim.open .char-modal {
    transform: translateY(0) scale(1);
}

/* --- หัว modal --- */
.cm-top {
    position: relative;
    padding: 26px 26px 22px;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, #12224E, #1E3A8A 60%, #2563EB);
}
.cm-top.cap { background: linear-gradient(135deg, #12224E, #1E3A8A 60%, #2563EB); }
.cm-top.pro { background: linear-gradient(135deg, #3B0D14, #7F1D1D 60%, #D92638); }
.cm-top.gm  { background: linear-gradient(135deg, #3A2A05, #92700B 60%, #D9A62B); }

.cm-top::after {
    content: "";
    position: absolute;
    right: -34px;
    top: -34px;
    width: 130px;
    height: 130px;
    border: 1.5px solid rgba(255, 255, 255, .18);
    border-radius: 30px;
    rotate: 45deg;
    pointer-events: none;
}

.cm-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .16);
    cursor: pointer;
    transition: background .15s ease-out;
}
.cm-close:hover { background: rgba(255, 255, 255, .3); }
.cm-close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .9);
    outline-offset: 2px;
}
.cm-close svg { display: block; stroke: #fff; }

.cm-id {
    display: flex;
    align-items: center;
    gap: 14px;
}
.cm-id .ava {
    flex: none;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    background: rgba(10, 20, 48, .4);
    border: 1.5px solid rgba(255, 255, 255, .45);
    border-radius: 15px;
}
/* ในกรอบเป็นไอคอนอาชีพ (ภาพสี่เหลี่ยม) ตามแบบ infinityx ไม่ใช่รูปโปรไฟล์ผู้เล่น */
.cm-id .ava img {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    object-fit: contain;
    display: block;
}
.cm-id .ci { min-width: 0; }
.cm-id h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: .02em;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cm-id .sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 5px 0 0;
    font-size: .8rem;
    opacity: .92;
}

.cm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.cm-badges span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    background: rgba(255, 255, 255, .16);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
}
.cm-badges span img {
    width: 15px;
    height: 15px;
    object-fit: contain;
    display: block;
}
.cm-badges .live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5BF08F;
    flex: none;
}
.cm-badges .off i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    flex: none;
}

/* --- ตัว modal --- */
.cm-body { padding: 22px 26px 26px; }

.cm-sec {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--ix-ink-2);
    margin: 0 0 12px;
}
.cm-sec + .cm-grid { margin-bottom: 20px; }

.cm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.cm-cell {
    padding: 12px 14px;
    border: 1px solid var(--ix-line);
    border-radius: 11px;
    background: #F8FBFF;
}
.cm-cell .k {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--ix-ink-2);
}
.cm-cell .v {
    margin-top: 3px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ix-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cm-cell.hi   .v { color: var(--ix-blue-deep); }
.cm-cell.gold .v { color: #B07500; }
.cm-cell.up   .v { color: var(--i-green, #15803D); }
.cm-cell.wide { grid-column: 1 / -1; }

/* แถบค่าสถานะ */
.cm-stats {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}
.cm-stat {
    display: grid;
    grid-template-columns: 34px 42px 1fr;
    align-items: center;
    gap: 9px;
    font-size: .76rem;
}
.cm-stat .k {
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--ix-ink-2);
}
.cm-stat .v {
    font-weight: 700;
    color: var(--ix-ink);
    text-align: right;
}
.cm-stat .bar {
    height: 6px;
    background: #E9F1FB;
    border-radius: 99px;
    overflow: hidden;
}
.cm-stat .bar i {
    display: block;
    height: 100%;
    border-radius: 99px;
}
.cm-stat.str .bar i { background: linear-gradient(90deg, #F87171, #D92638); }
.cm-stat.int .bar i { background: linear-gradient(90deg, #60A5FA, #1D4ED8); }
.cm-stat.dex .bar i { background: linear-gradient(90deg, #FFD75E, #E8A812); }

.cm-foot {
    margin: 6px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--ix-line);
    font-size: .72rem;
    color: var(--ix-ink-2);
    text-align: center;
}

@media (max-width: 560px) {
    .cm-top  { padding: 22px 20px 18px; }
    .cm-body { padding: 18px 20px 22px; }
    .cm-id h2 { font-size: 1.2rem; }
    .cm-grid { grid-template-columns: 1fr; }
}
/* ==================== BRINGER RANKING (ตารางในหน้า bringer.php) — INFINITY X ====================
   override หัวข้อโทนมืดชั่วคราวที่เคยใส่ไว้ถูกลบแล้ว เพราะ bringer-section
   แปลงเป็นธีมสว่างเรียบร้อย ใช้ .section-* ชุดเดียวกับ ranking ได้ตรง ๆ
   สีประจำชาติคงไว้: Luminous (Capella) = น้ำเงิน · Storm (Procyon) = แดง        */
.bringer-section-header {
    background: transparent !important;
}

.bringer-section-header td {
    padding: 20px 15px 10px !important;
    text-align: center;
    border-bottom: none !important;
}

.bringer-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.bringer-title.luminous {
    color: #1D4ED8;
    text-shadow: none;
}

.bringer-title.storm {
    color: var(--i-red, #B91C1C);
    text-shadow: none;
}

.bringer-nation {
    font-size: 13px;
    color: var(--ix-ink-2);
    margin-left: 8px;
}

.luminous-header td {
    border-top: 2px solid rgba(29, 78, 216, 0.28) !important;
}

.storm-header td {
    border-top: 2px solid rgba(185, 28, 28, 0.28) !important;
    margin-top: 20px;
}

.luminous-row {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
}

.luminous-row:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.04) 50%, transparent 100%);
}

.storm-row {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.06) 0%, transparent 50%);
}

.storm-row:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.14) 0%, rgba(239, 68, 68, 0.04) 50%, transparent 100%);
}

.empty-bringer {
    opacity: 0.6;
}

.empty-bringer-cell {
    text-align: center !important;
    font-style: italic;
    color: var(--ix-ink-2);
    padding: 20px 15px !important;
}

.bringer-week-info td {
    text-align: center !important;
    padding: 15px !important;
    color: var(--ix-ink-2);
    font-size: 12px;
    border-top: 1px solid var(--ix-line);
}

.no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 20px;
}

.no-data-icon {
    font-size: 48px;
    opacity: 0.5;
}

.no-data-message span:not(.no-data-icon) {
    font-size: 16px;
    color: var(--ix-ink-2);
}

.no-data-message small {
    font-size: 13px;
    color: var(--ix-ink-2);
    opacity: 0.85;
}
/* ==================== WAR RANKING BY CLASS — INFINITY X ====================
   ตารางอันดับสงครามแบบแยกตามอาชีพ (อยู่ในตารางเดียวกับ TOP PLAYERS)
   สีประจำอาชีพ (--class-color / --class-color-rgb) คงไว้ แค่ลดความเข้มของพื้น
   และเปลี่ยนตัวหนังสือจากขาวเป็น ink ให้อ่านออกบนพื้นขาว                        */
.war-class-header {
    background: linear-gradient(90deg,
        rgba(var(--class-color-rgb, 29, 78, 216), 0.14) 0%,
        rgba(var(--class-color-rgb, 29, 78, 216), 0.04) 40%,
        transparent 90%) !important;
    position: relative;
}

.war-class-header td {
    padding: 14px 20px 12px !important;
    text-align: left;
    border-top: 1px solid rgba(var(--class-color-rgb, 29, 78, 216), 0.35) !important;
    border-bottom: 1px solid rgba(var(--class-color-rgb, 29, 78, 216), 0.18) !important;
    position: relative;
}
.war-class-header td::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--class-color, var(--ix-blue));
    transform: rotate(45deg);
    box-shadow: none;
    margin-right: 12px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.war-class-icon {
    font-size: 20px;
    margin-right: 8px;
}

.war-class-title {
    font-family: 'Cinzel', 'Prompt', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--class-color, var(--ix-ink));
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: none;
}

.war-class-count {
    font-size: 11px;
    color: var(--ix-ink-2);
    margin-left: 10px;
    letter-spacing: 1px;
    font-weight: 500;
}

.war-row {
    background: linear-gradient(90deg, rgba(var(--class-color-rgb, 29, 78, 216), 0.035) 0%, transparent 50%);
}

.war-row:hover {
    background: linear-gradient(90deg, rgba(var(--class-color-rgb, 29, 78, 216), 0.1) 0%, transparent 55%);
}

.war-row td {
    border-left: none;
}

.war-row td:first-child {
    border-left: none;
}

.col-warpoint {
    color: var(--i-amber, #B45309);
    font-weight: 600;
}
/* ==================== CHARACTER (คลาสอาชีพ) — INFINITY X ====================
   อ้างอิง: C:\infinityx\index.html — .card / .boards / .chip
   ⚠️ .stat-label / .stat-value เดิมประกาศแบบ global ทำให้รั่วไปชนการ์ด bringer
      ตอนนี้ scope ไว้ใต้ .character-section แล้ว
   สีแท่งสเตตัส STR แดง / INT ม่วง / DEX เขียว คงไว้ เพราะสื่อความหมาย
   แค่เปลี่ยนแดงแบรนด์ #ec1b1b เป็นแดงกลางและลด glow ให้เข้ากับพื้นสว่าง         */
.character-section {
    position: relative;
    padding: 110px 40px 60px;
    /* SEAM-FIX: โซนสีเรียบ #F2F7FD ก้น section (80-100%) คร่อมรอยต่อกับ .guide-section */
    background: linear-gradient(180deg, #F2F7FD 0%, #FFFFFF 45%, #F2F7FD 80%, #F2F7FD 100%);
    overflow: hidden;
    min-height: 800px;
}

.character-bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.character-bg-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(29, 78, 216, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 78, 216, .04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    opacity: 0.75;
}

.character-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* หัวข้อ — เยื้องขวาบนจอใหญ่เพื่อเลี่ยงรูปตัวละคร */
.character-header {
    margin-left: 35%;
    padding-right: 40px;
    margin-bottom: 28px;
    text-align: center;
}

.character-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.character-title-icon {
    width: 34px;
    height: 34px;
    color: var(--ix-blue);
    filter: none;
    flex-shrink: 0;
}

.character-title {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--ix-ink);
    margin: 0;
    letter-spacing: 8px;
    text-shadow: none;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.character-bar {
    position: relative;
    flex: 0 0 100px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #B7CCEC 50%, transparent 100%);
}
.character-bar.right {
    background: linear-gradient(to left, transparent 0%, #B7CCEC 50%, transparent 100%);
}
.character-bar::before,
.character-bar::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #2563EB;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: none;
}
.character-bar.left::before  { right: 0; }
.character-bar.left::after   { left: 0; opacity: 0.4; width: 3px; height: 3px; }
.character-bar.right::before { left: 0; }
.character-bar.right::after  { right: 0; opacity: 0.4; width: 3px; height: 3px; }

.character-subtitle {
    text-align: center;
    color: var(--ix-ink-2);
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Showcase */
.character-showcase {
    display: block;
    position: relative;
    min-height: 400px;
    margin-bottom: 20px;
}

.character-featured {
    position: absolute;
    left: 0;
    bottom: -320px;
    width: 530px;
    z-index: 2;
    pointer-events: none;
}

.character-featured img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 24px 50px rgba(15, 30, 61, 0.28));
    transition: opacity 0.3s ease;
}

.character-info {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-left: 35%;
    padding-right: 40px;
}

.featured-name {
    font-family: 'Cinzel', serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--ix-ink);
    margin: 0 0 22px;
    letter-spacing: 6px;
    text-shadow: none;
    background: none;
    -webkit-text-fill-color: currentColor;
    position: relative;
    display: inline-block;
    padding: 0 8px 12px;
}
.featured-name::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, transparent 0%, var(--ix-blue) 50%, transparent 100%);
    box-shadow: none;
}

.featured-desc {
    color: var(--ix-ink-2);
    font-size: 0.98rem;
    line-height: 1.85;
    margin: 0 auto 22px;
    max-width: 520px;
    letter-spacing: 0.3px;
}

/* กล่องแท่งสเตตัส — การ์ดขาวแบบ .card ของ infinityx */
.featured-stats-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
    padding: 18px 22px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 14px;
    position: relative;
    box-shadow: var(--ix-shadow-card);
}

/* ขีดมุมตัว L — infinityx ไม่มี */
.featured-stats-bars::before {
    display: none;
}

.stat-bar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

/* scope ไว้ใต้ .character-section เพื่อไม่ให้รั่วไปชนคลาสชื่อเดียวกันที่อื่น
   (เดิมประกาศเป็น .stat-label / .stat-value ลอย ๆ แล้วไปโผล่ในการ์ด bringer) */
.character-section .stat-label {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ix-ink);
    width: 38px;
    text-align: right;
    letter-spacing: 1.5px;
}

.stat-bar-track {
    flex: 1;
    height: 10px;
    background: var(--ix-sky);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--ix-line);
    position: relative;
}
/* ขีดบอกระดับบนราง */
.stat-bar-track::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg,
        transparent 0%, transparent calc(10% - 1px),
        rgba(15, 30, 61, 0.07) calc(10% - 1px), rgba(15, 30, 61, 0.07) 10%,
        transparent 10%);
    background-size: 10% 100%;
    pointer-events: none;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.stat-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, transparent 55%);
}

/* สีสเตตัส คงความหมายเดิม — แดง/ม่วง/เขียว แต่ไม่ใช้แดงแบรนด์และไม่มี glow */
.stat-bar-fill.str-fill {
    background: linear-gradient(90deg, #DC2626 0%, #EF4444 60%, #F87171 100%);
    box-shadow: none;
}

.stat-bar-fill.int-fill {
    background: linear-gradient(90deg, #6D28D9 0%, #7C3AED 60%, #A78BFA 100%);
    box-shadow: none;
}

.stat-bar-fill.dex-fill {
    background: linear-gradient(90deg, #047857 0%, #059669 60%, #34D399 100%);
    box-shadow: none;
}

.character-section .stat-value {
    font-family: 'Cinzel', 'Consolas', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ix-blue-deep);
    width: 46px;
    text-align: left;
    text-shadow: none;
}

/* แถวเลือกอาชีพ — การ์ดขาว */
.character-selection {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    padding: 24px 0 14px;
    position: relative;
    z-index: 5;
    margin-top: 30px;
}

.char-select-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
                border-color 0.3s ease,
                background 0.3s ease,
                box-shadow 0.35s ease;
    padding: 10px 5px 8px;
    border-radius: 12px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    box-shadow: var(--ix-shadow-card);
    width: 100px;
    height: 100px;
    overflow: hidden;
    isolation: isolate;
}

/* ขีดมุมตัว L — infinityx ไม่มี */
.char-select-item::before {
    display: none;
}

.char-select-item:hover {
    transform: translateY(-6px);
    border-color: rgba(29, 78, 216, .45);
    background: var(--ix-tint);
    box-shadow: 0 16px 32px -16px rgba(15, 30, 61, .35);
}

.char-select-item.active {
    border-color: var(--ix-blue);
    background: var(--ix-tint);
    box-shadow: 0 10px 26px -12px rgba(29, 78, 216, .5);
}

.char-select-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--ix-blue);
    box-shadow: none;
    z-index: 3;
}

.char-select-item.active .char-portrait img {
    filter: none;
}

.char-portrait {
    width: 58px;
    height: 58px;
    overflow: hidden;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.char-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.3s ease, transform 0.35s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.char-select-item:hover .char-portrait img {
    opacity: 1;
    transform: scale(1.08);
}
.char-select-item.active .char-portrait img {
    opacity: 1;
    transform: scale(1.04);
}

.char-label {
    font-family: 'Cinzel', serif;
    font-size: 0.56rem;
    color: var(--ix-ink-2);
    text-align: center;
    letter-spacing: 1px;
    font-weight: 700;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    transition: color 0.3s ease;
}
.char-select-item:hover .char-label {
    color: var(--ix-blue);
}
.char-select-item.active .char-label {
    color: var(--ix-blue);
    text-shadow: none;
}

/* Responsive (layout เท่านั้น) */
@media (max-width: 1200px) {
    .character-featured {
        width: 450px;
        bottom: -180px;
    }

    .character-header,
    .character-info {
        margin-left: 30%;
    }
    .character-bar { flex: 0 0 70px; }
}

@media (max-width: 1024px) {
    .character-section {
        min-height: 650px;
        padding: 90px 32px 50px;
    }

    .character-header {
        margin-left: 0;
        padding-right: 0;
    }
    .character-title { font-size: 30px; letter-spacing: 6px; }
    .character-bar { flex: 0 0 90px; }

    .character-subtitle {
        text-align: center;
        max-width: 100%;
    }

    .character-featured {
        width: 400px;
        left: 50%;
        transform: translateX(-50%);
        bottom: -150px;
    }

    .character-info {
        text-align: center;
        margin-left: 0;
        padding-right: 0;
    }

    .featured-desc {
        margin: 0 auto 22px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .character-section {
        padding: 70px 16px 120px;
        min-height: 550px;
    }

    .character-header { margin-bottom: 24px; }
    .character-title { font-size: 22px; letter-spacing: 4px; }
    .character-title-icon { width: 26px; height: 26px; }
    .character-bar { flex: 0 0 40px; }
    .character-subtitle {
        font-size: 12.5px;
        padding: 0 8px;
    }

    .character-showcase {
        min-height: 300px;
    }

    .character-featured {
        width: 320px;
        bottom: -120px;
    }

    .featured-name {
        font-size: 1.6rem;
        letter-spacing: 4px;
    }

    .featured-desc {
        font-size: 0.85rem;
    }

    .featured-stats-bars {
        padding: 14px 16px;
        max-width: 100%;
    }

    .character-selection {
        gap: 6px;
        padding: 14px 12px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .character-selection::-webkit-scrollbar {
        display: none;
    }

    .char-select-item {
        width: 76px;
        height: 82px;
        padding: 6px 4px;
        flex-shrink: 0;
    }

    .char-portrait {
        width: 44px;
        height: 44px;
    }

    .char-label {
        font-size: 0.48rem;
        letter-spacing: 0.5px;
    }
}
/* ==================== BEGINNER GUIDE — INFINITY X ====================
   อ้างอิง: C:\infinityx\index.html — .features-card / .f-icon / .card / .boards
   การ์ดขาวขอบ line มุมมน 14px เงานุ่ม, ไอคอนกรอบเพชรน้ำเงิน, ตัวหนังสือ ink/ink-2
   ชื่อคลาสเดิมทั้งหมด ไม่แตะ markup และ JS                                      */
.guide-section {
    position: relative;
    padding: 110px 40px 100px;
    /* SEAM-FIX: โซนสีเรียบ #F2F7FD บน section (0-20%) คร่อมรอยต่อกับก้นของ .character-section
       + margin-top -1px เหลื่อมทับ 1px กันช่องว่าง subpixel ระหว่าง section เด็ดขาด */
    background: linear-gradient(180deg, #F2F7FD 0%, #F2F7FD 20%, #FFFFFF 55%, #F2F7FD 100%);
    margin-top: -1px;
    overflow: hidden;
}

.guide-bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    /* SEAM-FIX: เอา radial glow ออก — ก้อนบน (20% 30%) เข้มตรงหัว section ทำให้รอยต่อกับ
       .character-section (ที่ไม่มี glow) เป็นขั้น/เส้น ให้เหมือน .character-bg-glow ที่ไม่มี background */
}

.guide-bg-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(29, 78, 216, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 78, 216, .04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    opacity: 0.75;
}

.guide-container {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
}

/* --- Header --- */
.guide-header {
    text-align: center;
    margin-bottom: 56px;
}

.guide-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.guide-title-icon {
    width: 34px;
    height: 34px;
    color: var(--ix-blue);
    filter: none;
    flex-shrink: 0;
}

.guide-title {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--ix-ink);
    margin: 0;
    text-shadow: none;
    background: none;
    -webkit-text-fill-color: currentColor;
}

/* เส้นคั่นสองข้างหัวข้อ — โทนเดียวกับ .hero-rule ของ infinityx */
.guide-bar {
    position: relative;
    flex: 0 0 120px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #B7CCEC 50%, transparent 100%);
}

.guide-bar.right {
    background: linear-gradient(to left, transparent 0%, #B7CCEC 50%, transparent 100%);
}

.guide-bar::before,
.guide-bar::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #2563EB;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: none;
}

.guide-bar.left::before  { right: 0; }
.guide-bar.left::after   { left: 0; opacity: 0.4; width: 3px; height: 3px; }
.guide-bar.right::before { left: 0; }
.guide-bar.right::after  { right: 0; opacity: 0.4; width: 3px; height: 3px; }

.guide-subtitle {
    font-size: 14px;
    color: var(--ix-ink-2);
    line-height: 1.8;
    max-width: 720px;
    margin: 0 auto;
    letter-spacing: 1px;
}

/* --- Tabs --- */
.guide-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    position: relative;
    padding: 6px;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 12px;
    box-shadow: var(--ix-shadow-card);
}

.guide-tab {
    position: relative;
    background: transparent;
    border: none;
    color: var(--ix-ink-2);
    padding: 12px 30px;
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.25s ease, background 0.25s ease;
    border-radius: 8px;
}

.guide-tab:hover {
    color: var(--ix-blue);
    background: var(--ix-tint);
}

.guide-tab.active {
    color: #fff;
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    box-shadow: 0 6px 18px -6px rgba(29, 78, 216, .5);
    text-shadow: none;
}

.guide-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--ix-blue);
    filter: none;
}

/* --- Panels --- */
.guide-content {
    position: relative;
}

.guide-panel {
    display: none;
    animation: guideFadeIn 0.45s ease;
}

.guide-panel.active {
    display: block;
}

@keyframes guideFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Grid (Getting Started steps) --- */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* --- Step Cards --- */
.guide-card {
    position: relative;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 14px;
    padding: 32px 26px 28px;
    box-shadow: var(--ix-shadow-card);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
                border-color 0.3s ease,
                box-shadow 0.35s ease;
    overflow: hidden;
    isolation: isolate;
}

/* ขีดมุมตัว L และแถบวิบวับแนวทแยงของธีมเดิม — infinityx ไม่มี */
.guide-card::before,
.guide-card::after {
    display: none;
}

.guide-card:hover {
    transform: translateY(-6px);
    border-color: rgba(29, 78, 216, .38);
    box-shadow: 0 20px 40px -18px rgba(15, 30, 61, .28);
}

.guide-card > * {
    position: relative;
    z-index: 1;
}

/* ไอคอนกรอบเพชร — ลอกจาก .f-icon ของ infinityx */
.guide-card-icon {
    position: relative;
    width: 52px;
    height: 52px;
    margin: 10px 10px 32px;
    display: grid;
    place-items: center;
    background: var(--ix-white);
    border: 1.7px solid #2563EB;
    border-radius: 13px;
    transform: rotate(45deg);
    box-shadow: none;
}

/* วงประหมุนรอบไอคอนของธีมเดิม — infinityx ไม่มี */
.guide-card-icon::before {
    display: none;
}

.step-number {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ix-blue);
    text-shadow: none;
    line-height: 1;
    transform: rotate(-45deg);
}

.guide-card h3 {
    font-family: 'Prompt', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ix-ink);
    margin: 0 0 8px;
    letter-spacing: 0.03em;
    position: relative;
    padding-bottom: 10px;
}

.guide-card h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 2px;
    background: linear-gradient(to right, var(--ix-blue), transparent);
    transition: width 0.35s ease;
}

.guide-card:hover h3::after {
    width: 72px;
}

.guide-card p {
    color: var(--ix-ink-2);
    font-size: 0.88rem;
    line-height: 1.75;
    margin: 0;
}

.guide-card p a {
    color: var(--ix-blue);
    text-decoration: none;
    border-bottom: 1px dotted rgba(29, 78, 216, .45);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.guide-card p a:hover {
    color: var(--ix-blue-deep);
    border-bottom-color: var(--ix-blue-deep);
}

/* --- Tip Cards (ถ้ามีการใช้) --- */
.tip-card {
    position: relative;
    padding-left: 80px;
}

.tip-number {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ix-blue);
    background: var(--ix-white);
    border: 1.7px solid #2563EB;
    border-radius: 11px;
    box-shadow: none;
}

/* --- Accordion --- */
/* หมายเหตุแหล่งที่มาของตัวเลขท้ายแท็บ "ระบบในเกม" */
.guide-source-note {
    margin: 18px 0 0;
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--ix-ink-2);
    text-align: center;
}

.guide-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.accordion-item {
    position: relative;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--ix-shadow-card);
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* แถบน้ำเงินด้านซ้ายตอนเปิด */
.accordion-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ix-blue);
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.accordion-item.open {
    border-color: rgba(29, 78, 216, .38);
    background: var(--ix-white);
    box-shadow: 0 14px 34px -18px rgba(15, 30, 61, .3);
}

.accordion-item.open::before {
    opacity: 1;
    transform: scaleY(1);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 26px 18px 32px;
    background: transparent;
    border: none;
    color: var(--ix-ink);
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    text-align: left;
    letter-spacing: 0.02em;
}

.accordion-header:hover {
    background: var(--ix-tint);
    color: var(--ix-blue);
}

.accordion-item.open .accordion-header {
    color: var(--ix-blue);
    background: var(--ix-tint);
}

.accordion-header span:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ข้าวหลามตัดน้ำเงินหน้าหัวข้อ */
.accordion-header span:first-child::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #2563EB;
    transform: rotate(45deg);
    box-shadow: none;
    flex-shrink: 0;
}

.accordion-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 300;
    font-family: 'Prompt', sans-serif;
    color: var(--ix-blue);
    line-height: 1;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.3s ease;
    flex-shrink: 0;
}

.accordion-item.open .accordion-icon {
    transform: rotate(45deg);
    color: var(--ix-blue);
    text-shadow: none;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.35s ease;
    padding: 0 32px;
}

.accordion-item.open .accordion-content {
    max-height: 2000px;
    padding: 4px 32px 20px;
    overflow-y: auto;
}

.accordion-content p {
    color: var(--ix-ink-2);
    font-size: 0.9rem;
    line-height: 1.85;
    margin: 0 0 10px;
}

.accordion-content p strong {
    color: var(--ix-blue-deep);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.accordion-content ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 14px;
    display: grid;
    gap: 6px;
}

.accordion-content li {
    color: var(--ix-ink-2);
    font-size: 0.87rem;
    line-height: 1.75;
    padding-left: 22px;
    position: relative;
}

.accordion-content li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.75em;
    width: 8px;
    height: 1px;
    background: var(--ix-blue);
    box-shadow: none;
}

.accordion-content li strong {
    color: var(--ix-blue-deep);
    font-weight: 600;
}

/* --- แท็บ "แก้ปัญหา" — ขั้นตอนแบบมีลำดับเลข + พาธไฟล์ --- */
.guide-panel-intro {
    max-width: 1000px;
    margin: 0 auto 18px;
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--ix-ink-2);
    text-align: center;
}


.accordion-content ol {
    list-style: none;
    counter-reset: tr-step;
    padding: 0;
    margin: 8px 0 14px;
    display: grid;
    gap: 10px;
}

.accordion-content ol li {
    counter-increment: tr-step;
    padding-left: 34px;
}

/* ทับขีดสั้น ๆ ของ li ปกติ แล้วใส่ตัวเลขในวงกลมแทน */
.accordion-content ol li::before {
    content: counter(tr-step);
    left: 0;
    top: 0.15em;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ix-tint);
    border: 1px solid #B7CCEC;
    color: var(--ix-blue-deep);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

/* พาธโฟลเดอร์/ชื่อไฟล์ */
.accordion-content code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.82em;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--ix-sky);
    border: 1px solid var(--ix-line);
    color: var(--ix-ink);
    white-space: nowrap;
}

/* บรรทัดหมายเหตุท้ายวิธีแก้ */
.accordion-content .tr-note {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-left: 3px solid var(--ix-blue-soft);
    border-radius: 0 8px 8px 0;
    background: var(--ix-tint);
    font-size: 0.84rem;
    line-height: 1.8;
}

/* --- Responsive (เฉพาะ layout ไม่มีสี) --- */
@media (max-width: 1024px) {
    .guide-section { padding: 90px 32px 80px; }
    .guide-title { font-size: 30px; letter-spacing: 6px; }
    .guide-bar { flex: 0 0 90px; }
}

@media (max-width: 768px) {
    .guide-section { padding: 70px 16px 60px; }
    .guide-header { margin-bottom: 36px; }
    .guide-title { font-size: 22px; letter-spacing: 4px; }
    .guide-title-icon { width: 26px; height: 26px; }
    .guide-bar { flex: 0 0 40px; }
    .guide-subtitle { font-size: 12.5px; letter-spacing: 0.5px; padding: 0 8px; }

    .guide-tabs {
        gap: 2px;
        padding: 4px;
        max-width: calc(100% - 8px);
    }
    .guide-tab {
        padding: 10px 14px;
        font-size: 12px;
        letter-spacing: 0.04em;
        flex: 1 1 auto;
    }

    .guide-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    .guide-card { padding: 22px 18px; }
    .guide-card-icon { width: 44px; height: 44px; margin: 8px 8px 26px; border-radius: 11px; }
    .step-number { font-size: 1.15rem; }
    .guide-card h3 { font-size: 0.98rem; }
    .guide-card p { font-size: 0.84rem; }

    .tip-card { padding-left: 70px; }
    .tip-number { font-size: 0.9rem; left: 16px; width: 40px; height: 40px; }

    .accordion-header {
        padding: 15px 18px 15px 22px;
        font-size: 0.92rem;
    }
    .accordion-content {
        padding: 0 22px;
    }
    .accordion-item.open .accordion-content {
        padding: 4px 22px 16px;
    }
}

@media (max-width: 480px) {
    .guide-grid { grid-template-columns: 1fr; }
}
/* ==================== FOOTER — INFINITY X ====================
   ลอกโครงมาจาก C:\infinityx\index.html — .footer / .footer-grid / .socials
   / .f-links / .newsletter / .nl-form / .copyright
   footer ของ infinityx เป็นโทน "กรมท่า" (--ix-navy #0A1430) ไม่ใช่ขาว
   ชุดสีตัวหนังสือ: #C9D6EF (หลัก) · #AFC0E2 (รอง) · #8CA0C4 (จาง)
   markup อยู่ที่ includes/site_footer.php ใช้ร่วมกันทุกหน้า                    */
.footer {
    position: relative;
    background:
        radial-gradient(700px 300px at 8% 110%, rgba(59, 130, 246, .16), transparent 60%),
        radial-gradient(600px 260px at 96% -10%, rgba(59, 130, 246, .10), transparent 60%),
        var(--ix-navy);
    color: #C9D6EF;
    padding: 60px 0 0;
    overflow: hidden;
}

/* เส้นเรืองแสงแดงด้านบนของธีมเดิม — infinityx ไม่มี */
.footer::before {
    display: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr .8fr .8fr .8fr 1.1fr;
    gap: 36px;
}

/* --- คอลัมน์แบรนด์ --- */
.f-logo {
    display: flex;
    align-items: center;
    gap: 11px;
}

.f-logo img {
    display: block;
    height: 64px;
    width: auto;
}

.f-about p {
    margin-top: 16px;
    font-size: .85rem;
    font-weight: 300;
    line-height: 1.85;
    color: #AFC0E2;
}

.socials {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.socials a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(150, 180, 235, .35);
    border-radius: 50%;
    transition: background .18s ease-out, transform .18s ease-out, opacity .18s ease-out;
}

.socials a:hover {
    background: rgba(59, 130, 246, .25);
    transform: translateY(-2px);
}

.socials svg {
    display: block;
    fill: #C9D6EF;
}

/* ช่องทางที่ยังไม่มี URL จริง — โชว์ไว้แต่กดไม่ได้ */
.socials a.soon {
    opacity: .4;
    cursor: default;
}
.socials a.soon:hover {
    background: none;
    transform: none;
}

/* --- คอลัมน์ลิงก์ --- */
.footer h3 {
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .14em;
    margin-bottom: 18px;
}

.f-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.f-links li + li {
    margin-top: 11px;
}
.f-links a {
    color: #AFC0E2;
    text-decoration: none;
    font-size: .87rem;
    font-weight: 300;
    transition: color .15s ease-out;
}
.f-links a:hover {
    color: #fff;
}

/* --- Newsletter --- */
.newsletter p {
    font-size: .85rem;
    font-weight: 300;
    line-height: 1.8;
    color: #AFC0E2;
    margin-bottom: 16px;
}

.nl-form {
    display: flex;
}
.nl-form input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(150, 180, 235, .35);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-family: 'Prompt', sans-serif;
    font-size: .85rem;
}
.nl-form input::placeholder {
    color: #8CA0C4;
}
.nl-form input:focus {
    outline: 2px solid var(--ix-blue-soft);
    outline-offset: -1px;
}
.nl-form button {
    flex: none;
    padding: 0 16px;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(180deg, var(--ix-blue-soft), var(--ix-blue));
    cursor: pointer;
    display: grid;
    place-items: center;
}
.nl-form button:hover {
    filter: brightness(1.12);
}
.nl-form svg {
    display: block;
}

.nl-msg {
    margin-top: 10px;
    font-size: .8rem;
    font-weight: 500;
    min-height: 1.2em;
}
.nl-msg.ok  { color: #7BE3A2; }
.nl-msg.err { color: #FF9AA6; }

/* --- ปุ่มติดตามข่าวสาร (แทนฟอร์ม newsletter ที่ยังไม่มีระบบรับอีเมล — 5 ก.ย. 2569)
       อยู่ไฟล์นี้เพราะ includes/site_footer.php ใช้ร่วมกับ news.php / news_detail.php ที่ไม่โหลด polish.css --- */
.socials a.soon { display: none; }           /* ช่องทางที่ยังไม่มี URL — ไม่โชว์ปุ่มตาย */
.f-follow { display: grid; gap: 8px; }
.f-follow a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid rgba(150, 180, 235, .35);
    border-radius: 8px;
    color: #fff;
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .18s ease-out, transform .18s ease-out;
}
.f-follow a:hover { background: rgba(59, 130, 246, .22); transform: translateY(-1px); }
.f-follow svg { flex: none; fill: #C9D6EF; }
/* ลิงก์ในคอลัมน์: พื้นที่แตะสูงขึ้น (เดิม 22px) โดยระยะห่างรวมเท่าเดิม */
.f-links li + li { margin-top: 3px; }
.f-links a { display: inline-block; padding: 6px 0; min-height: 34px; }
@media (max-width: 560px) {
    /* SUPPORT อยู่คอลัมน์แคบคนเดียว (คู่ของมันคือ newsletter ที่ขยายเต็มแถวไปแล้ว)
       → ให้เต็มแถวเช่นกัน และห้ามตัดกลางคำ "ส่วน|ตัว" */
    .footer-grid > div:nth-child(4) { grid-column: 1 / -1; }
    .f-links a { white-space: nowrap; }
}

/* --- เครดิตลิขสิทธิ์ + copyright --- */
.footer .footer-disclaimer {
    margin-top: 48px;
    font-size: .78rem;
    font-weight: 300;
    line-height: 1.9;
    color: #8CA0C4;
    text-align: center;
    letter-spacing: .02em;
}
.footer .footer-disclaimer strong {
    color: #C9D6EF;
    font-weight: 600;
}

.copyright {
    margin-top: 20px;
    border-top: 1px solid rgba(150, 180, 235, .18);
    padding: 20px 0;
    text-align: center;
    font-size: .78rem;
    font-weight: 300;
    color: #8CA0C4;
}

/* --- Responsive (ตาม infinityx) --- */
@media (max-width: 1120px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .f-about     { grid-column: 1 / -1; }
    .newsletter  { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* ==================== RESPONSIVE ==================== */

/* Switch to mobile menu earlier */
@media (max-width: 1100px) {
    .hero-content {
        margin-top: 30px;
    }

    .title-line {
        letter-spacing: 3px;
    }
}

@media (max-width: 768px) {

    .hero-buttons {
        display: none;
    }

    .btn-hexagon {
        min-width: 250px;
        padding: 16px 40px;
    }

    .hero-subtitle {
        gap: 12px;
    }
    .hero-sub-text {
        font-size: 12px;
        letter-spacing: 2.5px;
    }
    .hero-sub-bar {
        flex: 0 0 50px;
    }

    .hero-tagline {
        font-size: 16px;
    }

    .ranking-section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 28px;
        flex-direction: column;
        gap: 10px;
    }

    .ranking-controls {
        flex-wrap: wrap;
        gap: 15px;
    }

    .nation-filter {
        width: 100%;
        justify-content: center;
    }

    .nation-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .ranking-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .rank-tab {
        padding: 10px 20px;
        font-size: 13px;
    }

    .war-class-filter {
        width: 100%;
        justify-content: center;
        gap: 4px;
        margin-top: 0;
    }

    .class-filter-btn {
        padding: 5px 8px;
        font-size: 10px;
        min-width: 30px;
    }

    .ranking-table-wrapper {
        overflow-x: auto;
    }

    .ranking-table {
        min-width: 600px;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 12px 15px;
        font-size: 13px;
    }

    .footer {
        padding: 40px 20px 20px;
    }

    .footer-links {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-logo-img {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 40px;
    }

    .hero-logo-img {
        height: 100px;
    }

    .trophy-container {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .title-line {
        letter-spacing: 2px;
    }

    .hero-tagline {
        padding: 10px 20px;
        font-size: 13px;
        gap: 10px;
    }

    .hero-tagline::before {
        width: 8px;
        height: 8px;
    }

    .btn-hexagon {
        min-width: 220px;
        padding: 14px 30px;
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
    }

    .title-icon {
        width: 30px;
        height: 30px;
    }

    .nation-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .nation-icon {
        font-size: 14px;
    }

    .ranking-table {
        min-width: 500px;
    }

    .rank-tab {
        padding: 8px 15px;
        font-size: 12px;
    }

    .footer-links {
        gap: 15px;
    }
}

/* ==================== RANKING AVATARS ==================== */
.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* รูป avatar ในตาราง TOP PLAYERS — วงกลมเหมือนไฟล์ที่ผู้เล่นอัปโหลด */
.ranking-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--ix-line);
    flex-shrink: 0;
    background: var(--ix-sky);
    transition: all 0.3s ease;
}

.ranking-avatar:hover {
    border-color: var(--ix-blue);
    box-shadow: 0 4px 12px -4px rgba(29, 78, 216, .5);
    transform: scale(1.1);
}

.player-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- แถวกิลด์ในตาราง TOP PLAYERS (แท็บ GUILDS) ---
   ตราของกิลด์ที่ผู้เล่นอัปโหลดเป็นไฟล์ 32x32 แต่ `img/guild/default.png` เป็น 64x64
   เดิมคลาสนี้ไม่มี CSS เลย ภาพจึงแสดงตามขนาดจริงของไฟล์ → แถวที่ยังไม่มีตราจะโตเป็นสองเท่า
   ล็อกไว้ 32px เท่ากับ .ranking-avatar ให้ทุกแถวสูงเท่ากัน */
.guild-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.guild-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    /* ตราสัญลักษณ์ ห้ามครอป — ใช้ contain ไม่ใช่ cover เหมือนรูป avatar ผู้เล่น */
    object-fit: contain;
    display: block;
}

.guild-name-text {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive avatar size */
@media (max-width: 768px) {
    .ranking-avatar,
    .guild-logo {
        width: 28px;
        height: 28px;
    }

    .player-info,
    .guild-name-cell {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .ranking-avatar,
    .guild-logo {
        width: 24px;
        height: 24px;
    }

    .player-info,
    .guild-name-cell {
        gap: 6px;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content>* {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-logo {
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-subtitle {
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title {
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-tagline {
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-buttons {
    animation-delay: 0.8s;
    opacity: 0;
}

/* ==================== CUSTOM SCROLLBAR — INFINITY X ====================
   ของเดิมเป็นราง #1a1517 ดำ + หัวเลื่อนไล่สีแดง ซึ่งค้างมาจากธีม Cabal Ethereal
   ใช้กับทั้ง scrollbar ของหน้า และของกล่องที่เลื่อนได้ เช่น .ranking-table-wrapper
   (infinityx ต้นฉบับไม่ได้แต่ง scrollbar เลย ที่นี่แต่งให้เข้าธีมแต่คุมโทนไว้ให้จาง) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--ix-sky);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ix-blue-soft), var(--ix-blue));
    border-radius: 99px;
    /* ขอบสีเดียวกับรางทำให้หัวเลื่อนดูผอมลงและมีช่องไฟรอบตัว */
    border: 2px solid var(--ix-sky);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--ix-blue), var(--ix-blue-deep));
}

/* มุมล่างขวาตอนมี scrollbar ทั้งแนวตั้งและแนวนอนพร้อมกัน */
::-webkit-scrollbar-corner {
    background: var(--ix-sky);
}

/* Firefox (และ Chromium รุ่นใหม่ที่รองรับ standard properties) */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--ix-blue-soft) var(--ix-sky);
}

/* ==================== STRONGEST PLAYERS (BRINGER) — INFINITY X ====================
   อ้างอิง: C:\infinityx\index.html — .card / .boards / .f-icon / .chip
   สีประจำชาติคงไว้: Storm Bringer (Procyon) = แดง · Luminous Bringer (Capella) = น้ำเงิน
   แต่เปลี่ยนแดงแบรนด์ #ec1b1b เป็นแดงกลาง #DC2626 เพื่อไม่ให้สับสนกับสีแบรนด์เดิม     */
.bringer-section {
    position: relative;
    padding: 110px 40px 100px;
    background: linear-gradient(180deg, #F2F7FD 0%, #FFFFFF 40%, #F2F7FD 100%);
    overflow: hidden;
}

.bringer-bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.bringer-bg-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(29, 78, 216, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 78, 216, .04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    opacity: 0.75;
}

.bringer-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- กล่องกติกา — การ์ดขาวแบบ .card ของ infinityx --- */
.bringer-rules {
    max-width: 860px;
    margin: 0 auto 44px;
}

.rules-box {
    position: relative;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 14px;
    padding: 26px 32px;
    display: flex;
    gap: 22px;
    align-items: flex-start;
    box-shadow: var(--ix-shadow-card);
}

/* ขีดมุมตัว L — infinityx ไม่มี */
.rules-box::before {
    display: none;
}

/* ไอคอนกรอบเพชร — ชุดเดียวกับ .f-icon ของ infinityx */
.rules-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin: 6px;
    background: var(--ix-white);
    border: 1.7px solid #2563EB;
    border-radius: 13px;
    transform: rotate(45deg);
    display: grid;
    place-items: center;
    box-shadow: none;
    position: relative;
}

.rules-icon svg {
    width: 26px;
    height: 26px;
    color: var(--ix-blue);
    filter: none;
    transform: rotate(-45deg);
}

.rules-content {
    flex: 1;
}

.rules-content h3 {
    font-family: 'Cinzel', 'Prompt', sans-serif;
    font-size: 1.05em;
    font-weight: 700;
    color: var(--ix-ink);
    margin: 0 0 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 10px;
}
.rules-content h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48px;
    height: 2px;
    background: linear-gradient(to right, var(--ix-blue), transparent);
}

.rules-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 4px;
}

.rules-content li {
    color: var(--ix-ink-2);
    font-size: 0.92em;
    padding: 4px 0 4px 24px;
    position: relative;
    line-height: 1.7;
}

.rules-content li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.8em;
    width: 10px;
    height: 1px;
    background: var(--ix-blue);
    box-shadow: none;
}

.rules-content li strong {
    color: var(--ix-blue-deep);
    font-weight: 700;
}

/* --- แท็บ (ชุดเดียวกับ .rank-tab) --- */
.bringer-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 0 auto 44px;
    max-width: fit-content;
    padding: 6px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 12px;
    box-shadow: var(--ix-shadow-card);
    flex-wrap: wrap;
}

.bringer-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--ix-ink-2);
    font-family: 'Prompt', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
}

.bringer-tab:hover {
    color: var(--ix-blue);
    background: var(--ix-tint);
}

/* Storm Bringer (Procyon = แดง — สีประจำชาติ) */
.bringer-tab[data-nation="procyon"].active {
    color: #fff;
    background: linear-gradient(180deg, #EF4444 0%, #B91C1C 100%);
    box-shadow: 0 6px 18px -6px rgba(185, 28, 28, .55);
    text-shadow: none;
}
.bringer-tab[data-nation="procyon"].active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #DC2626;
    filter: none;
}

/* Luminous Bringer (Capella = น้ำเงิน — สีประจำชาติ) */
.bringer-tab[data-nation="capella"].active {
    color: #fff;
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    box-shadow: 0 6px 18px -6px rgba(29, 78, 216, .5);
    text-shadow: none;
}
.bringer-tab[data-nation="capella"].active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--ix-blue);
    filter: none;
}

.nation-icon {
    width: 18px;
    height: 18px;
    border-radius: 2px;
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ตราสัญลักษณ์ชาติที่เป็นรูปภาพจริงต้องไม่หมุน — หมุนเฉพาะจุดข้าวหลามตัด CSS */
img.nation-icon {
    transform: none;
    border-radius: 0;
}

.nation-icon.storm {
    background: linear-gradient(135deg, #F87171, #DC2626);
    box-shadow: none;
}

.nation-icon.luminous {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: none;
}

.nation-label {
    font-size: 0.75em;
    font-weight: 500;
    color: var(--ix-ink-2);
    letter-spacing: 0.5px;
}
.bringer-tab.active .nation-label {
    color: rgba(255, 255, 255, 0.85);
}

/* Bringer Content */
.bringer-content {
    position: relative;
}

.bringer-panel {
    display: none;
}

.bringer-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Carousel */
.bringer-carousel {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.carousel-btn {
    flex-shrink: 0;
    width: 44px;
    height: 64px;
    border-radius: 10px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    color: var(--ix-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: var(--ix-shadow-card);
}

.carousel-btn:hover {
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    color: #fff;
    border-color: var(--ix-blue);
    box-shadow: 0 10px 24px -10px rgba(29, 78, 216, .6);
    transform: translateY(-1px);
}

.carousel-btn svg {
    width: 22px;
    height: 22px;
    filter: none;
}
.carousel-btn:hover svg { filter: none; }

/* Slider */
.bringer-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.bringer-slider::-webkit-scrollbar {
    display: none;
}

/* การ์ดผู้เล่น — การ์ดขาวแบบ .card ของ infinityx */
.bringer-card {
    position: relative;
    background: var(--ix-white);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--ix-line);
    box-shadow: var(--ix-shadow-card);
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
                border-color 0.3s ease,
                box-shadow 0.4s ease;
    flex-shrink: 0;
    width: 280px;
    scroll-snap-align: center;
    isolation: isolate;
}

/* ขีดมุมตัว L และแถบวิบวับ — infinityx ไม่มี */
.bringer-card::before,
.bringer-card::after {
    display: none;
}

.bringer-card.has-data {
    border-color: var(--ix-line);
}

.bringer-card.has-data:hover {
    transform: translateY(-8px);
    border-color: rgba(29, 78, 216, .45);
    box-shadow: 0 24px 48px -20px rgba(15, 30, 61, .35);
}

.bringer-card.empty {
    opacity: 0.55;
    border-color: var(--ix-line);
    box-shadow: none;
}

.bringer-card.empty:hover {
    transform: translateY(-4px);
    opacity: 0.75;
}

/* หัวการ์ด (แถบคลาส) */
.bringer-card .card-header {
    padding: 14px 18px;
    background: var(--ix-sky);
    border-bottom: 1px solid var(--ix-line);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.bringer-card .card-header::after {
    display: none;
}

.bringer-card .class-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--ix-line);
    background: var(--ix-white);
    padding: 2px;
}

.bringer-card .class-name {
    font-family: 'Cinzel', serif;
    font-size: 0.95em;
    font-weight: 700;
    color: var(--ix-blue-deep);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: none;
}

/* ตัวการ์ด */
.bringer-card .card-body {
    padding: 22px 20px 20px;
    position: relative;
    z-index: 1;
}

/* กรอบรูป — รูป avatar ที่ผู้เล่นอัปโหลดถูกครอปเป็นวงกลม (มุมโปร่งใส)
   กรอบจึงต้องเป็นวงกลมด้วย ไม่งั้นจะเห็นพื้นรองโผล่ที่มุมทั้งสี่ */
.bringer-card .char-avatar {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 1px solid var(--ix-line);
    background: var(--ix-sky);
    padding: 3px;
    margin: 0 auto 16px;
    display: block;
    object-fit: cover;
    box-shadow: 0 4px 14px -6px rgba(15, 30, 61, .35);
    transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}
.bringer-card.has-data:hover .char-avatar {
    border-color: rgba(29, 78, 216, .45);
    box-shadow: 0 10px 22px -8px rgba(29, 78, 216, .45);
    transform: scale(1.04);
}

.bringer-card .char-name {
    font-family: 'Prompt', sans-serif;
    font-size: 1.15em;
    font-weight: 700;
    color: var(--ix-ink);
    text-align: center;
    margin: 0 0 18px;
    letter-spacing: 0.6px;
    text-shadow: none;
    position: relative;
    padding-bottom: 10px;
}
.bringer-card .char-name::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--ix-blue) 50%, transparent 100%);
}

.bringer-card .char-name.empty-name {
    color: var(--ix-ink-2);
    opacity: 0.7;
}
.bringer-card .char-name.empty-name::after { opacity: 0.3; }

/* สถิติในการ์ด */
.bringer-card .card-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bringer-card .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: var(--ix-sky);
    border-radius: 8px;
    border-left: 2px solid var(--ix-line);
    transition: border-color 0.25s ease, background 0.25s ease;
}
.bringer-card:hover .stat-item {
    border-left-color: rgba(29, 78, 216, .35);
}

.bringer-card .stat-item.highlight {
    background: var(--ix-tint);
    border-left: 2px solid var(--ix-blue);
    box-shadow: none;
}

/* ⚠️ .stat-label / .stat-value ถูกประกาศแบบ global (ไม่ scope) ไว้ในบล็อก
   character-section ด้วย — ค่าพวกนั้นรั่วเข้ามาในการ์ด bringer
   ต้องประกาศ width / text-align / font-family / text-shadow ทับให้ครบ
   ไม่งั้นจะได้ label ฟอนต์ Cinzel กว้าง 38px (ทำให้ "WAR POINT" ตัดสองบรรทัด)
   และ value เรืองแสงสีแดงกว้าง 46px */
.bringer-card .stat-label {
    color: var(--ix-ink-2);
    font-family: 'Prompt', sans-serif;
    font-size: 0.8em;
    font-weight: 500;
    flex-shrink: 0;
    width: auto;
    text-align: left;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: none;
}

.bringer-card .stat-value {
    color: var(--ix-ink);
    font-size: 0.92em;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    flex: 1;
    width: auto;
    font-family: 'Prompt', sans-serif;
    text-shadow: none;
}

.bringer-card .stat-item.highlight .stat-value {
    color: var(--ix-blue);
    font-size: 1.02em;
    font-weight: 800;
    font-family: 'Cinzel', 'Prompt', sans-serif;
    letter-spacing: 0.5px;
    text-shadow: none;
}

/* ป้ายมุมขวาบนของการ์ด */
.bringer-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    color: #fff;
    padding: 5px 12px 5px 14px;
    border-radius: 0 0 0 8px;
    font-size: 0.7em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 12px -4px rgba(29, 78, 216, .6);
    font-family: 'Cinzel', 'Prompt', sans-serif;
    z-index: 4;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 10% 100%);
}

/* สถานะกำลังโหลด */
.bringer-loading {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.bringer-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--ix-line);
    border-top-color: var(--ix-blue);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

.bringer-loading span {
    color: var(--ix-ink-2);
    font-size: 1em;
}

/* ท้าย section */
.bringer-footer {
    text-align: center;
    margin-top: 40px;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ix-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    padding: 12px 24px;
    border: 1.5px solid var(--ix-blue);
    border-radius: 8px;
    background: var(--ix-white);
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: var(--ix-tint);
    border-color: var(--ix-blue);
    transform: translateX(5px);
}

.view-all-link svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.view-all-link:hover svg {
    transform: translateX(5px);
}

/* Responsive (layout เท่านั้น) */
@media (max-width: 768px) {
    .bringer-section {
        padding: 60px 15px;
    }

    .bringer-section .section-title {
        font-size: 1.8em;
    }

    .rules-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .rules-content li {
        text-align: left;
    }

    .bringer-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .bringer-tab {
        justify-content: center;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }

    .bringer-card {
        width: 260px;
    }
}
/* ========================================
   BANNER 3D CAROUSEL SECTION
   ======================================== */
.banner-slideshow-section {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #0d0b0c 0%, #111015 50%, #0d0b0c 100%);
    padding: 50px 0 40px;
    overflow: hidden;
}

.banner-slideshow-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 360px;
    perspective: 1200px;
}

/* Slides Container - 3D */
.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.banner-slide {
    position: absolute;
    width: 62%;
    height: 100%;
    top: 0;
    left: 50%;
    margin-left: -31%;
    border-radius: 14px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.65) translateZ(-500px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    display: block;
    text-decoration: none;
    color: inherit;
    backface-visibility: hidden;
}

/* Center (Active) slide */
.banner-slide.active {
    opacity: 1;
    transform: translateZ(0) scale(1);
    z-index: 10;
    pointer-events: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 0 60px rgba(236, 27, 27, 0.08);
    border: 1px solid rgba(236, 27, 27, 0.15);
}

/* Hover on active slide (clickable link) */
a.banner-slide.active {
    cursor: pointer;
}

a.banner-slide.active:hover {
    transform: translateZ(0) scale(1.03);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.8), 0 0 80px rgba(236, 27, 27, 0.2);
    border-color: rgba(236, 27, 27, 0.4);
    filter: brightness(1.08);
}

/* Left (Previous) slide */
.banner-slide.prev {
    opacity: 1;
    transform: translateX(-72%) translateZ(-220px) rotateY(18deg) scale(0.82);
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
    filter: brightness(0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Right (Next) slide */
.banner-slide.next {
    opacity: 1;
    transform: translateX(72%) translateZ(-220px) rotateY(-18deg) scale(0.82);
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
    filter: brightness(0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Hover on side slides */
.banner-slide.prev:hover,
.banner-slide.next:hover {
    filter: brightness(0.6);
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay text on slide */
.banner-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 40px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.banner-slide-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4em;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.banner-slide-desc {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Empty placeholder */
.banner-slide.placeholder-slide {
    opacity: 1;
    transform: translateZ(0) scale(1);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1517 0%, #221c1f 50%, #1a1517 100%);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Navigation Arrows */
.banner-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.7;
    padding: 0;
}

.banner-nav-btn:hover {
    opacity: 1;
    background: rgba(236, 27, 27, 0.7);
    border-color: rgba(236, 27, 27, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.banner-nav-btn svg {
    width: 22px;
    height: 22px;
}

.banner-prev {
    left: 6px;
}

.banner-next {
    right: 6px;
}

/* Dot Indicators */
.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    position: relative;
    z-index: 5;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.banner-dot.active {
    background: #ec1b1b;
    box-shadow: 0 0 8px rgba(236, 27, 27, 0.6);
    width: 28px;
    border-radius: 5px;
}

/* Responsive - Tablet */
@media (max-width: 1100px) {
    .banner-slideshow-section {
        padding: 40px 0 30px;
    }

    .banner-slider {
        height: 300px;
    }

    .banner-slide {
        width: 65%;
        margin-left: -32.5%;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .banner-slideshow-section {
        padding: 30px 0 24px;
    }

    .banner-slider {
        height: 220px;
        perspective: 800px;
    }

    .banner-slide {
        width: 72%;
        margin-left: -36%;
        border-radius: 10px;
    }

    .banner-slide.prev {
        transform: translateX(-60%) translateZ(-150px) rotateY(12deg) scale(0.78);
    }

    .banner-slide.next {
        transform: translateX(60%) translateZ(-150px) rotateY(-12deg) scale(0.78);
    }

    .banner-nav-btn {
        width: 36px;
        height: 36px;
    }

    .banner-nav-btn svg {
        width: 18px;
        height: 18px;
    }

    .banner-slide-overlay {
        padding: 16px 16px 12px;
    }

    .banner-slide-title {
        font-size: 1em;
    }

    .banner-slide-desc {
        font-size: 0.8em;
    }

    .banner-dots {
        margin-top: 14px;
        gap: 8px;
    }

    .banner-dot {
        width: 8px;
        height: 8px;
    }

    .banner-dot.active {
        width: 22px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .banner-slideshow-section {
        padding: 24px 0 20px;
    }

    .banner-slider {
        height: 170px;
    }

    .banner-slide {
        width: 80%;
        margin-left: -40%;
        border-radius: 8px;
    }

    .banner-slide.prev,
    .banner-slide.next {
        opacity: 0.5;
    }

    .banner-nav-btn {
        width: 30px;
        height: 30px;
    }

    .banner-nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .banner-slide-overlay {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════
   Preview Video Section — INFINITY X
   อ้างอิง: C:\infinityx\index.html — .card / .boards / .f-icon
   หมายเหตุ: แถบคอนโทรลวิดีโอยังเป็นฉากมืดโปร่งอยู่ เพราะมันวางทับตัววิดีโอ
   ถ้าทำเป็นสีขาวจะอ่านไม่ออก — เปลี่ยนเฉพาะสี accent เป็นน้ำเงิน
═══════════════════════════════════════════════════ */
.preview-video-section {
    background: linear-gradient(180deg, #FFFFFF 0%, #F2F7FD 26%, #F2F7FD 100%);
    padding: 90px 40px 100px;
    position: relative;
    overflow: hidden;
}

/* แสงนวลด้านบน
   เดิมใช้ `ellipse at top` → จุดที่เข้มที่สุดของ gradient อยู่ที่ขอบบนพอดี (y=0)
   พอเจอ overflow:hidden ของ section เลยถูกตัดกลางคัน กลายเป็นเส้นรอยต่อชัด ๆ
   แก้เป็นวางจุดศูนย์กลางไว้กลางความสูงของตัวมันเอง (at 50% 50%)
   ขอบบนจึงเป็นปลาย gradient ที่จางเป็น 0 พอดี — ไม่มีรอยตัด แต่ยังเห็นแสงนวลเหมือนเดิม */
.preview-video-section::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 1100px; height: 620px;
    background: radial-gradient(ellipse 50% 62% at 50% 50%, rgba(59, 130, 246, .11) 0%, rgba(59, 130, 246, .05) 45%, transparent 72%);
    pointer-events: none;
}

/* เส้นตกแต่งด้านข้าง (.pvs-bg-decoration / .pvs-line) ถอดออกแล้วตามที่ผู้ใช้ขอ
   markup ก็ลบออกจาก landing_page.php ด้วย */

.preview-video-container {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ── Header (ชุดเดียวกับ .guide-header) ── */
.pvs-header {
    text-align: center;
    margin-bottom: 48px;
}

.pvs-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ix-tint);
    border: 1px solid rgba(29, 78, 216, .35);
    color: var(--ix-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.pvs-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.pvs-title-icon {
    width: 34px;
    height: 34px;
    color: var(--ix-blue);
    filter: none;
    flex-shrink: 0;
}

.pvs-title {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--ix-ink);
    margin: 0;
    text-shadow: none;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.pvs-bar {
    position: relative;
    flex: 0 0 120px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #B7CCEC 50%, transparent 100%);
}
.pvs-bar.right {
    background: linear-gradient(to left, transparent 0%, #B7CCEC 50%, transparent 100%);
}
.pvs-bar::before,
.pvs-bar::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #2563EB;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: none;
}
.pvs-bar.left::before  { right: 0; }
.pvs-bar.left::after   { left: 0; opacity: 0.4; width: 3px; height: 3px; }
.pvs-bar.right::before { left: 0; }
.pvs-bar.right::after  { right: 0; opacity: 0.4; width: 3px; height: 3px; }

.pvs-subtitle {
    font-size: 14px;
    color: var(--ix-ink-2);
    line-height: 1.7;
    margin: 0;
    letter-spacing: 1px;
}
.pvs-subtitle strong {
    color: var(--ix-blue-deep);
    font-weight: 600;
}

/* ── กรอบวิดีโอ — การ์ดขาวแบบ .card ของ infinityx ── */
.pvs-frame-outer {
    position: relative;
    padding: 8px;
    border-radius: 14px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    box-shadow: var(--ix-shadow-card);
}

/* ขีดมุมสีแดงของธีมเดิม — infinityx ไม่มี */
.pvs-corner { display: none; }

.pvs-frame-inner {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.preview-video-player {
    display: block;
    width: 100%;
    height: auto;
    background: #000;
}

/* ── Custom Player ── */
.pvs-player {
    position: relative;
    background: #000;
    user-select: none;
}
.pvs-player:hover .pvs-controls,
.pvs-player.paused .pvs-controls {
    opacity: 1;
    transform: translateY(0);
}

/* overlay (ปุ่มเล่นใหญ่) */
.pvs-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 20, 48, 0.34);
    transition: opacity .25s;
    z-index: 3;
}
.pvs-overlay.hidden { opacity: 0; pointer-events: none; }

.pvs-big-play {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, filter .2s;
    box-shadow: 0 10px 28px -10px rgba(29, 78, 216, .7);
}
.pvs-big-play:hover {
    transform: scale(1.08);
    filter: brightness(1.08);
    box-shadow: 0 14px 34px -10px rgba(29, 78, 216, .8);
}
.pvs-big-play svg { width: 28px; height: 28px; margin-left: 4px; }

/* แถบคอนโทรล — ฉากมืดโปร่งทับวิดีโอ (จำเป็นเพื่อให้อ่านออก) */
.pvs-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(10, 20, 48, 0.88) 0%, transparent 100%);
    padding: 32px 14px 10px;
    z-index: 4;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s, transform .3s;
}

.pvs-progress-wrap {
    padding: 6px 0;
    cursor: pointer;
}
.pvs-progress-bar {
    position: relative;
    height: 3px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    transition: height .15s;
}
.pvs-progress-wrap:hover .pvs-progress-bar { height: 5px; }
.pvs-progress-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--ix-blue-soft);
    border-radius: 3px;
    width: 0%;
}
.pvs-progress-thumb {
    position: absolute;
    top: 50%; right: -6px;
    transform: translateY(-50%);
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(59, 130, 246, .8);
    opacity: 0;
    transition: opacity .15s;
    pointer-events: none;
}
.pvs-progress-wrap:hover .pvs-progress-thumb { opacity: 1; }

.pvs-btn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.pvs-btn-left, .pvs-btn-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pvs-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
.pvs-btn:hover { color: #fff; background: rgba(255,255,255,0.14); }
.pvs-btn svg { width: 18px; height: 18px; }

/* volume */
.pvs-volume-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
}
.pvs-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    outline: none;
    overflow: hidden;
    transition: width .2s;
    cursor: pointer;
}
.pvs-volume-wrap:hover .pvs-vol-slider { width: 60px; }
.pvs-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: -60px 0 0 56px var(--ix-blue-soft);
}

.pvs-time {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    font-variant-numeric: tabular-nums;
    padding: 0 4px;
    white-space: nowrap;
}

/* fullscreen override */
.pvs-player:fullscreen .pvs-controls,
.pvs-player:-webkit-full-screen .pvs-controls {
    opacity: 1;
    transform: translateY(0);
}

/* แสงนวลใต้กรอบวิดีโอ */
.pvs-glow {
    position: absolute;
    bottom: -50px; left: 50%;
    transform: translateX(-50%);
    width: 80%; height: 100px;
    background: radial-gradient(ellipse, rgba(29, 78, 216, .13) 0%, transparent 70%);
    pointer-events: none;
}

/* ── ป้ายบอกช่วงในคลิป ── */
.pvs-chapter-label {
    text-align: center;
    margin: 24px 0 12px;
    font-size: 11px;
    color: var(--ix-ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.pvs-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pvs-chapter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s, background .2s, transform .15s, box-shadow .2s;
    padding: 0;
}
.pvs-chapter-btn:hover {
    border-color: rgba(29, 78, 216, .45);
    background: var(--ix-tint);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -12px rgba(15, 30, 61, .4);
}
.pvs-chapter-btn.active {
    border-color: var(--ix-blue);
    background: var(--ix-tint);
}
.pvs-chapter-time {
    background: var(--ix-sky);
    color: var(--ix-blue);
    font-size: 11px;
    font-weight: 700;
    padding: 7px 10px;
    font-variant-numeric: tabular-nums;
    border-right: 1px solid var(--ix-line);
    white-space: nowrap;
    font-family: monospace;
}
.pvs-chapter-btn.active .pvs-chapter-time {
    background: var(--ix-blue);
    color: #fff;
    border-right-color: var(--ix-blue);
}
.pvs-chapter-name {
    color: var(--ix-ink-2);
    font-size: 12px;
    padding: 7px 12px;
    white-space: nowrap;
}
.pvs-chapter-btn:hover .pvs-chapter-name,
.pvs-chapter-btn.active .pvs-chapter-name {
    color: var(--ix-blue);
}

/* ── แท็บเลือกวิดีโอ ── */
.pvs-video-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 28px 0 0;
}
.pvs-video-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 8px;
    padding: 8px 20px;
    cursor: pointer;
    color: var(--ix-ink-2);
    transition: border-color .2s, background .2s, color .2s, transform .15s, box-shadow .2s;
}
.pvs-video-tab:hover {
    border-color: rgba(29, 78, 216, .45);
    background: var(--ix-tint);
    color: var(--ix-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -12px rgba(15, 30, 61, .4);
}
.pvs-video-tab.active {
    border-color: var(--ix-blue);
    background: var(--ix-tint);
    color: var(--ix-blue);
}
.pvs-tab-ep {
    font-size: 11px;
    font-weight: 700;
    background: var(--ix-sky);
    color: var(--ix-blue);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    font-family: monospace;
    white-space: nowrap;
}
.pvs-video-tab.active .pvs-tab-ep {
    background: var(--ix-blue);
    color: #fff;
}
.pvs-tab-name {
    font-size: 13px;
    white-space: nowrap;
}

/* ── Responsive (layout เท่านั้น) ── */
@media (max-width: 768px) {
    .preview-video-section { padding: 60px 24px 70px; }
    .pvs-video-tab { padding: 7px 14px; }
    .pvs-tab-name { font-size: 12px; }
    .pvs-title { font-size: 26px; letter-spacing: 5px; }
    .pvs-title-icon { width: 28px; height: 28px; }
    .pvs-bar { flex: 0 0 60px; }
}
@media (max-width: 480px) {
    .preview-video-section { padding: 40px 16px 50px; }
    .pvs-title { font-size: 20px; letter-spacing: 3px; }
    .pvs-title-icon { width: 22px; height: 22px; }
    .pvs-bar { flex: 0 0 30px; }
    .pvs-title-row { gap: 10px; }
    .pvs-frame-outer { padding: 6px; border-radius: 12px; }
    .pvs-frame-inner { border-radius: 7px; }
}

/* ═══════════════════════════════════════════════════
   Dev Team Credits Section
═══════════════════════════════════════════════════ */
/* ==================== DEV TEAM ==================== */
.team-section {
    position: relative;
    padding: 110px 40px 100px;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(236,27,27,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 50% 100%, rgba(236,27,27,0.06) 0%, transparent 60%),
        linear-gradient(180deg, #080506 0%, #0b0708 50%, #080506 100%);
    border-top: 1px solid rgba(236,27,27,0.14);
    border-bottom: 1px solid rgba(236,27,27,0.14);
    overflow: hidden;
}

.team-bg-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(236,27,27,0.06), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(236,27,27,0.05), transparent 40%);
}
.team-bg-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(236,27,27,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(236,27,27,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 0%, transparent 80%);
    opacity: 0.55;
}

.team-container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

/* Header */
.team-header {
    margin-bottom: 56px;
}

.team-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.team-title-icon {
    width: 34px;
    height: 34px;
    color: #ec1b1b;
    filter: drop-shadow(0 0 10px rgba(236,27,27,0.55));
    flex-shrink: 0;
}

.team-title {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 8px;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 24px rgba(236,27,27,0.25);
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #d3a3a3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.team-bar {
    position: relative;
    flex: 0 0 120px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(236,27,27,0.9) 50%, transparent 100%);
}
.team-bar.right {
    background: linear-gradient(to left, transparent 0%, rgba(236,27,27,0.9) 50%, transparent 100%);
}
.team-bar::before,
.team-bar::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #ec1b1b;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 0 10px rgba(236,27,27,0.8);
}
.team-bar.left::before  { right: 0; }
.team-bar.left::after   { left: 0; opacity: 0.4; width: 3px; height: 3px; }
.team-bar.right::before { left: 0; }
.team-bar.right::after  { right: 0; opacity: 0.4; width: 3px; height: 3px; }

.team-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 1px;
    margin: 0;
}

/* Carousel (same pattern as bringer-carousel) */
.team-carousel {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    /* pad just enough for 3 cards × 290 + 2 × 24 gaps + 2 arrows × 44 + 2 × 15 gaps = ~1036px */
    max-width: 1040px;
    margin: 0 auto;
}

.team-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    justify-content: center;
}
.team-slider::-webkit-scrollbar { display: none; }

/* Card — angular premium (slider item) */
.team-card {
    position: relative;
    background:
        linear-gradient(135deg, rgba(236,27,27,0.04) 0%, transparent 55%),
        linear-gradient(180deg, rgba(14,8,9,0.9) 0%, rgba(10,5,6,0.95) 100%);
    border: 1px solid rgba(236,27,27,0.22);
    border-radius: 2px;
    padding: 38px 26px 28px;
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
                border-color 0.3s ease,
                box-shadow 0.35s ease,
                background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    flex-shrink: 0;
    width: 290px;
    scroll-snap-align: center;
}

/* ขีดมุมทั้ง 4 มุมของธีมเดิม — เอาออกตามที่ผู้ใช้ขอ (แบบเดียวกับ .pvs-corner / .ss-lb-corner) */
.team-card::before,
.team-card:hover::before {
    display: none;
}

/* Diagonal shimmer on hover */
.team-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(115deg, transparent 40%, rgba(236,27,27,0.08) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.45s ease;
}

.team-card:hover {
    transform: translateY(-6px);
    border-color: rgba(236,27,27,0.55);
    box-shadow:
        0 18px 40px rgba(0,0,0,0.6),
        0 0 32px rgba(236,27,27,0.22);
}
.team-card:hover::after {
    opacity: 1;
}

.team-card > * {
    position: relative;
    z-index: 2;
}

/* Avatar — angular with red frame */
.team-avatar {
    width: 100px;
    height: 100px;
    border-radius: 2px;
    background: linear-gradient(135deg, rgba(236,27,27,0.15), rgba(236,27,27,0.05));
    border: 1px solid rgba(236,27,27,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    color: rgba(236,27,27,0.7);
    overflow: hidden;
    position: relative;
    box-shadow:
        0 0 0 3px rgba(10,3,3,0.9),
        0 0 0 4px rgba(236,27,27,0.25),
        0 0 22px rgba(236,27,27,0.25);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.team-card:hover .team-avatar {
    transform: scale(1.04);
    box-shadow:
        0 0 0 3px rgba(10,3,3,0.9),
        0 0 0 4px rgba(236,27,27,0.55),
        0 0 30px rgba(236,27,27,0.5);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 0;
}

.team-avatar-anon {
    background: rgba(255,255,255,0.06);
}
.team-avatar-anon svg {
    width: 70%;
    height: 70%;
}

/* Name */
.team-name {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 3px;
    margin: 0 0 10px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 0%, #ffd9d9 55%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding-bottom: 10px;
}
.team-name::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 36px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #ec1b1b 50%, transparent 100%);
    box-shadow: 0 0 6px rgba(236,27,27,0.6);
}

/* Meta (country/age) */
.team-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
    margin: 0 0 14px;
    text-transform: uppercase;
    font-weight: 500;
}
.team-meta span {
    display: inline-block;
}
.team-meta span + span::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    background: #ec1b1b;
    transform: rotate(45deg);
    margin: 0 10px 2px;
    box-shadow: 0 0 4px rgba(236,27,27,0.6);
    vertical-align: middle;
}

/* Tags — angular */
.team-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0 0 18px;
}
.team-tag {
    font-family: 'Cinzel', 'Prompt', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ff7a7a;
    background:
        linear-gradient(180deg, rgba(236,27,27,0.22) 0%, rgba(139,0,0,0.15) 100%);
    border: 1px solid rgba(236,27,27,0.55);
    border-radius: 2px;
    padding: 5px 14px;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(236,27,27,0.15), inset 0 0 0 1px rgba(236,27,27,0.1);
    text-shadow: 0 0 8px rgba(236,27,27,0.3);
}

/* Admin/GM tag — amber variant */
.team-tag-gm {
    color: #ffd56b;
    background:
        linear-gradient(180deg, rgba(255,180,50,0.22) 0%, rgba(180,120,20,0.15) 100%);
    border-color: rgba(255,180,50,0.55);
    box-shadow: 0 0 10px rgba(255,180,50,0.15), inset 0 0 0 1px rgba(255,180,50,0.1);
    text-shadow: 0 0 8px rgba(255,180,50,0.3);
}

/* Divider */
.team-divider {
    width: 48px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #ec1b1b 50%, transparent 100%);
    margin: 0 auto 16px;
    position: relative;
    box-shadow: 0 0 8px rgba(236,27,27,0.45);
}
.team-divider::before,
.team-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 4px;
    height: 4px;
    background: #ec1b1b;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 0 6px rgba(236,27,27,0.7);
}
.team-divider::before { left: -2px; }
.team-divider::after  { right: -2px; }

/* Description */
.team-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    line-height: 1.8;
    text-align: center;
    flex: 1;
    letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .team-section { padding: 90px 32px 80px; }
    .team-title { font-size: 30px; letter-spacing: 6px; }
    .team-bar { flex: 0 0 90px; }
    .team-carousel { gap: 12px; }
}

@media (max-width: 768px) {
    .team-section { padding: 70px 16px 60px; }
    .team-header { margin-bottom: 40px; }
    .team-title { font-size: 22px; letter-spacing: 4px; }
    .team-title-icon { width: 26px; height: 26px; }
    .team-bar { flex: 0 0 40px; }
    .team-subtitle { font-size: 12.5px; }

    .team-carousel { gap: 8px; }
    .team-slider {
        gap: 16px;
        padding: 6px 4px 18px;
        justify-content: flex-start;
    }
    .team-card {
        width: 72vw;
        max-width: 280px;
        padding: 32px 22px 24px;
    }
    .team-avatar { width: 88px; height: 88px; }
    .team-name { font-size: 17px; letter-spacing: 2px; }
}

@media (max-width: 480px) {
    .team-section { padding: 58px 12px 56px; }
    .team-card { width: 82vw; }
}
/* =====================================================
   สถานะชาแนล (#channel-status)
   ข้อมูลจริงจาก SERVER01.dbo.cabal_character_table (ChannelIdx + Login)
   ผ่าน api/get_channel_status.php — วาดฝั่ง client เพราะหน้านี้ถูก cache 5 นาที
   ===================================================== */
.channel-status-section {
    position: relative;
    padding: 72px 40px 76px;
    /* ขอบบนต้องเป็นขาวสนิทให้ตรงกับ `.hero::after` ที่ไล่จบที่ #FFFFFF พอดี
       และขอบล่างต้องขาวเหมือนกันเพราะ `.preview-video-section` เริ่มที่ #FFFFFF
       เดิมเริ่มที่ #F2F7FD เลยเห็นเป็นเส้นรอยต่อคาดกลางจอ */
    background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFE 50%, #FFFFFF 100%);
}
.channel-status-section[hidden] { display: none; }

.channel-status-container {
    max-width: 1180px;
    margin-inline: auto;
}

/* หัวข้อใช้คลาสชุดเดียวกับ BEGINNER GUIDE (.guide-header / .guide-title-row /
   .guide-bar / .guide-title / .guide-subtitle) — ที่นี่ปรับแค่ระยะให้พอดีกับ section นี้ */
.channel-status-head {
    margin-bottom: 34px;
}
.channel-status-head .guide-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    letter-spacing: .4px;
}
/* จุดเขียวบอกว่าเป็นข้อมูลสด */
.channel-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16A34A;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
    flex-shrink: 0;
}

/* ตาราง 3 คอลัมน์แบบเดียวกับที่เจ้าของอ้างอิงมา */
/* ไม่ครอบด้วยการ์ด — วางแถวลงบนพื้นหน้าเว็บตรง ๆ ตามที่เจ้าของสั่ง */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 34px;
}

.channel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 11px 0;
}
/* เส้นคั่น "แนวตั้ง" ระหว่างคอลัมน์ (แบบเดียวกับที่เจ้าของอ้างอิงมา)
   เดิมใช้เส้นใต้รายแถว แต่พอจำนวนชาแนลไม่ลงตัวกับ 3 คอลัมน์
   `:nth-last-child(-n+3)` จะไปตัดเส้นของช่องที่ยังอยู่แถวบน ทำให้เส้นขาดไม่เท่ากัน */
.channel-row:not(:nth-child(3n+1)) {
    border-left: 1px solid var(--ix-line);
    padding-left: 30px;
}

/* คอลัมน์ซ้ายเป็นกอง 2 บรรทัด: ชื่อชาแนล + เวลาเปิดรอบถัดไป (เฉพาะชาแนลสงคราม)
   วางไว้ใต้ชื่อแทนที่จะแทรกกลางแถว เพราะกริดเป็น 3 คอลัมน์ ที่ว่างแนวนอนมีน้อย
   ชาแนลปกติไม่มีบรรทัดที่สอง แถวจึงสูงเท่าเดิมทุกประการ */
.channel-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.channel-head {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
}

.channel-name {
    min-width: 0;
    color: var(--ix-ink);
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* ป้าย "รอบถัดไป" — ติดแถวที่จะเปิดก่อนใครเท่านั้น จึงไม่ต้องแข่งกันเองหลายป้าย
   เป็นจุดสีเดียวของกลุ่มนี้ ที่เหลือปล่อยเป็นหมึกปกติ */
.channel-next-tag {
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ix-blue);
    color: var(--ix-white);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.7;
    letter-spacing: .03em;
    white-space: nowrap;
}
/* [hidden] ของเบราว์เซอร์แพ้ display ใด ๆ ที่เราตั้งเอง — ต้องกันไว้ตรง ๆ
   (ไม่งั้นชาแนลปกติจะได้บรรทัดที่สองเป็นช่องว่างเปล่า และป้ายจะโผล่ทุกแถว) */
.channel-next-tag[hidden] { display: none; }

/* บรรทัดเวลา — ตัวเลขเป็นตัวเอก หน่วยกับคำนำถอยไปเป็นตัวประกอบ
   อ่านเป็น "ข้อมูล" ไม่ใช่ประโยคที่น้ำหนักเท่ากันทั้งบรรทัด */
.channel-when {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--ix-ink-2);
    font-size: 12px;
    white-space: nowrap;
}
.channel-when[hidden] { display: none; }

.channel-when-ic {
    flex: none;
    width: 13px;
    height: 13px;
    color: var(--ix-ink-2);
    opacity: .75;
}

.channel-when-tx {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-variant-numeric: tabular-nums;   /* เลขไม่ขยับตอนวินาทีเดิน */
}

/* หนึ่งช่อง = ตัวเลข + หน่วย ติดกันแน่นกว่าระยะห่างระหว่างช่อง
   ตาจึงจับเป็นก้อน "3 ชม." "07 นาที" ไม่ใช่คำ 6 คำเรียงกัน */
.channel-when-tx .cw-seg {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
}
.channel-when-tx .cw-seg[hidden] { display: none; }

.channel-when-tx .cw-lb  { font-weight: 500; }
.channel-when-tx .cw-n   { color: var(--ix-ink); font-size: 13.5px; font-weight: 700; }
.channel-when-tx .cw-u   { font-size: 11px; font-weight: 500; }
.channel-when-tx .cw-now { color: var(--ix-blue); font-weight: 700; }
.channel-when-tx .cw-lb[hidden],
.channel-when-tx .cw-now[hidden] { display: none; }

/* วินาทีหรี่ลงหนึ่งขั้น — เป็นหน่วยที่วิ่งตลอดเวลา ถ้าเด่นเท่าชั่วโมง/นาที
   สายตาจะถูกดึงไปที่ตัวที่กระพริบแทนที่จะเป็นตัวที่ผู้เล่นต้องใช้วางแผน */
.channel-when-tx .cw-s .cw-n { color: var(--ix-ink-2); font-size: 12.5px; }
.channel-row.is-next .cw-s .cw-n { color: var(--ix-blue-soft); }

/* แถวที่จะเปิดก่อน — ตัวเลขกับไอคอนเป็นสีหลัก ส่วนแถวอื่นเป็นหมึกปกติ
   ไม่ทำให้แถวอื่นจางลง เพราะเวลาของทุกแถวเป็นข้อมูลที่ต้องอ่านได้เท่ากัน */
.channel-row.is-next .channel-when-ic { color: var(--ix-blue); opacity: 1; }
.channel-row.is-next .cw-n            { color: var(--ix-blue); }

.channel-bar {
    display: inline-flex;
    gap: 3px;
    flex-shrink: 0;
}
.channel-bar .seg {
    width: 8px;
    height: 17px;
    border-radius: 2px;
    background: var(--ix-line);
    transition: background .25s ease;
}
/* ── ไล่สีตามตำแหน่งขีด แบบหน้าเลือกแชนแนลในเกม ──────────────────────
   สีมาจาก "ตำแหน่งของขีด" (เขียว → เหลือง → ส้ม → แดง) ไม่ใช่ระดับรวมของชาแนล
   ของเดิมทาสีเดียวกันทั้งแถบตามระดับ ทำให้หน้าตาไม่เหมือนในเกม
   ความจุจริงมาจาก cabal_gms_ini_table (ดู php/online_stats.php)

   ไล่เร็วแบบเกม — เขียวแค่ 2-3 ขีดแรก แล้วไปเหลือง/ส้ม และถึงแดงตั้งแต่ขีด 8
   (รอบแรกไล่ช้าไป ค้างเขียวยาวแล้วจบที่ส้ม ไม่ถึงแดงเลย จึงดูไม่เหมือนในเกม) */
.channel-bar .seg.on:nth-child(1)  { background: #35D13F; }
.channel-bar .seg.on:nth-child(2)  { background: #6BD92E; }
.channel-bar .seg.on:nth-child(3)  { background: #9DDE1D; }
.channel-bar .seg.on:nth-child(4)  { background: #C9DC10; }
.channel-bar .seg.on:nth-child(5)  { background: #EDC30C; }
.channel-bar .seg.on:nth-child(6)  { background: #F59B0A; }
.channel-bar .seg.on:nth-child(7)  { background: #F2740A; }
.channel-bar .seg.on:nth-child(8)  { background: #EC4F0B; }
.channel-bar .seg.on:nth-child(9)  { background: #E5301A; }
.channel-bar .seg.on:nth-child(10) { background: #DE1F1C; }

/* เต็มจริง = แดงทึบทั้งแถบ เหมือนที่เกมวาดตอนชาแนลเต็ม */
.channel-bar.is-full .seg.on { background: #DE1F1C; }

/* สีวิ่งเบา ๆ — หน่วงทีละขีดให้เป็นคลื่นไหลจากซ้ายไปขวา
   ใช้ opacity ไม่ใช่ filter/background เพราะ compositor จัดการได้เลยไม่ต้อง repaint
   (หน้าเดียวมีขีดรวมกันเกือบร้อยอัน) */
@keyframes channelSegWave {
    0%, 100% { opacity: 1; }
    50%      { opacity: .72; }
}
.channel-bar .seg.on {
    animation: channelSegWave 2.6s ease-in-out infinite;
}
.channel-bar .seg:nth-child(1)  { animation-delay: 0s; }
.channel-bar .seg:nth-child(2)  { animation-delay: .09s; }
.channel-bar .seg:nth-child(3)  { animation-delay: .18s; }
.channel-bar .seg:nth-child(4)  { animation-delay: .27s; }
.channel-bar .seg:nth-child(5)  { animation-delay: .36s; }
.channel-bar .seg:nth-child(6)  { animation-delay: .45s; }
.channel-bar .seg:nth-child(7)  { animation-delay: .54s; }
.channel-bar .seg:nth-child(8)  { animation-delay: .63s; }
.channel-bar .seg:nth-child(9)  { animation-delay: .72s; }
.channel-bar .seg:nth-child(10) { animation-delay: .81s; }

/* กลุ่มชาแนลสงคราม */
.channel-war-wrap {
    margin-top: 26px;
}
.channel-war-wrap[hidden] { display: none; }

.channel-group-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
    color: var(--ix-ink-2);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 1.6px;
}
.channel-group-label::before,
.channel-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--ix-line), transparent);
}
.channel-group-label span {
    flex-shrink: 0;
    text-transform: uppercase;
}

.channel-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 20px;
    color: var(--ix-ink-2);
    font-size: 12.5px;
}
.channel-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.channel-legend .lv {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}
.channel-legend .lv.low    { background: #22C55E; }
.channel-legend .lv.medium { background: #84CC16; }
.channel-legend .lv.high   { background: #F59E0B; }
.channel-legend .lv.full   { background: #EF4444; }

@media (max-width: 900px) {
    .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 26px; }
    .channel-row:not(:nth-child(3n+1)) { border-left: 0; padding-left: 0; }
    .channel-row:not(:nth-child(2n+1)) { border-left: 1px solid var(--ix-line); padding-left: 26px; }
}
@media (max-width: 560px) {
    .channel-status-section { padding: 56px 18px 60px; }
    .channel-grid { grid-template-columns: 1fr; }
    /* คอลัมน์เดียว → กลับไปใช้เส้นใต้ ซึ่งตอนนี้ตัดได้ตรงเพราะ 1 แถว = 1 ช่อง */
    .channel-row { border-left: 0 !important; padding-left: 0 !important; border-bottom: 1px solid var(--ix-line); }
    .channel-row:last-child { border-bottom: 0; }
    .channel-status-head .guide-title { font-size: 23px; letter-spacing: 3px; }
    .channel-status-head .guide-bar { flex-basis: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .channel-bar .seg { transition: none; animation: none; opacity: 1; }
}

/* =====================================================
   ปุ่มภาพปกวิดีโอ YouTube (โหลด player ตอนกดเท่านั้น)
   เดิมฝัง iframe ตรง ๆ ทำให้ดึงสคริปต์ YouTube หลายเมกะไบต์ทุกครั้งที่เปิดหน้า
   ทั้งที่วิดีโออยู่ใน accordion ที่พับอยู่ — และ player พ่นข้อความรกใน console
   ===================================================== */
.yt-lite {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.yt-lite img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease, filter .3s ease;
}

.yt-lite:hover img,
.yt-lite:focus-visible img { transform: scale(1.04); filter: brightness(.85); }

.yt-lite-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.yt-lite-play svg {
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .5));
    opacity: .92;
    transition: opacity .25s ease, transform .25s ease;
}

.yt-lite:hover .yt-lite-play svg { opacity: 1; transform: scale(1.08); }

.yt-lite:focus-visible { outline: 2px solid var(--ix-blue, #1D4ED8); outline-offset: 2px; }

/* iframe ที่ถูกใส่เข้ามาแทนหลังกด */
.yt-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 8px;
    display: block;
}
