/* =====================================================================
   YG-THAIQ · ธีมคริสต์มาส × ปีใหม่ 2570 — ส่วนที่ใช้ทั้งเว็บ
   (เมนูบน · ปุ่ม · footer · หน้าดาวน์โหลด) — โหลดเฉพาะตอน body มีคลาส theme-xmas
   ภาพชุด UI อยู่ใน assets/xmas2570/ui/
   ===================================================================== */
.theme-xmas {
    --xm-night: #060d1f;
    --xm-navy: #0a1530;
    --xm-ice: #d9efff;
    --xm-gold: #ffd27a;
    --xm-red: #d92d3a;
    --xm-green: #1d9a5b;
    --xm-font: 'Kanit', 'Sarabun', sans-serif;
    --accent-gold: #ffd27a;
    background-color: var(--xm-night);
}
html:has(body.theme-xmas) { scrollbar-color: #9fd3ff #060d1f; }
.theme-xmas ::-webkit-scrollbar-track { background: #060d1f; }
.theme-xmas ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #e8f5ff, #7fb6e6); border-color: #060d1f; }

/* ---------- เมนูบน ---------- */
.theme-xmas .site-header { background: rgba(6, 13, 31, .84); border-bottom-color: rgba(159, 211, 255, .18); }
.theme-xmas .site-header::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; pointer-events: none;
    background: repeating-linear-gradient(-45deg, #e8343f 0 10px, #fff 10px 20px); box-shadow: 0 2px 10px rgba(232, 52, 63, .35);
}
.theme-xmas .xm-nav-logo { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.theme-xmas .nav-link { font-family: var(--xm-font); font-weight: 500; position: relative; }
.theme-xmas .nav-link:hover, .theme-xmas .nav-link.active { color: var(--xm-gold); text-shadow: 0 0 12px rgba(255, 210, 122, .45); }
.theme-xmas .nav-link.active::after {
    content: ''; position: absolute; left: 50%; bottom: -16px; width: 15px; height: 17px; transform: translateX(-50%);
    background: url(ui/dot_active.webp) center / contain no-repeat; border: 0; filter: drop-shadow(0 0 6px rgba(255, 210, 122, .8));
}
/* ปุ่มสมัคร = ทับทิมขอบทอง · ปุ่มเข้าสู่ระบบ = เขียวสนขอบเงิน (ภาพเดียวกับปุ่มในหน้าแรก) */
.theme-xmas .btn-register,
.theme-xmas .btn-login {
    height: 44px; padding: 0 30px 2px; border-radius: 0; background: none !important; box-shadow: none;
    border-width: 0 !important; border-style: solid !important; border-image-slice: 0 96 fill; border-image-width: 0 34px; border-image-repeat: stretch;
    font-family: var(--xm-font); font-weight: 600; color: #fff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45));
}
.theme-xmas .btn-register { border-image-source: url(ui/btn_red.webp); }
.theme-xmas .btn-login { border-image-source: url(ui/btn_green.webp); }
.theme-xmas .btn-register:hover, .theme-xmas .btn-login:hover { transform: translateY(-2px); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)) brightness(1.12); }
/* ปิดเงา/พื้นหลังสีทองของธีมเดิมทุกสถานะ (hover/focus/active) */
.theme-xmas .btn-register, .theme-xmas .btn-login,
.theme-xmas .btn-register:hover, .theme-xmas .btn-login:hover,
.theme-xmas .btn-register:focus, .theme-xmas .btn-login:focus,
.theme-xmas .btn-register:active, .theme-xmas .btn-login:active { box-shadow: none !important; background: none !important; background-color: transparent !important; outline: none; }

/* ---------- footer ---------- */
.theme-xmas .site-footer {
    padding: 54px 0 18px; border-top: 0; color: #b9cbe3;
    background:
        radial-gradient(60% 120% at 85% 0, rgba(80, 140, 230, .16), transparent 60%),
        radial-gradient(50% 100% at 10% 100%, rgba(217, 45, 58, .12), transparent 60%),
        linear-gradient(180deg, #0b1838 0, #071026 55%, #040912 100%);
}
.theme-xmas .site-footer::before {
    height: 5px; top: 0; background: repeating-linear-gradient(-45deg, #e8343f 0 10px, #fff 10px 20px); box-shadow: 0 0 14px rgba(232, 52, 63, .4); z-index: 2;
}
.theme-xmas .site-footer::after {
    content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 18px; pointer-events: none; z-index: 2;
    background: radial-gradient(3px 15px at 50% 0, rgba(225, 242, 255, .85) 96%, transparent) 0 0 / 46px 18px repeat-x,
                radial-gradient(2px 9px at 50% 0, rgba(225, 242, 255, .7) 96%, transparent) 23px 0 / 46px 12px repeat-x;
}
/* GM ม่วงทองตัวใหญ่ ครึ่งตัว: หัวอยู่ใต้น้ำแข็งย้อย ขาเลยขอบล่าง footer (footer ตัดทิ้งเอง) */
.theme-xmas .xm-footer-char { mix-blend-mode: normal; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .6)); top: 30px; bottom: auto; height: 720px; max-height: none; width: auto; left: 10px;
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%); }
.theme-xmas .xm-footer-flake { position: absolute; right: -60px; top: -40px; width: 340px; height: 360px; pointer-events: none; z-index: 0; opacity: .06;
    background: url(ui/snowflake.webp) center / contain no-repeat; animation: xmFooterSpin 80s linear infinite; }
@keyframes xmFooterSpin { to { transform: rotate(360deg); } }
.theme-xmas .footer-brand h2 { font-family: var(--xm-font); font-weight: 700; background: linear-gradient(180deg, #fff, #ffe7b0 55%, var(--xm-gold)); -webkit-background-clip: text; background-clip: text; }
.theme-xmas .footer-desc { color: #a9bedb; }
.theme-xmas .footer-heading { display: inline-flex; align-items: center; height: 40px; padding: 0 36px 1px; margin-bottom: 14px; font-family: var(--xm-font); font-weight: 700; color: #17305c;
    border: 0; border-style: solid; border-image: url(ui/plate_ivory.webp) 0 100 fill / 0 28px stretch; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.theme-xmas .footer-heading::after { display: none; }
.theme-xmas .footer-links a, .theme-xmas .footer-links li { color: #b9cbe3; }
.theme-xmas .footer-links .fa-chevron-right { display: inline-block; width: 11px; height: 12px; margin-right: 7px !important; vertical-align: -1px;
    background: url(ui/dot.webp) center / contain no-repeat; color: transparent !important; font-size: 0 !important; }
.theme-xmas .footer-links a:hover { color: var(--xm-gold); }
.theme-xmas .footer-links a:hover .fa-chevron-right { background-image: url(ui/dot_active.webp); }
.theme-xmas .footer-links .text-gold { color: var(--xm-gold) !important; }
.theme-xmas .social-link { width: 38px; height: 38px; background: radial-gradient(circle at 35% 30%, #fff, #d6e9fb 60%, #9fc4e8); color: #17305c; border: 2px solid rgba(255, 255, 255, .6); font-size: 15px; }
.theme-xmas .social-link:hover { background: radial-gradient(circle at 35% 30%, #ff8a92, var(--xm-red) 60%, #8d0f19); color: #fff; box-shadow: 0 4px 14px rgba(217, 45, 58, .5); }
.theme-xmas .footer-bottom { border-top-color: rgba(159, 211, 255, .14); color: #8ea4c4; }

/* ---------- หน้าดาวน์โหลด ---------- */
.theme-xmas.page-download { background: var(--xm-night); }
.theme-xmas .dl-fog { background: radial-gradient(circle at 40% 50%, transparent 25%, rgba(6, 13, 31, .9) 100%); opacity: .85; }
.theme-xmas #dl-ambient { display: none; }
.theme-xmas .dl-back-title { color: rgba(217, 239, 255, .03); -webkit-text-stroke-color: rgba(217, 239, 255, .08); }
.theme-xmas .dl-char-hero { filter: drop-shadow(0 0 26px rgba(159, 211, 255, .25)) drop-shadow(0 12px 30px rgba(0, 0, 0, .55)); height: 90vh; right: 8%; }
.theme-xmas .dl-super-card { background: linear-gradient(180deg, rgba(14, 30, 64, .82), rgba(6, 13, 31, .88)); border: 0; border-radius: 22px; padding: 46px 44px 40px; }
.theme-xmas .dl-super-card::before { display: none; }
.theme-xmas .dl-hero-head { font-family: var(--xm-font); }
.theme-xmas .dl-hero-head span { background: linear-gradient(180deg, #fff, #ffe7b0 50%, var(--xm-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.theme-xmas .btn-launch-pad {
    clip-path: none; border-radius: 0; background: none; box-shadow: none; height: 96px; padding: 0 78px 4px; color: #fff;
    border: 0; border-style: solid; border-image: url(ui/btn_red.webp) 0 96 fill / 0 76px stretch; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5));
}
.theme-xmas .btn-launch-pad:hover { box-shadow: none; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .55)) brightness(1.12); }
.theme-xmas .lp-content h3 { font-family: var(--xm-font); text-shadow: 0 2px 4px rgba(0, 0, 0, .55); }
.theme-xmas .lp-content p { opacity: .9; }
.theme-xmas .lp-icon { background: radial-gradient(circle at 35% 30%, #fff, #ffe7b0 60%, #e0a63a); color: #8d0f19; }
.theme-xmas .tool-btn { background: rgba(159, 211, 255, .06); border-color: rgba(159, 211, 255, .2); }
.theme-xmas .tool-btn:hover { border-color: var(--xm-gold); background: rgba(255, 210, 122, .08); }
.theme-xmas .tool-icon { color: var(--xm-gold); }
.theme-xmas .dl-tools-row { border-top-color: rgba(159, 211, 255, .15); }
.theme-xmas .dl-tech-ring { border-color: rgba(159, 211, 255, .25); }
.theme-xmas .dl-grand-footer { background: linear-gradient(to top, #040912 0%, rgba(6, 13, 31, .85) 100%); border-bottom: 4px solid transparent;
    border-image: repeating-linear-gradient(-45deg, #e8343f 0 10px, #fff 10px 20px) 4; }
.theme-xmas .orb-btn:hover { background: var(--xm-red); border-color: var(--xm-red); }

/* ---------- กรอบคริสต์มาสบนแผงเดิม (xmas.js ใส่ให้ — ใช้ทั้งหน้าแรกและหน้าดาวน์โหลด) ---------- */
.xm-frame { position: absolute; inset: 0; z-index: 30; pointer-events: none; border: 0; border-style: solid; border-radius: inherit; }
.xm-frame--gold { border-image: url(ui/frame_gold.webp) 92 / 26px stretch; }
.xm-frame--silver { border-image: url(ui/frame_silver.webp) 92 / 30px stretch; }
/* กันกฎเดิมของการ์ด (เช่น .stat-card > * { position:relative }) ทับตำแหน่งกรอบ */
.theme-xmas .xm-frame { position: absolute !important; display: block !important; z-index: 31 !important; margin: 0 !important; padding: 0 !important; }
.theme-xmas .xm-frame.xm-frame--ice { inset: 0 !important; width: auto !important; height: auto !important; }
/* กรอบการ์ดน้ำแข็งหรูโบว์แดง (การ์ดสถิติ) — ยื่นออกนอกการ์ดเล็กน้อยให้โบว์มุมเด่น */
.xm-frame--ice { inset: 0; border-image: url(ui/frame_ice_card.webp) 118 110 104 110 / 44px 40px 38px 40px stretch; z-index: 31; }
.xm-bow { position: absolute; left: 50%; top: -44px; width: 124px; height: auto; transform: translateX(-50%); z-index: 31; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }

@media (max-width: 900px) {
    .xm-frame--ice { border-image-width: 32px 28px 28px 28px; }
    .xm-frame--gold { border-image-width: 18px; } .xm-frame--silver { border-image-width: 20px; }
    .xm-bow { width: 96px; top: -34px; }
    .theme-xmas .nav-link.active::after { display: none; }
    .theme-xmas .btn-launch-pad { height: 80px; padding: 0 60px 4px; border-image-width: 0 62px; }
}

/* ---------- หน้าสมัครไอดี / เข้าสู่ระบบ ---------- */
.theme-xmas .reg-bg-layer { background-image: url(img/bg_gate_plaza.webp?v=20261204a); background-position: center 60%; }
.theme-xmas .login-bg-layer { background-image: url(img/bg_waterwheel.webp?v=20261204a); background-position: center 60%; }
.theme-xmas .reg-bg-layer::after, .theme-xmas .login-bg-layer::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 45%, rgba(6, 13, 31, .25), rgba(6, 13, 31, .78)); }
.theme-xmas .lantern-layer { display: none; }
/* สมัคร: นักรบหอกมรกต (ฝั่งขวา) · เข้าสู่ระบบ: นักธนูศรน้ำแข็ง (ฝั่งซ้าย ยิงเข้าหาฟอร์ม) */
.theme-xmas .reg-char-layer { background-image: url(img/spear_emerald.webp?v=20261204a); background-size: contain; background-position: center bottom; mix-blend-mode: normal; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)); right: 2%; width: 44%; height: 86%; }
.theme-xmas .login-char-layer { background-image: url(img/archer.webp?v=20261204a); background-size: auto 78%; background-position: 4vw bottom; -webkit-mask-image: none; mask-image: none; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)); }
.theme-xmas .reg-card, .theme-xmas .login-card { background: linear-gradient(180deg, rgba(14, 30, 64, .86), rgba(6, 13, 31, .9)); border: 0; border-radius: 22px; }
.theme-xmas .reg-card::after { display: none; }
.theme-xmas .reg-title, .theme-xmas .login-title h1 { font-family: var(--xm-font); background: linear-gradient(180deg, #fff, #ffe7b0 60%, var(--xm-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.theme-xmas .btn-submit, .theme-xmas .btn-login-submit {
    height: 58px; border-radius: 0; background: none !important; box-shadow: none !important; color: #fff; font-family: var(--xm-font); font-size: 18px; text-shadow: 0 2px 3px rgba(0, 0, 0, .55);
    border-width: 0 !important; border-style: solid !important; border-image: url(ui/btn_red.webp) 0 96 fill / 0 46px stretch; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45));
}
.theme-xmas .btn-submit:hover, .theme-xmas .btn-login-submit:hover { transform: translateY(-2px); box-shadow: none !important; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)) brightness(1.12); }
.theme-xmas .pin-modal-card { background: linear-gradient(180deg, #0e1e40, #060d1f); border-color: rgba(159, 211, 255, .3); }
@media (max-width: 900px) { .theme-xmas .reg-char-layer, .theme-xmas .login-char-layer { opacity: .35; } }
