/* -------------------------------------------------------------
  Floating Monsters (Download Section) Styling & Effects
------------------------------------------------------------- */

/* ฝั่งซ้าย */
.download-monster-left {
    position: absolute;
    top: 60px;   /* ปรับตำแหน่ง สูง/ต่ำ ได้ที่นี่ */
    left: -60px; /* ปรับตำแหน่ง ซ้าย/ขวา ได้ที่นี่ */
    width: 180px;  /* ขนาดความกว้าง */
    height: 180px; /* ขนาดความสูง */
    z-index: 30;
    pointer-events: none;
    animation: monsterFloatLeft 4s ease-in-out infinite alternate;
}

.download-monster-left img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scaleX(-1); /* กลับหน้าหันเข้าด้านใน */
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 40px rgba(157, 78, 221, 0.9));
}

/* ฝั่งขวา */
.download-monster-right {
    position: absolute;
    top: 410px;    /* ปรับตำแหน่ง สูง/ต่ำ ได้ที่นี่ */
    right: -300px; /* ปรับตำแหน่ง ซ้าย/ขวา ได้ที่นี่ */
    width: 350px;   /* ขนาดความกว้าง */
    height: 350px;  /* ขนาดความสูง */
    z-index: 30;
    pointer-events: none;
    animation: monsterFloatRight 4s ease-in-out infinite alternate;
}

.download-monster-right img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 40px rgba(157, 78, 221, 0.9));
}

@keyframes monsterFloatLeft {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(-4deg); }
}

@keyframes monsterFloatRight {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(4deg); }
}

.monster-glow {
    position: absolute;
    inset: 15px;
    background: radial-gradient(circle, rgba(255,215,0,0.35) 0%, rgba(157,78,221,0.25) 60%, transparent 80%);
    border-radius: 50%;
    filter: blur(15px);
    z-index: -1;
    animation: monsterGlowPulse 2.5s ease-in-out infinite alternate;
}

@keyframes monsterGlowPulse {
    0% { transform: scale(0.85); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 0.9; }
}

/* กำหนดให้ซ่อนรูปมอนสเตอร์ทั้งสองฝั่งทันทีเมื่อเปิดผ่านมือถือ */
@media (max-width: 768px) {
    .download-monster-left,
    .download-monster-right {
        display: none !important;
    }
}
	/* -------------------------------------------------------------
  Floating Monster Top-Left (Hall of Fame) Styling & Effects
------------------------------------------------------------- */
.rank-floating-monster {
    position: absolute;
    top: 110px;   /* ปรับตำแหน่ง สูง/ต่ำ ได้ที่นี่ (ติดขอบบนซ้าย) */
    left: -30px;  /* ปรับตำแหน่ง ซ้าย/ขวา ได้ที่นี่ */
    width: 180px;  /* ปรับขนาดความกว้าง */
    height: 180px; /* ปรับขนาดความสูง */
    z-index: 30;
    pointer-events: none;
    animation: monsterFloatingLeft 4s ease-in-out infinite alternate;
}

.rank-floating-monster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scaleX(-1); /* กลับหน้า (Flip Horizontal) ให้หันไปอีกฝั่ง */
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 40px rgba(157, 78, 221, 0.9));
    transition: transform 0.3s ease;
}

.rank-floating-monster:hover img {
    transform: scaleX(-1) scale(1.12) rotate(-6deg);
}

@keyframes monsterFloatingLeft {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(4deg); }
}

.monster-glow {
    position: absolute;
    inset: 15px;
    background: radial-gradient(circle, rgba(255,215,0,0.35) 0%, rgba(157,78,221,0.25) 60%, transparent 80%);
    border-radius: 50%;
    filter: blur(15px);
    z-index: -1;
    animation: monsterGlowPulse 2.5s ease-in-out infinite alternate;
}

@keyframes monsterGlowPulse {
    0% { transform: scale(0.85); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 0.9; }
}

/* กำหนดให้ซ่อนรูปมอนสเตอร์นี้ทันทีเมื่อเปิดผ่านมือถือ */
@media (max-width: 768px) {
    .rank-floating-monster {
        display: none !important;
    }
}
	/* CSS (นำไปวางเพิ่มในแท็ก <style>) */
.news-floating-monster {
    position: absolute;
    top: 110px;   /* สามารถปรับตำแหน่ง สูง/ต่ำ ได้ที่นี่ */
    right: -30px;  /* สามารถปรับตำแหน่ง ซ้าย/ขวา ได้ที่นี่ */
    width: 180px;  /* ปรับขนาดความกว้างของรูปมอนสเตอร์ */
    height: 180px; /* ปรับขนาดความสูงของรูปมอนสเตอร์ */
    z-index: 30;
    pointer-events: none;
    animation: monsterFloating 4s ease-in-out infinite alternate;
}

.news-floating-monster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 40px rgba(157, 78, 221, 0.9));
    transition: transform 0.3s ease;
}

.news-floating-monster:hover img {
    transform: scale(1.12) rotate(6deg);
}

@keyframes monsterFloating {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(-4deg); }
}

.monster-glow {
    position: absolute;
    inset: 15px;
    background: radial-gradient(circle, rgba(255,215,0,0.35) 0%, rgba(157,78,221,0.25) 60%, transparent 80%);
    border-radius: 50%;
    filter: blur(15px);
    z-index: -1;
    animation: monsterGlowPulse 2.5s ease-in-out infinite alternate;
}

@keyframes monsterGlowPulse {
    0% { transform: scale(0.85); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 0.9; }
}

/* กำหนดให้ซ่อนรูปมอนสเตอร์นี้ทันทีเมื่อเปิดผ่านมือถือ */
@media (max-width: 768px) {
    .news-floating-monster {
        display: none !important;
    }
}
	/* CSS */
.promo-floating-btn {
    position: fixed;
    left: 0;
    top: 45%;
    transform: translateY(-50%);
    z-index: 100;
    background: rgba(26, 0, 51, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-left: none;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    color: #ffffff;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 4px 0 25px rgba(157, 78, 221, 0.5);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.promo-floating-btn:hover {
    background: rgba(43, 0, 84, 0.95);
    border-color: rgba(255, 215, 0, 0.8);
    padding-left: 18px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}
.promo-btn-text {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffd700;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.promo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 2, 14, 0.85);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1rem;
}
.promo-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.promo-modal-card {
    position: relative;
    width: 100%;
    max-width: 750px;
    background: rgba(26, 0, 51, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(157, 78, 221, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.promo-modal-overlay.active .promo-modal-card {
    transform: scale(1) translateY(0);
}

.promo-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}
.promo-close-btn:hover {
    background: #ffd700;
    color: #1a0033;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.promo-slider-container {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.25);
    background: #0f021e;
}
.promo-slides-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.promo-slide-item {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.promo-slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.promo-slide-item:hover img {
    transform: scale(1.05);
}
.promo-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(to top, rgba(26,0,51,0.95), transparent);
    color: #ffffff;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.promo-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(26, 0, 51, 0.8);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}
.promo-slider-btn:hover {
    background: #ffd700;
    color: #1a0033;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}
.promo-slider-btn.prev { left: 15px; }
.promo-slider-btn.next { right: 15px; }

.promo-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.promo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
.promo-dot.active {
    background: #ffd700;
    width: 25px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

@media (max-width: 640px) {
    .promo-modal-card { padding: 1.25rem; }
    .promo-slider-container { height: 240px; }
    .promo-floating-btn { top: 45%; }
}
	/* -------------------------------------------------------------
  Halloween Theme Preloader Styling & Effects
------------------------------------------------------------- */
.halloween-preloader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #150228 0%, #05000a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    overflow: hidden;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* เมื่อโหลดเสร็จให้เพิ่มคลาสนี้เพื่อให้จางหายไป */
.halloween-preloader.fade-out {
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
}

/* ออร่าแสงแบ็คกราวด์ฮาโลวีน (ส้มผีดิบ + ม่วงแม่มด) */
.preloader-spooky-glow {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 102, 0, 0.25) 0%, rgba(138, 43, 226, 0.15) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    animation: spookyPulse 3s ease-in-out infinite alternate;
}

@keyframes spookyPulse {
    0% { transform: scale(0.85); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0.9; }
}

/* คอนเทนต์หลักตรงกลาง */
.preloader-content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 380px;
    z-index: 2;
}

/* กล่องโลโก้ */
.preloader-logo-box {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.preloader-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 15px rgba(255, 102, 0, 0.7)) drop-shadow(0 0 30px rgba(138, 43, 226, 0.8));
    animation: logoFloating 3s ease-in-out infinite;
}

@keyframes logoFloating {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

/* วงแหวนเวทมนตร์หมุนรอบโลโก้ (Magic Circle) */
.magic-circle-ring {
    position: absolute;
    inset: -15px;
    border: 2px dashed rgba(255, 138, 0, 0.6);
    border-radius: 50%;
    animation: spinRing 12s linear infinite;
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.4);
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ออร่าวิญญาณเรืองแสงด้านหลังโลโก้ */
.ghost-aura {
    position: absolute;
    inset: -5px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
    animation: auraPulse 2s ease-in-out infinite alternate;
}

@keyframes auraPulse {
    0% { transform: scale(0.9); opacity: 0.4; }
    100% { transform: scale(1.15); opacity: 0.8; }
}

/* ส่วนข้อความสถานะ */
.preloader-status-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.preloader-status-text {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.05em;
}

.preloader-percent-text {
    color: #ff7500;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 117, 0, 0.6);
}

/* หลอดโหลด (Progress Bar) แบบนีออนสไตล์ฮาโลวีน */
.preloader-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(25, 5, 45, 0.8);
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid rgba(255, 102, 0, 0.3);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff7500, #ffcc00, #9d4edd);
    border-radius: 9999px;
    box-shadow: 0 0 15px rgba(255, 117, 0, 0.9), 0 0 25px rgba(157, 78, 221, 0.8);
    transition: width 0.15s ease-out;
}
	/* -------------------------------------------------------------
  Special Eye-Catching Buttons (Discord & Top-up) Styling
------------------------------------------------------------- */

/* 1. ปุ่ม Discord Style */
.dock-item-discord {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.6);
    animation: discordGlow 3s ease-in-out infinite alternate;
}

.dock-item-discord:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 25px rgba(88, 101, 242, 0.9);
}

@keyframes discordGlow {
    0% { box-shadow: 0 0 8px rgba(88, 101, 242, 0.4); }
    100% { box-shadow: 0 0 20px rgba(88, 101, 242, 0.8), inset 0 0 6px rgba(255, 255, 255, 0.3); }
}

/* 2. ปุ่มเติมเงิน Style (สีทองเคลื่อนไหววิบวับดึงดูดสายตา) */
.dock-item-topup {
    background: linear-gradient(120deg, #ffd700, #ff3366, #ffae00, #ffd700);
    background-size: 300% 300%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    animation: topupShimmer 4s ease infinite, topupPulse 2s ease-in-out infinite alternate;
}

.dock-item-topup:hover {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 0 35px rgba(255, 51, 102, 0.9), 0 0 20px rgba(255, 215, 0, 0.9);
}

@keyframes topupShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes topupPulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.06); filter: brightness(1.2); }
}
		/* -------------------------------------------------------------
  Floating Server Rates Widget Styling
------------------------------------------------------------- */
.floating-rates-widget {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
}

/* Toggle Button ชิดขอบซ้าย */
.rates-toggle-btn {
    background: rgba(26, 0, 51, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-left: none;
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
    color: #ffffff;
    padding: 12px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 4px 0 25px rgba(157, 78, 221, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 52;
}

.rates-toggle-btn:hover {
    background: rgba(43, 0, 84, 0.95);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    padding-left: 14px;
}

.rates-btn-text {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffd700;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

/* Popup Card (ซ่อนไว้เป็นค่าเริ่มต้น) */
.rates-popup-card {
    position: absolute;
    left: 100%;
    margin-left: 12px;
    width: 250px;
    background: rgba(26, 0, 51, 0.92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(157, 78, 221, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-15px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 51;
}

/* เมื่อกดเปิด (เติมคลาส open ผ่าน JS) */
.floating-rates-widget.open .rates-popup-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
}

/* รองรับโทรศัพท์มือถือแบบ 100% (ให้อยู่ตรงกลางซ้ายจอเหมือน PC) */
@media (max-width: 640px) {
    .floating-rates-widget {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    .rates-popup-card {
        left: 100%;
        margin-left: 8px;
        width: 220px;
        max-width: calc(100vw - 55px); /* ป้องกันไม่ให้การ์ดล้นขอบจอมือถือ */
    }
    .rates-btn-text {
        display: none; /* บนจอมือถือซ่อนข้อความแนวตั้ง แสดงเฉพาะไอคอนเพื่อความกะทัดรัด */
    }
    .rates-toggle-btn {
        padding: 10px 10px;
        border-radius: 0 12px 12px 0;
    }
}
		/* -------------------------------------------------------------
  News Board Advanced Styling & Effects
------------------------------------------------------------- */
.news-tab-btn {
    background: rgba(26, 0, 51, 0.65);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: #a1a1aa;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-tab-btn:hover {
    border-color: rgba(255, 215, 0, 0.6);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.news-tab-btn.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffae00 100%) !important;
    color: #1a0033 !important;
    border-color: #ffd700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    font-weight: 800;
}

.news-tab-btn.active i {
    color: #1a0033 !important;
}

.news-row {
    transition: all 0.3s ease;
}

.news-row:hover {
    background: rgba(255, 255, 255, 0.05);
}
		/* -------------------------------------------------------------
  Registration Form Advanced Styling
------------------------------------------------------------- */
#registerForm input[type="text"],
#registerForm input[type="email"],
#registerForm input[type="password"] {
    background-color: rgba(26, 0, 51, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#registerForm input[type="text"]:focus,
#registerForm input[type="email"]:focus,
#registerForm input[type="password"]:focus {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3), inset 0 0 5px rgba(255, 215, 0, 0.2);
}

.gender-radio-card {
    background: rgba(26, 0, 51, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.gender-radio-card:hover {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(26, 0, 51, 0.9);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Custom Checkbox Accent */
#registerForm input[type="checkbox"] {
    accent-color: #ffd700;
}
		/* -------------------------------------------------------------
  Leaderboards & Rankings Advanced Styling
------------------------------------------------------------- */
.rank-tab-btn {
    background: rgba(26, 0, 51, 0.65);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: #ffffff;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rank-tab-btn:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.rank-tab-btn.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffae00 100%);
    color: #1a0033;
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    font-weight: 800;
}

.rank-tab-btn.active i {
    color: #1a0033 !important;
}

/* Panel Fade & Transition Animation */
.rank-panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.rank-panel.active {
    display: block;
    animation: panelFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes panelFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top 3 Highlight Rows */
.rank-row.top-1 {
    background: rgba(255, 215, 0, 0.08);
}

.rank-row.top-2 {
    background: rgba(157, 78, 221, 0.08);
}

.rank-row.top-3 {
    background: rgba(184, 134, 11, 0.05);
}
		/* -------------------------------------------------------------
  Modern Ticker Banner Styling & Effects
------------------------------------------------------------- */
.modern-ticker-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(26, 0, 51, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(157, 78, 221, 0.2);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 30;
}

.modern-ticker-wrapper:hover {
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 15px 35px rgba(157, 78, 221, 0.4), 0 0 25px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

/* Badge สถานะซ้ายสุด */
.ticker-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    z-index: 2;
    background: rgba(26, 0, 51, 0.9);
    padding-right: 0.25rem;
}

.ticker-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 0.75rem;
    flex-shrink: 0;
}

/* คอนเทนเนอร์ข้อความวิ่ง */
.ticker-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    flex-grow: 1;
    cursor: pointer;
}

.ticker-track {
    display: flex;
    gap: 2.5rem;
    white-space: nowrap;
    width: max-content;
    animation: scrollTicker 20s linear infinite;
}

/* เมื่อเอาเมาส์วางให้หยุดวิ่งทันที */
.ticker-container:hover .ticker-track {
    animation-play-state: paused;
}

/* สไตล์ข้อความแต่ละตัวพร้อมเอฟเฟกต์โฮเวอร์ */
.ticker-item {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff3a0;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.ticker-item:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.9), 0 0 20px rgba(157, 78, 221, 0.8);
    transform: scale(1.03);
}

/* แอนิเมชันวิ่งวนลูป */
@keyframes scrollTicker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ปุ่มปิดซ่อน (Close Button) */
.ticker-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
    z-index: 2;
}

.ticker-close-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #ffffff;
    transform: scale(1.15);
}

/* เอฟเฟกต์ตอนกดปิด (Fade & Zoom Out) */
.modern-ticker-wrapper.closing {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
    pointer-events: none;
    transition: all 0.4s ease;
}

/* รองรับมือถือ 100% */
@media (max-width: 640px) {
    .modern-ticker-wrapper {
        max-width: 92vw;
        padding: 0.4rem 0.75rem;
    }
    .ticker-track {
        animation-duration: 16s; /* ปรับความเร็วมือถือให้สมูทขึ้น */
    }
}
		/* Logo Dynamic Styling & Modern Effects */
        .ro-logo-wrapper {
            width: var(--logo-size);
            height: var(--logo-size);
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: width 0.3s ease, height 0.3s ease;
            perspective: 1000px;
            cursor: pointer;
        }

        .ro-logo-glow {
            width: 100%;
            height: 100%;
            object-fit: contain;
            position: relative;
            z-index: 2;
            filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 50px rgba(157, 78, 221, 0.8));
            animation: logoPulse 4s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
            transition: filter 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .ro-logo-wrapper:hover .ro-logo-glow {
            transform: scale(1.08) rotateX(5deg) rotateY(-5deg);
            filter: drop-shadow(0 0 35px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 70px rgba(157, 78, 221, 0.9)) brightness(1.15);
        }

        @keyframes logoPulse {
            0% { 
                transform: scale(1) rotate(0deg); 
                filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 40px rgba(157, 78, 221, 0.6)); 
            }
            100% { 
                transform: scale(1.05) rotate(1deg); 
                filter: drop-shadow(0 0 35px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 70px rgba(157, 78, 221, 0.9)); 
            }
        }

        /* ออร่าแสงนีออนเสริมด้านหลัง */
        .logo-glow-orb {
            position: absolute;
            inset: -15px;
            background: radial-gradient(circle, rgba(255,215,0,0.3) 0%, rgba(157,78,221,0.2) 50%, transparent 70%);
            border-radius: 50%;
            filter: blur(15px);
            z-index: 1;
            animation: pulseGlow 3s ease-in-out infinite alternate;
        }

        @keyframes pulseGlow {
            0% { transform: scale(0.9); opacity: 0.5; }
            100% { transform: scale(1.15); opacity: 0.9; }
        }

        /* วงแหวนโฮโลแกรมหมุนรอบโลโก้ */
        .logo-hologram-ring {
            position: absolute;
            inset: -8px;
            border: 2px dashed rgba(255, 215, 0, 0.5);
            border-radius: 50%;
            z-index: 1;
            animation: spinRing 20s linear infinite;
        }

        @keyframes spinRing {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* เงาสะท้อนพื้นกระจกด้านล่าง */
        .logo-reflection {
            position: absolute;
            bottom: -18px;
            width: 80%;
            height: 8px;
            background: radial-gradient(ellipse at center, rgba(157, 78, 221, 0.5) 0%, transparent 70%);
            filter: blur(5px);
            z-index: 0;
            transform: scaleY(0.4);
        }
        :root {
            --logo-size: 150px;
        }

        /* Smooth Hide Scrollbars */
        ::-webkit-scrollbar {
            display: none;
        }
        html, body {
            -ms-overflow-style: none;
            scrollbar-width: none;
            overflow: hidden;
            background-color: #0f021e;
            color: #ffffff;
            font-family: 'Plus Jakarta Sans', sans-serif;
            user-select: none;
        }

        /* Full page snap container */
        .snap-container {
            height: 100vh;
            width: 100vw;
            overflow: hidden;
            position: relative;
        }

        /* Section Fade & Zoom Transitions */
        .ro-section {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            opacity: 0;
            visibility: hidden;
            transform: scale(0.92) translateY(40px);
            transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 10;
            pointer-events: none;
        }

        .ro-section.active {
            opacity: 1;
            visibility: visible;
            transform: scale(1) translateY(0);
            z-index: 20;
            pointer-events: auto;
        }

        .ro-section.exit-up {
            opacity: 0;
            transform: scale(1.08) translateY(-50px);
        }

        .ro-section.exit-down {
            opacity: 0;
            transform: scale(0.9) translateY(60px);
        }

        /* Canvas background styling */
        #bg-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 1;
            pointer-events: none;
        }

        /* Logo Dynamic Styling */
        .ro-logo-wrapper {
            width: var(--logo-size);
            height: var(--logo-size);
            position: relative;
            transition: width 0.3s ease, height 0.3s ease;
        }

        .ro-logo-glow {
            filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 50px rgba(157, 78, 221, 0.8));
            animation: logoPulse 4s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
        }

        @keyframes logoPulse {
            0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 40px rgba(157, 78, 221, 0.6)); }
            100% { transform: scale(1.05) rotate(1deg); filter: drop-shadow(0 0 35px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 70px rgba(157, 78, 221, 0.9)); }
        }

        /* Gold Shimmer Button Effect */
        .btn-gold-shimmer {
            background: linear-gradient(135deg, #ffd700 0%, #ffae00 50%, #b8860b 100%);
            background-size: 200% 200%;
            transition: all 0.4s ease;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
            position: relative;
            overflow: hidden;
        }

        .btn-gold-shimmer::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.6), transparent);
            transform: rotate(30deg) translateY(-100%);
            transition: all 0.7s ease;
        }

        .btn-gold-shimmer:hover::before {
            transform: rotate(30deg) translateY(100%);
        }

        .btn-gold-shimmer:hover {
            box-shadow: 0 0 35px rgba(255, 215, 0, 0.8);
            transform: translateY(-2px);
        }

        /* Glassmorphism Cards */
        .glass-card {
            background: rgba(26, 0, 51, 0.65);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 215, 0, 0.2);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .glass-card:hover {
            border-color: rgba(255, 215, 0, 0.6);
            box-shadow: 0 15px 35px rgba(157, 78, 221, 0.3), 0 0 15px rgba(255, 215, 0, 0.3);
            transform: translateY(-4px);
        }

        /* White Top Nav Floating Glass */
        .white-nav-glass {
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(12px);
            box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 215, 0, 0.3);
        }

        /* Text Gold Gradient */
        .text-gold-gradient {
            background: linear-gradient(135deg, #fff3a0 0%, #ffd700 50%, #ffae00 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* Glowing Custom Cursor Light */
        #cursor-glow {
            position: fixed;
            width: 350px;
            height: 350px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(157, 78, 221, 0.25) 0%, rgba(255, 215, 0, 0.08) 40%, rgba(0,0,0,0) 70%);
            pointer-events: none;
            transform: translate(-50%, -50%);
            z-index: 2;
            transition: width 0.3s, height 0.3s;
        }

        /* Quick Dock Pop Menu - Responsive Positioning */
        .pop-menu-dock {
            position: fixed;
            right: 1.5rem;
            top: 50%;
            transform: translateY(-50%);
            z-index: 40;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @media (max-width: 768px) {
            .pop-menu-dock {
                right: 50%;
                top: auto;
                bottom: 1.25rem;
                transform: translateX(50%);
            }
        }

        /* Dock Collapsed state */
        .pop-menu-dock.collapsed .dock-content {
            opacity: 0;
            pointer-events: none;
            transform: scale(0.8);
        }

        /* 3D Tilt Card Container */
        .tilt-card {
            transform-style: preserve-3d;
            perspective: 1000px;
        }