
body {
    background: #2a0000;
    background-image: url('img/dragon_bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    font-family: 'Kanit', sans-serif;
    color: #fff;
}


body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55); 
    backdrop-filter: blur(2px);       
    pointer-events: none;
    z-index: -1;
}



.ranking-card {
    background: rgba(20, 0, 0, 0.7);
    border: 2px solid rgba(255, 200, 0, 0.4);
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.45);
}

.ranking-card {
    background: rgba(20, 0, 0, 0.75);
    border-radius: 20px;
    padding: 35px;
    margin: 50px auto;
    max-width: 950px;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.3);
    border: 2px solid rgba(255, 30, 30, 0.4);
    backdrop-filter: blur(4px);
}

h2 {
    font-family: 'Bebas Neue', cursive;
    font-size: 3em;
    letter-spacing: 2px;
    text-shadow: 0 0 18px rgba(255, 60, 60, 0.9);
}

table, thead, tbody, th, td {
    background-color: rgba(30, 0, 0, 0.8) !important;
    border-color: #661111 !important;
    color: white !important;
    text-align: center;
}

th {
    background: linear-gradient(to right, #ff3b3b, #ff0000);
    color: #fff !important;
    font-size: 1.1em;
    text-shadow: 0 0 6px rgba(0,0,0,0.6);
}

tr:hover td {
    background-color: rgba(255, 0, 0, 0.15) !important;
    box-shadow: inset 0 0 12px rgba(255, 0, 0, 0.4);
    transition: 0.2s;
}
tr:hover {
    transform: scale(1.01);
    transition: 0.2s;
}


.rank-1 {
    background: linear-gradient(90deg, #ffd700, #ffea00) !important;
    color: #000 !important;
    box-shadow: 0 0 15px gold;
}
.rank-2 {
    background: linear-gradient(90deg, #d8d8d8, #f1f1f1) !important;
    color: #000 !important;
    box-shadow: 0 0 15px silver;
}
.rank-3 {
    background: linear-gradient(90deg, #cd7f32, #b56a2b) !important;
    color: #000 !important;
    box-shadow: 0 0 15px #cd7f32;
}

.rank-top5 td {
    font-size: 1.2em;
    font-weight: bold;
    letter-spacing: 0.5px;
}


.glow-text {
    animation: glow 2s infinite;
    font-weight: bold;
}
@keyframes glow {
    0%   { text-shadow: 0 0 6px #ff9999; }
    50%  { text-shadow: 0 0 18px #ff3333; }
    100% { text-shadow: 0 0 6px #ff9999; }
}


@keyframes galaxyGlow {
  0% { background-position: 0% 50%; text-shadow: 0 0 6px #b478ff; }
  50% { background-position: 100% 50%; text-shadow: 0 0 14px #d8b0ff; }
  100% { background-position: 0% 50%; text-shadow: 0 0 6px #b478ff; }
}
.galaxy-text {
  font-weight: bold;
  background: linear-gradient(90deg, #7f00ff, #aa66ff, #ff77ee);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: galaxyGlow 7s ease-in-out infinite;
}

.detail-box {
    background: rgba(50, 0, 0, 0.65);
    border-left: 4px solid #ff2b2b;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.4);
}

.back-link a {
    color: #ff7777;
    text-decoration: none;
    font-weight: bold;
}
.back-link a:hover {
    color: #ff2222;
    text-shadow: 0 0 10px red;
}

.table-responsive {
    overflow: hidden !important;
}

.table-responsive::-webkit-scrollbar {
    height: 0 !important;
    display: none !important;
}

table::-webkit-scrollbar {
    height: 0 !important;
    display: none !important;
}

table {
    width: 100% !important;
    table-layout: fixed;
}
.chinese-gate {
    position: relative;
    width: 100%;
    text-align: center;
    z-index: 10;
    margin-top: 0;
    
}

.chinese-gate img {
    width: 1130px;             
    max-width: 95%;           
    opacity: 1;
    filter: drop-shadow(0 0 35px rgba(255, 200, 80, 0.55));
    transform: translateY(80px); 
}
/* container */
.fire-wrap {
    position: relative;
    width: 100%;
    text-align: center;
    margin: 10px 0 30px;
    pointer-events: none; /* ป้องกันการคลิก/เลือก */
  }
  
  /* title (เดิม) — ให้เป็น centered */
  .fire-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffd86b;
    margin: 0 auto;
    display: inline-block;
    position: relative;
    z-index: 6;
    text-shadow:
      0 0 8px #ff8800,
      0 0 12px #ff5500,
      0 0 20px #ff2200,
      0 0 35px rgba(255, 80, 0, 0.7);
    animation: fireGlow 1.4s infinite ease-in-out alternate,
               fireFlicker 0.12s infinite linear;
    user-select: none;
  }
  
  /* soft rising glow/flare under the text */
  .fire-title::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 120%;
    height: 34px;
    background: radial-gradient(ellipse at center,
        rgba(255,150,40,0.55) 0%,
        rgba(255,80,0,0.28) 40%,
        rgba(0,0,0,0) 70%);
    filter: blur(8px);
    z-index: 4;
    opacity: 0.95;
    animation: flarePulse 1.6s infinite ease-in-out;
  }
  
  /* small quick skew for flicker */
  @keyframes fireFlicker {
    0%   { transform: skewX(1deg); }
    50%  { transform: skewX(-1deg); }
    100% { transform: skewX(1deg); }
  }
  @keyframes fireGlow {
    0% {
      text-shadow:
        0 0 6px #ff7700,
        0 0 12px #ff5500,
        0 0 18px #ff2200,
        0 0 25px rgba(255, 90, 0, 0.8);
      color: #ffe38e;
    }
    100% {
      text-shadow:
        0 0 12px #ff9933,
        0 0 20px #ff6600,
        0 0 28px #ff3300,
        0 0 45px rgba(255, 60, 0, 0.95);
      color: #fff3aa;
    }
  }
  @keyframes flarePulse {
    0%   { transform: translateX(-50%) translateY(2px) scaleX(0.98); opacity: .9; }
    50%  { transform: translateX(-50%) translateY(-2px) scaleX(1.02); opacity: 1; }
    100% { transform: translateX(-50%) translateY(2px) scaleX(0.98); opacity: .9; }
  }
  
  /* EMBERS — container for particles */
  .embers {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -6px;    /* จุดเริ่มต้นที่ใต้ข้อความ */
    width: 360px;    /* ปรับความกว้างกลุ่มละอองไฟ */
    height: 160px;   /* ระยะสูงสุดที่ละอองจะขึ้น */
    overflow: visible;
    z-index: 3;
    pointer-events: none;
  }
  
  /* แต่ละเม็ดไฟ (span) จะถูกสร้างด้วย JS */
  .embers span {
    position: absolute;
    bottom: 0;
    display: block;
    border-radius: 50%;
    filter: blur(0.4px);
    transform-origin: center bottom;
    opacity: 0;
    mix-blend-mode: screen;
    will-change: transform, opacity;
    background: radial-gradient(circle at 30% 30%,
                rgba(255,255,200,0.98) 0%,
                rgba(255,180,60,0.95) 30%,
                rgba(255,90,10,0.85) 60%,
                rgba(255,20,0,0.0) 100%);
    animation-name: emberRise;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
  
  /* animation: ลอยขึ้น + จาง + ไหลเอียง */
  @keyframes emberRise {
    0% {
      opacity: 0;
      transform: translateY(0) scale(1) translateX(0);
      filter: blur(0.4px) saturate(1.0);
    }
    10% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translateY(-120px) scale(0.6) translateX(var(--drift, 0px));
      filter: blur(1.8px) saturate(1.2);
    }
  }
  
  /* responsive: ถ้ากล่องเล็กลง ให้ลดความกว้างของ ember container */
  @media (max-width: 480px) {
    .embers { width: 220px; height: 120px; bottom: -2px; }
    .fire-title { font-size: 1.6rem; }
  }
  