/* ============================================================
   TITAN VORTEX — ส่วนหน้าแรกจากมอคอัพแยกเลเยอร์ (18 ก.ย. 2569)
   1) ข้อมูลสด + ข้อมูลเซิร์ฟเวอร์   2) หอเกียรติยศ   3) เริ่มเล่น 4 ขั้นตอน
   เลเยอร์: img/tv/titan-landscape.jpg (ฉากหลัง) -> ม่านสี -> เอฟเฟกต์ SVG -> กรอบ SVG -> ข้อความ HTML
   คลาสทั้งหมดขึ้นต้น tvx- เพื่อไม่ชนกับ tl-theme.css / tv-theme.css
   ============================================================ */
.tvx{--tvx-gold:#f0c777;--tvx-gold-l:#fff1c5;--tvx-cyan:#62d7ff;--tvx-teal:#63e5d1;--tvx-mut:#a8c3d9;
  position:relative;isolation:isolate;overflow:hidden;color:#f1f4fb}
.tvx-layer{position:absolute;inset:0;pointer-events:none}
.tvx-inner{position:relative;width:min(var(--maxw,1200px) - 72px,calc(100% - 2*clamp(16px,4vw,36px)));margin:0 auto}

/* ---------- กรอบประดับ ---------- */
.tvx-ornate{position:relative;border:1px solid #ad884e;border-radius:8px;
  background:linear-gradient(135deg,#0d2e46bd,#07182ee8 35%,#081a2fe8 80%,#09243ae8);
  box-shadow:inset 0 0 0 1px #32688979,inset 0 0 28px #05101da6,0 10px 28px #0008}
.tvx-ornate::after{content:"";position:absolute;inset:5px;border:1px solid #3685ae54;border-radius:4px;pointer-events:none}

/* ---------- หัวข้อส่วน ---------- */
.tvx-title{display:flex;align-items:center;gap:16px;margin-bottom:19px}
.tvx-title>span:first-child{color:#69cfff;font-size:14px;white-space:nowrap;font-family:var(--fs)}
.tvx-title h2{margin:0;font-family:var(--fs);font-size:clamp(29px,4vw,49px);line-height:1.2;color:#fff2d3;
  text-shadow:0 3px #34261a,0 0 18px #eac27a7a;white-space:nowrap}
.tvx-title__rule{height:1px;flex:1;background:linear-gradient(90deg,#eac27a,transparent)}

/* ============ 1) ข้อมูลสด + ข้อมูลเซิร์ฟเวอร์ ============ */
.tvx-server{padding:10px 0 70px}
.tvx-server .tvx-l-land{z-index:-4;background:url(img/tv/titan-landscape.jpg) center top/cover no-repeat;opacity:.55}
.tvx-server .tvx-l-veil{z-index:-3;background:linear-gradient(180deg,#070B1A 0%,#06112166 16%,#061426c8 45%,#061426ee 88%,#070B1A 100%),
  radial-gradient(ellipse at 50% 15%,transparent 0%,#0208135e 82%)}
.tvx-server .tvx-l-energy{z-index:-2;background:url(img/tv/energy-lines.svg) center 40px/100% 540px no-repeat;opacity:.8;animation:tvx-pulse 7s ease-in-out infinite}
.tvx-server .tvx-l-particles{z-index:-1;background-image:radial-gradient(circle,#8bdbffbd 1px,transparent 2px),radial-gradient(circle,#e6bc78a3 1px,transparent 2px);
  background-size:197px 227px,317px 293px;background-position:14px 30px,104px 121px;
  -webkit-mask-image:linear-gradient(#0008,transparent 73%);mask-image:linear-gradient(#0008,transparent 73%);opacity:.55;animation:tvx-drift 24s linear infinite}

.tvx-live{display:grid;grid-template-columns:1.25fr repeat(3,1fr);align-items:stretch;min-height:134px;padding:17px 20px;overflow:hidden;
  background:#07182df0 url(img/tv/live-panel.svg) center/100% 100% no-repeat;border-color:#bd9152}
.tvx-live::before{content:"";position:absolute;left:22%;right:22%;top:-2px;height:2px;background:linear-gradient(90deg,transparent,#34ccff,#fff,#34ccff,transparent);
  box-shadow:0 0 18px #25bcff;animation:tvx-pulse 5s ease-in-out infinite}
.tvx-live__hd{align-self:center;padding:0 16px 0 24px}
.tvx-live__hd b{display:block;font-family:var(--fs);font-size:clamp(18px,2vw,25px);margin:7px 0 3px;color:#fff}
.tvx-live__hd small{font-size:12px;color:var(--tvx-mut)}
.tvx-badge{color:var(--tvx-teal);font-size:12px;letter-spacing:.18em;font-weight:900}
.tvx-badge i{display:inline-block;width:8px;height:8px;margin-right:5px;background:#4af4e9;border-radius:50%;box-shadow:0 0 6px 3px #28e9df90;animation:tvx-pulse 2s ease-in-out infinite}
.tvx-metric{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr auto;align-items:center;column-gap:13px;border-left:1px solid #3a699171;padding:16px 10px 16px 25px}
.tvx-metric__icon{grid-row:1/3;width:45px;height:45px;display:grid;place-items:center;border:1px solid currentColor;border-radius:50%;font-size:22px;background:#0b365061;box-shadow:0 0 20px currentColor}
.tvx-metric .num{font-family:var(--fs);font-weight:800;font-size:clamp(27px,3vw,40px);line-height:1;align-self:end;text-shadow:0 0 15px currentColor;font-variant-numeric:tabular-nums}
.tvx-metric .lab{font-size:12px;color:#c5d7e6;align-self:start}
.tvx-metric--teal{color:#63ebdd}.tvx-metric--gold{color:#f5c46d}.tvx-metric--blue{color:#55cfff}

.tvx-info{padding-top:46px}
.tvx-facts{display:grid;grid-template-columns:repeat(5,1fr);gap:13px}
.tvx-fact{min-height:111px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:15px;text-align:center;transition:transform .25s,box-shadow .25s}
.tvx-fact:hover,.tvx-feature:hover{transform:translateY(-4px);box-shadow:inset 0 0 0 1px #49aee36c,0 0 22px #20a2ed60,0 14px 35px #000a}
.tvx-fact__icon{color:#64d2fa;font-size:19px;line-height:1;margin-bottom:5px;text-shadow:0 0 13px #24b9fc}
.tvx-fact b{font-family:var(--fs);color:var(--tvx-gold-l);font-size:29px;font-weight:900;line-height:1.1}
.tvx-fact small{margin-top:4px;font-size:12px;color:#d8e6f0}
.tvx-features{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-top:17px}
.tvx-feature{min-height:170px;padding:20px 15px 17px;display:flex;align-items:flex-start;gap:12px;transition:transform .25s,box-shadow .25s}
.tvx-feature img{flex:none;filter:drop-shadow(0 0 12px #2ebaff70)}
.tvx-feature h3{font-size:17px;line-height:1.4;color:#fff1cb;margin:3px 0 8px}
.tvx-feature p{font-size:13px;line-height:1.65;color:#c1d6e8;margin:0}

/* ============ 2) หอเกียรติยศ ============ */
.tvx-hall{padding:64px 0 60px}
.tvx-hall .tvx-l-land{z-index:-4;background:#091329 url(img/tv/titan-landscape.jpg) center 38%/cover no-repeat;opacity:.31}
.tvx-hall .tvx-l-veil{z-index:-3;background:linear-gradient(180deg,#070B1A 0%,#11102ae8 22%,#080f21f5 100%),radial-gradient(ellipse at 50% 7%,#172b53c4,transparent 61%)}
.tvx-hall .tvx-l-aurora{z-index:-2;background:radial-gradient(ellipse at 50% 0%,#3d8ec837,transparent 42%),radial-gradient(circle at 10% 70%,#22a8cc0d,transparent 35%);animation:tvx-aurora 9s ease-in-out infinite}
.tvx-hd{margin-bottom:28px}
.tvx-hd__label{display:flex;align-items:center;gap:12px;margin:0 0 5px;color:var(--tvx-cyan);font-size:12px;letter-spacing:.21em;font-weight:900}
.tvx-hd__label span{color:var(--tvx-gold);font-size:17px}
.tvx-hd h2{margin:0;font-family:var(--fs);font-size:clamp(34px,4vw,54px);color:var(--tvx-gold-l);line-height:1.2;text-shadow:0 2px 0 #40240f,0 0 26px #e7bd796b}
.tvx-hd>p:last-child{margin:10px 0 0;color:#d3dff2;font-size:15px}

.tvx-panel{position:relative;border:1px solid #b39258;border-radius:9px;background:linear-gradient(145deg,#102543f0 0%,#102447f5 53%,#0b1731f5 100%);
  box-shadow:inset 0 1px 0 #b2d9ef36,inset 0 0 0 4px #09182a,0 18px 38px #02071585}
.tvx-panel::before{content:"";position:absolute;inset:6px;border:1px solid #3f74948c;border-radius:5px;pointer-events:none}
.tvx-panel::after{content:"";position:absolute;inset:0;pointer-events:none;background:url(img/tv/corners.svg) center/100% 100% no-repeat}

.tvx-champ{min-height:150px;display:flex;align-items:center;gap:20px;padding:25px 32px;margin-bottom:17px;overflow:hidden}
.tvx-champ__crest{width:91px;height:91px;flex:none;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle,#fff0bc 0%,#dba646 60%,#684023 100%);
  border:3px solid #e2bd7b;box-shadow:0 0 0 7px #ba884b38,0 0 25px #ffca6f5c;animation:tvx-crest 5s ease-in-out infinite}
.tvx-champ__who{min-width:0;display:flex;flex-direction:column;gap:5px;flex:1}
.tvx-champ__who small{font-size:13px;letter-spacing:.1em;color:#f9cd83;font-weight:900}
.tvx-champ__who b{font-family:var(--fs);font-size:clamp(22px,2.6vw,32px);color:#f8f9ff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tvx-champ__pts{text-align:right;display:grid;gap:3px;margin-left:auto;padding-left:22px}
.tvx-champ__pts b{font-family:var(--fs);color:var(--tvx-gold);font-size:clamp(28px,3vw,42px);font-weight:900;line-height:1.1;text-shadow:0 0 15px #ffc66870}
.tvx-champ__pts span{color:#e1e4f3;font-size:13px}

.tvx-ranks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch}
.tvx-rank{min-height:420px;padding:20px 20px 24px;overflow:hidden}
.tvx-rank__head{display:flex;gap:9px;align-items:center;min-height:45px}
.tvx-rank__head img{flex:none;filter:drop-shadow(0 0 7px #f0bf6194)}
.tvx-rank__head span{display:block;font-size:10px;color:var(--tvx-cyan);font-weight:700;letter-spacing:.15em}
.tvx-rank__head h3{margin:2px 0 0;font-family:var(--fs);color:#fff2cf;font-size:19px;line-height:1.35}
.tvx-rank__head h3 small{color:#ccdaf0;font-size:12px;font-weight:400;white-space:nowrap}
.tvx-rank__line{height:1px;margin:13px 0;background:linear-gradient(90deg,#e6b76f,#dcb66c80 65%,transparent)}
/* รายการที่ tl-site.js เติมเข้ามา: <li><span class="rk"><span class="nm">..<small></small></span><span class="pt"></li> */
.tvx-rank ol{margin:0;padding:0;list-style:none;counter-reset:none}
.tvx-rank li{position:relative;display:flex;align-items:center;gap:12px;min-height:34px;padding:4px 8px 4px 0;font-size:14px;border-bottom:1px solid #4361802e}
.tvx-rank li:hover{background:#60b8ed0d}
.tvx-rank li .rk{display:inline-grid;place-items:center;flex:none;width:24px;height:24px;border-radius:6px;background:#25354e;color:var(--tvx-gold);font-weight:900;font-size:12px}
.tvx-rank li:first-child .rk{color:#321b0d;background:linear-gradient(#fff8d8,#f5c76c 67%,#c88634);box-shadow:0 0 13px #f5c36a55}
.tvx-rank li .nm{display:grid;gap:2px;flex:1;min-width:0;color:#f4f6fc;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tvx-rank li .nm small{color:#9db4d1;font-size:11px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tvx-rank li .pt{color:var(--tvx-cyan);font-size:14px;font-weight:800;margin-left:auto;white-space:nowrap;text-shadow:0 0 10px #30bdff57;font-variant-numeric:tabular-nums}
.tvx-rank li.empty{display:grid;place-items:center;align-content:center;min-height:260px;gap:10px;border:0;color:#95aac4;font-size:14px;text-align:center}
.tvx-rank li.empty::before{content:"◇";display:grid;place-items:center;width:78px;height:78px;border-radius:50%;border:1px solid #537b8a8c;
  background:#0b2439;color:#65ccd6;font-size:39px;box-shadow:0 0 25px #0aaadd21}
.tvx-hall__foot{margin:23px 0 0;text-align:center;color:#89add0;font-size:13px}

/* ============ 3) เริ่มเล่นใน 4 ขั้นตอน ============ */
.tvx-start{padding:40px 0 80px}
.tvx-start .tvx-l-land{z-index:-4;background:#071429 url(img/tv/titan-landscape.jpg) center/cover no-repeat;opacity:.37}
.tvx-start .tvx-l-veil{z-index:-3;background:linear-gradient(180deg,#080f21 0%,#09142ae4 30%,#09142ae4 70%,#070B1A 100%),radial-gradient(ellipse at 50% 43%,#18376365,transparent 68%)}
.tvx-start .tvx-l-energy{z-index:-2;background:url(img/tv/rift-light.svg) center/cover no-repeat;opacity:.7;animation:tvx-pulse 8s ease-in-out infinite}
.tvx-guide{width:min(var(--maxw,1200px) - 72px,calc(100% - 2*clamp(16px,4vw,36px)));margin:0 auto;position:relative;overflow:hidden;border:1px solid #d2a366;border-radius:22px;
  background:linear-gradient(148deg,#112447f5 0%,#0e1c37f5 53%,#0b132bf7 100%);padding:43px 45px 36px;
  box-shadow:0 27px 75px #000a,inset 0 0 0 5px #091a2e,inset 0 0 0 6px #458caf6b}
.tvx-guide::before{content:"";position:absolute;inset:0;background:url(img/tv/guide-corners.svg) center/100% 100% no-repeat;pointer-events:none}
.tvx-guide::after{content:"";position:absolute;top:0;left:18%;right:18%;height:2px;background:linear-gradient(90deg,transparent,#49d9ff,#f7ebbd,#49d9ff,transparent);box-shadow:0 0 18px #1fbafa;pointer-events:none}
.tvx-guide__mark{position:absolute;right:25px;top:-35px;color:#4e709a19;font:900 260px 'Noto Serif SC',Georgia,serif;pointer-events:none;line-height:1}
.tvx-guide__head{position:relative;margin-bottom:34px}
.tvx-guide__head .tvx-eb{margin:0 0 8px;color:#5ad5ff;font-size:12px;letter-spacing:.19em;font-weight:900}
.tvx-guide__head .tvx-eb span{color:var(--tvx-gold);margin:0 7px}
.tvx-guide__head h2{font-family:var(--fs);font-size:clamp(34px,4.2vw,55px);line-height:1.18;margin:0;color:#fff3cf;text-shadow:0 3px 0 #452e1f,0 0 20px #e5bf6955}
.tvx-guide__head>p:last-child{margin:10px 0 0;font-size:15px;color:#d2e5f4}
.tvx-steps{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;list-style:none;margin:0;padding:0 0 31px}
.tvx-steps::before{content:"";position:absolute;left:9%;right:9%;top:73px;height:2px;background:linear-gradient(90deg,#4dc9f6,#edbd6a,#50e2d7,#f3c77a);box-shadow:0 0 11px #23bfff99}
.tvx-step{position:relative;min-height:275px;overflow:hidden;padding:16px 18px 20px;border:1px solid #4a719479;border-radius:11px;
  background:linear-gradient(155deg,#142d50e8,#0a1b37f2 72%);box-shadow:inset 0 1px #90daff23,0 11px 25px #0005;transition:transform .25s,border-color .25s,box-shadow .25s}
.tvx-step:hover{transform:translateY(-6px);border-color:#80d8f5;box-shadow:inset 0 1px #a9e9ff57,0 0 25px #1abaf04d,0 16px 30px #0006}
.tvx-step::after{content:"";position:absolute;inset:5px;border:1px solid #6a9cc233;border-radius:7px;pointer-events:none}
.tvx-step__num{position:absolute;right:11px;top:2px;color:#ffdfa17a;font:900 62px Georgia,serif;line-height:1}
.tvx-step__icon{position:relative;display:grid;place-items:center;width:84px;height:84px;border:1px solid #64c6ef8c;border-radius:50%;
  background:radial-gradient(circle,#14587880,#0a2541 67%);box-shadow:0 0 0 5px #299ad321,0 0 27px #168bdd5c;margin:6px 0 19px}
.tvx-step__icon img{filter:drop-shadow(0 0 8px #33d2f8a1)}
.tvx-step h3{position:relative;margin:0 0 8px;font-family:var(--fs);color:#fff3cf;font-size:21px;line-height:1.3}
.tvx-step p{position:relative;margin:0;font-size:13.5px;line-height:1.7;color:#d0e0ef;min-height:63px;padding-bottom:18px}
.tvx-step__hint{position:absolute;left:18px;bottom:17px;color:#6bbfe3;font-size:9px;letter-spacing:.22em;font-weight:900}
.tvx-step--register .tvx-step__icon{border-color:#e5c079a1;background:radial-gradient(circle,#5a42218c,#122b48 68%)}
.tvx-step--play .tvx-step__icon{border-color:#6ae2d4a1;background:radial-gradient(circle,#16736985,#0c2c40 68%)}
.tvx-guide__foot{position:relative;display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:1px solid #77a9c27d;padding-top:23px}
.tvx-guide__foot::before{content:"";position:absolute;top:-2px;left:43%;width:14%;height:2px;background:linear-gradient(90deg,transparent,#6ce6ff,transparent);box-shadow:0 0 14px #2dcbff}
.tvx-guide__foot .tl-cta-row{display:flex;flex-wrap:wrap;gap:12px}
.tvx-guide__foot p{margin:0;color:#ffe0a3;font-size:14px;font-weight:700}
.tvx-guide__foot p span{color:#57d9f7}

@keyframes tvx-pulse{50%{opacity:.45;filter:brightness(1.35)}}
@keyframes tvx-drift{to{background-position:74px -197px,244px -172px}}
@keyframes tvx-aurora{50%{opacity:.6;filter:hue-rotate(12deg)}}
@keyframes tvx-crest{50%{box-shadow:0 0 0 7px #ba884b66,0 0 35px #ffdc99a3}}

@media (max-width:1080px){
  .tvx-inner{width:min(960px,calc(100% - 36px))}
  .tvx-live{grid-template-columns:repeat(3,1fr)}
  .tvx-live__hd{grid-column:1/-1;text-align:center;padding:4px 0 15px}
  .tvx-metric:nth-child(2){border-left:0}
  .tvx-features{grid-template-columns:repeat(2,1fr)}
  .tvx-feature{min-height:140px}
  .tvx-guide{padding:35px 29px 30px}
  .tvx-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tvx-steps::before{display:none}
  .tvx-step{min-height:235px}
  .tvx-guide__foot{align-items:flex-start;flex-direction:column}
}
@media (max-width:900px){
  .tvx-ranks{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tvx-rank--players{grid-column:1/-1}
  .tvx-rank{min-height:320px}
}
@media (max-width:640px){
  .tvx-inner,.tvx-hall .tvx-inner{width:calc(100% - 26px)}
  .tvx-live{grid-template-columns:1fr 1fr;padding:13px 10px}
  .tvx-metric{padding:12px 6px;column-gap:7px;border-top:1px solid #3a699171}
  .tvx-metric__icon{width:31px;height:31px;font-size:16px}
  .tvx-metric .num{font-size:25px}
  .tvx-metric:last-child{grid-column:1/-1;border-left:0;justify-content:center}
  .tvx-info{padding-top:30px}
  .tvx-title{gap:8px;flex-wrap:wrap}
  .tvx-title h2{white-space:normal}
  .tvx-title__rule{display:none}
  .tvx-facts{grid-template-columns:repeat(2,1fr);gap:9px}
  .tvx-facts .tvx-fact:last-child{grid-column:1/-1}
  .tvx-features{grid-template-columns:1fr;gap:10px}
  .tvx-feature{min-height:0}
  .tvx-feature img{width:64px;height:64px}
  .tvx-hall{padding:40px 0}
  .tvx-champ{gap:12px;min-height:120px;padding:19px 14px}
  .tvx-champ__crest{width:64px;height:64px}
  .tvx-champ__crest img{width:52px;height:52px}
  .tvx-champ__pts{padding-left:0}
  .tvx-champ__pts b{font-size:24px}
  .tvx-champ__who small{font-size:11px}
  .tvx-ranks{grid-template-columns:1fr}
  .tvx-rank--players{grid-column:auto}
  .tvx-rank{min-height:0}
  .tvx-rank li.empty{min-height:170px}
  .tvx-guide{width:calc(100% - 24px);padding:26px 15px 23px;border-radius:14px}
  .tvx-guide__mark{font-size:140px;right:0;top:0}
  .tvx-guide__head .tvx-eb{font-size:10px;letter-spacing:.09em}
  .tvx-steps{grid-template-columns:1fr;gap:12px;padding-bottom:20px}
  .tvx-step{min-height:0;padding:15px 14px 18px 94px}
  .tvx-step__num{font-size:47px}
  .tvx-step__icon{position:absolute;top:22px;left:16px;width:61px;height:61px}
  .tvx-step__icon img{width:48px;height:48px}
  .tvx-step h3{font-size:18px;padding-right:25px}
  .tvx-step p{font-size:13px;min-height:0;padding-bottom:0}
  .tvx-step__hint{display:none}
  .tvx-guide__foot .tl-cta-row{width:100%}
  .tvx-guide__foot .tl-btn{flex:1 1 135px;justify-content:center}
}
@media (prefers-reduced-motion:reduce){
  .tvx *,.tvx *::before,.tvx *::after,.tvx-layer{animation:none!important;transition-duration:.01ms!important}
}
