html {
    scroll-behavior: smooth;
}

/* body {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    overflow-x: hidden;

    background:
        url("/assets/images/9171855c-7bb7-40a2-b9f1-778bada20a55.png") center top no-repeat,
        radial-gradient(circle, #8a9da5 0%, #41494d 100%);

    background-size: cover, cover;
} */

body {
    background: none;
}

/* ❗ wrapper ห้าม fix ความสูง */
.main-wrapper {
    position: relative;
    width: 100%;
    height: auto;
}

.content-center {
    background-image: url("/assets/images/bg-main2.png");
    background-size: cover;
    background-repeat: no-repeat;

    /* จัดให้นางเอกอยู่ขวาสวยๆ */
    background-position: 70% center;

    width: 100%;
    min-height: 100vh;
}

.news-section {
    background: linear-gradient(
        to bottom,
        #a7d8ff 0%,      /* ฟ้าอ่อน */
        #cfeeff 40%,     /* ฟ้าอ่อนมาก */
        #fdfbfc 100%     /* ขาวอมชมพู */
    );
    background-attachment: fixed;
    /* background-image: url("/assets/images/bg-main1.png"); */
    background-position: center 20%;
    background-size: cover;
    background-repeat: no-repeat;

    padding-top: 80px;   /* 👈 ดันทุกอย่างลง แต่ยังอยู่บนพื้นหลัง */
    padding-bottom: 80px;
}

.content-center,
.news-section {
    min-height: 100vh;
    background-repeat: no-repeat;
    background-size: cover;
}

.character-section{
    position: relative;
    pointer-events: auto;
}

.character-section::before{
    content:"";
    position:absolute;
    inset:0;
    background-size:cover;
    background-position:center;
    opacity:0;
    transition:.6s ease;
    pointer-events: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Kanit', sans-serif; }

/* เมนูบน */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    padding: 18px 0;

    background: transparent;
    box-shadow: none;   /* 👈 เอาออก */
    background: transparent linear-gradient(to bottom, #0086f5 53%, #52b1fe00 100%);
}

/* .top-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent linear-gradient(to bottom, #0086f5 53%, #52b1fe00 100%);
  padding: 10px 0;
  position: fixed;
  top: 0;
  z-index: 9999;
  transition: all 0.3s ease;
} */

.top-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.nav-inner{
    max-width:1200px;
    margin:auto;
    padding:0 20px;

    display:flex;
    justify-content:space-between;
    align-items:center;
}

.nav-menu {
    display: flex;
    gap: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 8px 18px;
    border-radius: 18px;

    background-color: #1e293b;
    color: rgb(255, 255, 255);
    text-decoration: none;
    font-weight: 500;

    transition: 0.25s ease;
    backdrop-filter: blur(6px);
}

/* hover */
.nav-item:hover {
    transform: translateY(-2px);
    background: #415980;
}

.nav-right button {
    padding: 8px 25px;
    border-radius: 20px;
    border: none;
    margin-left: 10px;
    cursor: pointer;
    font-weight: bold;
}

.btn-login {
    background: #0047e0;   /* ฟ้า bootstrap */
    color: white;
    transition: 0.25s ease;
}
.btn-login:hover {
    background: #007be0;
}

.btn-pre { 
    background: #28a745;   /* เขียวมาตรฐาน */
    color: white;
    transition: 0.25s ease;
}

.nav-right button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ตัวละครและปราสาท (Position Absolute) */
.character-left {
    position: absolute;
    left: -50px;
    bottom: 50px;
    height: 90%;
    z-index: 5;
}

.character-left img { height: 100%; }

.castle-right {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 400px;
    height: 600px;
    background: url('/castle.png') no-repeat bottom right;
    background-size: contain;
    z-index: 1;
}

/* เนื้อหาตรงกลาง */
.content-center {
    position: relative;
    z-index: 6;
    text-align: center;
    margin-top: -60px;   /* ปรับตามความสูง nav */
    padding-top: 60px;
}

.main-title {
    font-family: "Kanit", "Times New Roman", serif;
    font-weight: 700;
    font-size: 120px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 4px;

    /* ไล่เฉดสีใหม่: ทองคำ (Metallic Gold) เน้นมิติและความหรูหรา */
    background: linear-gradient(
        to bottom,
        #FFFFFF 0%,         /* 1. บนสุด: ขาวประกาย (เหมือนแสงสะท้อน) */
        #FFFDE0 30%,        /* 2. สีเหลืองอ่อนมากๆ (Pale Gold) */
        #FFE082 45%,        /* 3. สีทองสว่างเริ่มชัด */
        
        /* --- ส่วนที่ทำให้ดูเป็นมิตินูนแบบโลหะ (Bevel Edge) --- */
        #C09647 48%,        /* 4. สีทองแดง (Satin Gold) เพิ่มความเข้มช่วงกลาง */
        #B5893F 50%,        /* 5. จุดตัด: เปลี่ยนเป็นทองเข้มแบบเหลืองหม่นเพื่อให้ดูคม */
        
        /* --- ช่วงสีเข้มลึก (Deep Gold Section) --- */
        #876610 70%,        /* 6. สีทองคราด (Antique Gold) */
        #5C450A 90%,        /* 7. สีน้ำตาลทองเข้ม (Dark Gold) */
        #3D2E07 100%        /* 8. ฐานสุดน้ำตาลเข้มเกือบดำ เพื่อสร้างมิติเงาลึกที่สุด */
    );
   
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* ขอบตัวอักษร: ปรับให้ขาวนวล (Off-White) เพื่อให้ตัดกับสีทองเข้ม */
    -webkit-text-stroke: 1.2px rgba(255, 255, 250, 0.7);

    /* ปรับเงา (Filter) ให้รับกับโทนสีทอง */
    filter:
        /* เงาชั้นแรก: สีน้ำตาลทองเข้มจัดช่วยให้ตัวอักษรดูหนา */
        drop-shadow(0px 3px 0px #3D2E07)
        /* เงาชั้นสอง: เงาดำฟุ้งกระจายให้ตัวอักษรลอยเด่น */
        drop-shadow(0px 5px 12px rgba(0, 0, 0, 0.55));
}

.counter-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 10px 36px;
    border-radius: 5px;

    background: linear-gradient(135deg, #7dbbff, #9b8cff);
    color: white;
    font-size: 24px;
    font-weight: 600;

    border: 2px solid rgba(255,255,255,0.7);

    box-shadow:
        inset 0 0 6px rgba(255,255,255,0.4),
        0 6px 15px rgba(0,0,0,0.25);
}

/* เน้นตัวเลข */
.counter-pill span {
    font-weight: 700;
    letter-spacing: 1px;
}

.counter-pill {
    position: relative;
}

.counter-pill::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #bfe4ff, #d3c6ff);
    z-index: -1;
    filter: blur(6px);
    opacity: 0.6;
}

.promo-text {
    padding-top: 30px;
    font-size: 26px;
    font-weight: 700;
    text-align: center;

    /* สีทอง */
    color: #ff00009a;

    /* แสงนิด ๆ ให้ดูสว่าง */
    text-shadow:
        0 0 3px rgba(255,255,255,0.9),
        0 0 6px rgba(255,255,255,0.6),
        0 2px 4px rgba(0,0,0,0.9);

    letter-spacing: 0.3px;
}

/* ===== HERO SECTION ===== */
.hero{
    min-height: 100vh;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    text-align:center;
    padding: 100px 20px;

    background:
        radial-gradient(circle at center, #ffffff 0%, #eef4ff 40%, #dfeaff 100%);
}

/* ===== TITLE ===== */
.hero-title{
    font-size: 120px;
    font-weight: 900;

    background: linear-gradient(180deg,#ff8bd6,#ff6aa8,#ffa8c6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow:
        0 6px 25px rgba(0,0,0,0.25);

    letter-spacing: 6px;
}

/* ===== SUB BAR ===== */
.hero-sub{
    margin-top: 20px;

    padding: 14px 40px;
    border-radius: 12px;

    font-size: 22px;
    font-weight: 700;

    color: white;

    background: linear-gradient(90deg,#5aa6ff,#9b8cff);

    box-shadow: 0 10px 25px rgba(0,0,0,.2);
}

/* ===== DESCRIPTION ===== */
.hero-desc{
    margin-top: 25px;

    font-size: 20px;
    color: #5a6cff;
    font-weight: 600;
    line-height: 1.6;
}

/* ===== BUTTON GROUP ===== */
.hero-buttons{
    margin-top: 40px;

    display:flex;
    gap: 20px;
    flex-wrap:wrap;
    justify-content:center;
}

/* ===== BUTTON BASE ===== */
.btn{
    padding: 16px 40px;
    border-radius: 40px;
    border:none;

    font-size: 18px;
    font-weight: 700;
    color: white;

    cursor:pointer;
    transition:.25s;

    box-shadow: 0 8px 20px rgba(0,0,0,.2);
}

/* COLORS */
.btn.orange{
    background: linear-gradient(135deg,#ffb347,#ff7b00);
}

.btn.purple{
    background: linear-gradient(135deg,#8b8cff,#6c4cff);
}

.btn.pink{
    background: linear-gradient(135deg,#ff7ac6,#ff4da6);
}

/* HOVER */
.btn:hover{
    transform: translateY(-5px);
    filter: brightness(1.1);
}

/* ===== MOBILE ===== */
@media(max-width:768px){

    .hero-title{
        font-size: 60px;
    }

    .hero-sub{
        font-size: 16px;
        padding: 10px 20px;
    }

    .hero-desc{
        font-size: 16px;
    }

    .btn{
        padding: 12px 24px;
        font-size: 14px;
    }
}

@keyframes shimmer {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

.promo-text {
    -webkit-text-stroke: 0.4px rgba(2, 2, 2, 0.5);
}

/* Milestone Cards */
.milestone-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

/* ปุ่มลงทะเบียนล่าง */
.btn-register-main {
    position: relative;

    width: 264px;      /* ปรับตามขนาดรูปจริง */
    height: 110px;     /* ปรับตามขนาดรูปจริง */

    background: url("/assets/images/bg-btn-obt03.png") no-repeat center;
    background-size: contain;

    border: none;
    color: white;
    font-size: 28px;
    font-weight: 700;

    cursor: pointer;
    transition: transform 0.15s ease, filter 0.2s ease;
}

/* hover */
.btn-register-main:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

/* กดลง */
.btn-register-main:active {
    transform: translateY(4px);
    filter: brightness(0.95);
}

/* สายรุ้ง */
.rainbow-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100px;
    background: url('/rainbow-strip.png') repeat-x;
    z-index: 2;
}

/* ส่วน Progress Bar */
.progress-container {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    height: 30px;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.progress-fill {
    width: 0%; /* จะถูกเปลี่ยนโดย JS */
    height: 100%;
    background: linear-gradient(90deg, #ffde59, #ff914d, #ff4e50);
    box-shadow: 0 0 10px #ffde59;
    transition: width 2s cubic-bezier(0.1, 0.5, 0.5, 1);
}

.milestone-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto;
}

/* ตั้งค่า Grid 6 ช่อง */
.grid-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* แบ่ง 6 คอลัมน์เท่ากันเป๊ะ */
    width: 100%;
    position: relative;
    z-index: 5;
}

.grid-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* จัดตำแหน่งกล่องของขวัญ */
.marker {
    font-size: 32px;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* จัดตำแหน่งหลอด Progress */
.progress-track-wrapper {
    position: absolute;
    top: 45px; /* ปรับค่านี้ให้เส้นอยู่กึ่งกลางระหว่างกล่องกับการ์ด */
    left: 0%; /* ครึ่งหนึ่งของช่องแรก (100 / 6 / 2) */
    right: 0%; /* ครึ่งหนึ่งของช่องสุดท้าย */
    height: 12px;
    z-index: 1;
}

.progress-bar-bg {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%; /* คุมด้วย JS */
    height: 100%;
    background: linear-gradient(90deg, #ffde59, #ff914d);
    box-shadow: 0 0 10px #ffde59;
    transition: width 1.5s ease-out;
}

#popup-val {
    color: #ffe066;
    font-weight: 800;
}

/* การ์ดรางวัล */
.reward-card {
    position: relative;
    width: 90%;
    height: 180px;

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: white;
    text-align: center;
    padding: 20px 10px;
    overflow: hidden;
    cursor: pointer;

    transition: transform 0.2s ease, filter 0.2s ease;
}

/* เอฟเฟกต์ตอนเอาเมาส์ชี้ */
.reward-card:hover {
    transform: scale(1.03);
    filter: brightness(1.2);
}

.reward-card.step1 { background-image: url('/assets/images/step1.png'); }
.reward-card.step2 { background-image: url('/assets/images/step2.png'); }
.reward-card.step3 { background-image: url('/assets/images/step3.png'); }
.reward-card.step4 { background-image: url('/assets/images/step4.png'); }
.reward-card.step5 { background-image: url('/assets/images/step5.png'); }
.reward-card.step6 { background-image: url('/assets/images/step6.png'); }


.reward-card .m-val,
.reward-card p {
    color: #cfefff;
    font-weight: 700;

    text-shadow:
        0 2px 4px rgba(0,0,0,0.8),
        0 0 6px rgba(0,0,0,0.6);
}

.reward-card.locked {
    filter: grayscale(100%) brightness(0.6);
    opacity: 0.75;
    pointer-events: none; /* กันคลิก */
    transform: none !important;
}

/* ===== UNLOCKED GLOW (ถึงแล้วดูเด่น) ===== */

.reward-card.unlocked {
    box-shadow: 0 0 0px rgba(255,220,120,0.6);
}

.reward-card .item-img {
    width: 32px;
    height: 32px;

    margin-top: 8px;

    background: url('/assets/images/ic-detail.png') no-repeat center;
    background-size: contain;
    z-index: 20;
}

.reward-card{
    transition: transform .35s cubic-bezier(0.22,1,0.36,1);
}

.reward-card:hover{
    transform: translateY(-6px);
}

/* ลอยขึ้น */
@keyframes liftSmooth {
    0%   { transform: translateY(0); }
    60%  { transform: translateY(-6px); }
    100% { transform: translateY(-5px); }
}

/* ลงกลับ */
@keyframes dropSmooth {
    0%   { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* บังคับให้แถวของกล่องอยู่ด้านหน้าเสมอ */
.markers-row {
    position: relative;
    z-index: 10; /* สูงกว่าหลอด */
    pointer-events: none; /* เพื่อให้ยังคลิกสิ่งที่อยู่ข้างหลังได้ถ้าจำเป็น */
}

.marker img {
    width: 60px; /* ปรับขนาดตามความเหมาะสม */
    transition: transform 0.3s ease;
}

.reward-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 12px;

    background: rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 10px 14px;
}

/* รูปไอเทม */
.reward-item img {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

/* ข้อความตรงกลาง */
.reward-name {
    flex: 1;
    font-size: 14px;
}

/* จำนวนชิดขวา */
.reward-qty {
    font-size: 14px;
    font-weight: bold;
    color: #ffe066;
}

.reward-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ชื่อไอเทม */
.reward-name {
    font-size: 14px;
    font-weight: 600;
}

/* คำอธิบาย */
.reward-detail {
    font-size: 12px;
    color: #ffb703;   /* ส้มเกม ๆ */
    opacity: 0.9;
    line-height: 1.2;
}

/* ===== POPUP OVERLAY ===== */

.popup-overlay {
    position: fixed;
    inset: 0;

    background:
        radial-gradient(circle at center, rgba(130,90,255,0.25), rgba(0,0,0,0.8)),
        rgba(0,0,0,0.75);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;
    transition: 0.35s ease;

    backdrop-filter: blur(6px);
    z-index: 9999;
}

/* ตอนเปิด */
.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;   /* ← สำคัญ ต้อง auto */
}

/* ===== POPUP BOX ===== */

.popup-box {
    width: 420px;
    padding: 26px;
    position: relative;   /* สำคัญมาก */

    background: linear-gradient(135deg,#0f172a,#1e293b);
    border-radius: 22px;
    border: 1px solid #38bdf8;
    box-shadow: 0 0 40px rgba(56,189,248,0.6);
}

/* แสงเรืองรอบกรอบ */
.popup-box::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    background: linear-gradient(135deg,#a58bff,#ffd6ff,#8bd6ff);
    filter: blur(14px);
    opacity: 0.65;
    z-index: -1;
    pointer-events: none;
}

/* ===== ANIMATION ===== */

@keyframes popupFloat {
    from {
        transform: translateY(30px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ===== TITLE ===== */

.popup-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;

    color: #f3f1ff;
    text-shadow: 0 0 10px rgba(170,150,255,0.8);
}

/* ===== ITEM LIST ===== */

.reward-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== CONFIRM BUTTON ===== */

.popup-btn-close {
    position: absolute;
    top: 14px;
    right: 14px;

    padding: 8px 10px;
    border-radius: 8px;
    border: none;

    background: linear-gradient(135deg,#ffd86b,#ff9f43);
    color: #3b2200;

    font-size: 16px;
    cursor: pointer;

    box-shadow:
        0 4px 12px rgba(255,160,60,0.7),
        inset 0 0 6px rgba(255,255,255,0.6);

    transition: 0.25s ease;
}

.popup-btn-close:hover {
    transform: rotate(90deg) scale(1.1);
}

.popup-btn-close:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.popup-btn-close:active {
    transform: translateY(2px);
}

.detail-link {
    color: #6fb8ff;          /* ฟ้าอ่อนสบายตา */
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.detail-link:hover {
    color: #9fd2ff;
    text-decoration: underline;
}

.slogan {
    margin-top: 8px;
    color: #0026ff;          /* ขาวอมฟ้า ไม่จ้าเกิน */
    font-size: 15px;
    opacity: 1;
}

.news-wrapper {
    width: 85%;
    margin: auto;
    text-align: center;
}

.news-title {
    font-size: 60px;
    font-weight: 800;
    color: #1b2c5e;
    text-shadow: 0 4px 12px rgba(0,0,0,.4);
    margin-bottom: 20px;
}

.news-title-sub{
    color:#1b2c5e;
    font-size:20px;
}

.news-menu {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.news-tab {
    padding: 10px 22px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    background: white;
}

.news-tab.active {
    background: #ffb703;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 22px;
    padding-bottom: 40px;
    overflow: visible;
    padding: 20px;
}

.news-card {
    background:#fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    text-align: left;
    transition:.25s ease;
    will-change: transform;
    transform: translateZ(0);
}

.news-card:hover{
    transform: translateY(-10px) scale(1.03);
    box-shadow:0 12px 26px rgba(0,0,0,.25);
}

.news-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.news-thumb{
    overflow:hidden;
    border-bottom:1px solid #e5e5e5;
    border-radius:16px 16px 0 0;
}

.news-thumb img{
    padding: 10px 10px;
    border-radius:16px;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.view-all-btn {
    padding: 14px 36px;
    font-weight: 700;
    background: url("/assets/images/bg-btn-main.png") center/contain no-repeat;
    max-width: 250px;
    color: #fff;
    border: none;
    cursor: pointer;

    transition: 0.25s ease;   /* 👈 ต้องอยู่ตรงนี้ */
}

.view-all-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);
}

.news-layout{
    display:grid;
    grid-template-columns: 1.3fr 2fr;
    gap:32px;
    align-items:stretch;
}

.featured-card{
    width:100%;
    background:#fff;
    border-radius:22px;
    padding:18px;
    box-shadow:0 12px 30px rgba(0,0,0,.18);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    height: 738px;
}

.featured-card img{
    width:100%;
    border-radius:16px;
}

.news-right{
    display:flex;
    flex-direction:column;
    align-items:stretch;
}

.news-menu{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
}

.news-tab {
  background: url("/assets/images/bg-tab-news-hover.png") center/contain no-repeat;
  max-width: 140px;
  width: 100%;
  height: 40px;
  padding: 11px 0px;
  margin: 10px 2px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #1b00b4;
  transition: all 0.3s ease;
}

.news-tab.active {
  background: url("/assets/images/bg-tab-news.png") center/contain no-repeat;
  border: none;
  color: #fff;
  filter: drop-shadow(2px 3px 3px #0e3f673d);
}

.news-tab:hover {
  filter: brightness(1.2);
}

/* ===== NEWS CARD STYLE แบบภาพตัวอย่าง ===== */

.news-card{
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 8px 20px rgba(0,0,0,.15);
    transition:.25s ease;
    display:flex;
    flex-direction:column;
    height:284px;
}

.news-card:hover{
    transform:translateY(-8px) scale(1.02);
}

/* รูปด้านบน */
.news-thumb{
    position:relative;
    height:120px;
    overflow:hidden;
}

.news-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* ป้ายกิจกรรม */
.news-badge{
    position:absolute;
    top:10px;
    left:10px;
    background:#6c4cff;
    color:#fff;
    font-size:12px;
    font-weight:700;
    padding:4px 10px;
    border-radius:12px;
    box-shadow:0 2px 6px rgba(0,0,0,.3);
    text-transform: uppercase;
}

/* กล่องข้อมูล */
.news-info{
    padding:14px 16px;
    display:flex;
    flex-direction:column;
    gap:6px;
    width:100%;
    flex:1;
}

/* วันที่ */
.news-date{
    font-size:12px;
    color:#666;
}

/* หัวข้อ */
.news-title-card{
    width:100%;          /* ⭐ เพิ่ม */
    max-width:100%;
    font-size:12px;
    font-weight:700;
    color:#1d013d;
    line-height:1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
    text-overflow: ellipsis;

    word-break: keep-all;        /* ⭐ ห้ามผ่าคำภาษาไทย */
    overflow-wrap: break-word;  /* แตกเฉพาะคำยาวจริง */
}

.news-type-en{
    white-space: nowrap;   /* ⭐ ห้ามขึ้นบรรทัดใหม่ */
    margin-right:4px;
}

/* รายละเอียด */
.news-desc{
    width:100%;          /* ⭐ เพิ่ม */
    font-size:11px;
    color:#555;
    line-height:1.4;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
    text-overflow: ellipsis;

    word-break: keep-all;       
    overflow-wrap: break-word;
}

/* ===== META แถวบน: TYPE + DATE ===== */

.news-meta{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
}

/* ป้ายประเภทแบบ pill */
.news-type{
    background:#6c4cff;
    color:white;
    font-weight:700;
    padding:3px 10px;
    border-radius:12px;
    text-transform:uppercase;
    font-size:11px;
    box-shadow:0 2px 5px rgba(0,0,0,.25);
}

.news-date{
    color:#777;
    font-size:12px;
}

/* ===== อ่านเพิ่มเติมชิดขวา ===== */

.news-more{
    font-size:13px;
    font-weight:700;
    color:#2b78ff;
    cursor:pointer;
    align-self:flex-end;   /* ⭐ ชิดขวา */
    transition:.2s;
    margin-top:auto;
}

.news-more:hover{
    color:#2bceff;
}

.news-type.promo{background:#ff8c00;}
.news-type.ingame{background:#28a745;}
.news-type.news{background:#2b78ff;}
.news-type.web{background:#9b5cff;}

/* กล่องเนื้อหา */
.featured-body{
    padding:18px 20px;
    display:flex;
    flex-direction:column;
    gap:10px;
    flex:1; 
}

/* ป้ายหมวด */
.featured-badge{
    background:#ff8c00;
    color:white;
    font-weight:700;
    font-size:13px;
    padding:5px 14px;
    border-radius:16px;
    width:fit-content;
    box-shadow:0 3px 8px rgba(0,0,0,.25);
}

/* หัวข้อใหญ่ */
.featured-title{
    font-size:22px;
    font-weight:800;
    color:#111;
    line-height:1.3;
    text-align: left;
}

/* รายละเอียดย่อ */
.featured-desc{
    font-size:15px;
    color:#444;
    line-height:1.5;
    text-align: left;
}

/* แถบล่าง */
.featured-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:auto;
}

/* วันที่ */
.featured-date{
    font-size:13px;
    color:#777;
}

/* อ่านเพิ่มเติม */
.featured-more{
    font-size:14px;
    font-weight:700;
    color:#2b78ff;
    cursor:pointer;
    transition:.25s;
}

.featured-more:hover{
    color:#ff8c00;
    transform:translateX(4px);
}

/* ===== FLOATING BUTTONS ===== */

.floating-controls{
    position: fixed;
    right: 25px;
    bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 99999;
}

.float-btn{
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;

    background: linear-gradient(135deg,#38bdf8,#6c4cff);
    color: white;
    font-size: 22px;

    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    transition: .25s ease;
}

.float-btn:hover{
    transform: translateY(-4px) scale(1.05);
    filter: brightness(1.1);
}

.float-btn:active{
    transform: translateY(2px);
}

.float-btn.hidden{
    opacity: 0;
    pointer-events: none;
}

.small-btn{
    width: 44px;
    height: 44px;
    font-size: 16px;
}

/* ===== VOLUME SLIDER PANEL ===== */

.volume-panel{
    background: rgba(20,30,60,.9);
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.4);
    transition: .25s ease;
}

.volume-panel.hidden{
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* vertical slider */
#volume-slider{
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    width: 6px;
    height: 120px;
    cursor: pointer;
}

/* custom thumb */
#volume-slider::-webkit-slider-thumb{
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #000000;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

#volume-slider::-webkit-slider-runnable-track{
    background: linear-gradient(#38bdf8,#6c4cff);
    border-radius: 10px;
}

.character-section{
    min-height:100vh;
    padding:80px 0;
}

.character-wrapper{
    width:85%;
    margin:auto;
    text-align:center;
}

.character-title{
    font-size:60px;
    font-weight:800;
    color:#1b2c5e;
}

.character-sub{
    color:#1b2c5e;
    font-size:20px;
}

.character-layout{
    display:grid;
    grid-template-columns: minmax(520px, 1.3fr) 1.3fr .3fr;
    align-items:center;
    gap:40px;
    margin-top:40px;
}

.character-visual{
    width:500px;
    height:500px;        /* ← กรอบตัวละครเท่ากันทุกตัว */
    display:flex;
    justify-content:center;
    align-items:flex-end; /* ยืนบนพื้น */
    overflow:hidden;
}

.character-visual img{
    width:100%;
    max-width:700px;
    transition: 
        opacity .25s ease,
        transform .35s cubic-bezier(.22,1,.36,1);
}

/* slide out */
.char-slide-out{
    opacity:0;
    transform: translateX(-120px) scale(.95);
}

/* slide in */
.char-slide-in{
    opacity:1;
    transform: translateX(0) scale(1);
}

.character-info{
    text-align:left;
    transition:
        opacity .25s ease,
        transform .35s cubic-bezier(.22,1,.36,1);
}

/* ตอนออก */
.info-slide-out{
    opacity:0;
    transform: translateX(80px);
}

/* ตอนเข้า */
.info-slide-in{
    opacity:1;
    transform: translateX(0);
}

.character-info h2{
    font-size:36px;
    font-weight:800;
}

.character-info h3{
    font-size:24px;
    color:#2b78ff;
}

/* ===== CHARACTER CLASS BOX ===== */

#character-class-1,
#character-class-2{
    min-height: 84px;
    margin-top: 14px;
    padding: 14px 18px;
    background-color: #92ceff;
    border-radius: 14px;

    font-size: 15px;
    line-height: 1.5;
    color: #1b2c5e;

    box-shadow:
        0 6px 14px rgba(0,0,0,.12),
        inset 0 0 6px rgba(255, 255, 255, 0.6);

    transition: transform .25s ease, box-shadow .25s ease;
}

/* hover effect นิด ๆ */
#character-class-1:hover,
#character-class-2:hover{
    color: #000000;
    transform: translateY(-4px);
    box-shadow:
        0 10px 22px rgba(0,0,0,.18),
        inset 0 0 8px rgba(255,255,255,.7);
}

/* icon feel (optional) */
#character-class-1::before,
#character-class-2::before{
    margin-right: 8px;
    font-size: 18px;
}

.stats{
    margin-top:20px;
    display:flex;
    flex-direction:column;
    gap:14px;
}

.stat{
    display:grid;
    grid-template-columns: 100px 1fr 30px;
    align-items:center;
    gap:12px;
}

.stat .bar{
    height:10px;
    background:#dbefff;
    border-radius:20px;
    overflow:hidden;
}

.stat .bar div{
    height:100%;
    width:0%;              /* เริ่มว่าง */
    background: linear-gradient(90deg,#38bdf8,#6c4cff);
    transition: width .6s ease;
}

.character-menu{
    display:flex;
    flex-direction:column;
    gap:14px;
    align-items:flex-start;
}

.char-icon{
    width:60px;
    height:60px;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:6px;

    box-sizing:border-box;

    border:4px solid transparent;   /* จองพื้นที่ไว้ก่อน */
    border-radius:5px;

    transition: transform .25s ease;
}

.char-icon img{
    width:100%;
}

.char-icon.active{
    border-color:#2b78ff;
}

.char-icon:hover{
    transform: scale(1.05);
}

#main-character-img{
    width:100%;
    height:100%;
    object-fit: contain;  /* ไม่แตก ไม่ล้น */
}

.footer-bar {
    width: 100%;
    /* max-width: 1200px; */
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(90deg,
        #050506 0%,
        #0d0e12 40%,
        #050506 100%
    );

    color: #888;
    font-size: 13px;
    letter-spacing: 0.5px;

    /* border-radius: 14px; */

    /* box-shadow:
        0 10px 30px rgba(0,0,0,0.8),
        inset 0 1px 0 rgba(255,255,255,0.04); */

    /* position: relative; */
}

/* เส้น glow บน footer */
.footer-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15px;
    right: 15px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffcc00, transparent);
    opacity: 0.5;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {

    /* ===== GLOBAL ===== */
    .main-title{
        font-size:48px;
    }

    .promo-text{
        font-size:18px;
        padding:15px;
    }

    .counter-pill{
        font-size:18px;
        padding:8px 20px;
    }

    /* ===== NAV ===== */
    .nav-inner{
        flex-direction:column;
        gap:10px;
    }

    .nav-menu{
        flex-wrap:wrap;
        justify-content:center;
    }

    .nav-right{
        display:flex;
        gap:8px;
    }

    .nav-right button{
        padding:6px 16px;
        font-size:14px;
    }

    /* ===== MILESTONE ===== */

    .grid-row{
        grid-template-columns: repeat(3,1fr); /* 6 → 3 ต่อแถว */
        row-gap:20px;
    }

    .progress-track-wrapper{
        display:none; /* เส้น progress ยาวไม่เหมาะ mobile */
    }

    .reward-card{
        height:140px;
    }

    /* ===== NEWS ===== */

    .news-layout{
        grid-template-columns:1fr;
    }

    .featured-card{
        height:auto;
    }

    .news-grid{
        grid-template-columns:1fr;
    }

    .news-title{
        font-size:42px;
    }

    /* ===== CHARACTER ===== */

    .character-layout{
        grid-template-columns:1fr;
        gap:20px;
    }

    .character-visual{
        width:100%;
        height:320px;
    }

    .character-info{
        text-align:center;
    }

    .stats .stat{
        grid-template-columns: 80px 1fr 30px;
    }

    .character-menu{
        flex-direction:row;
        flex-wrap:wrap;
        justify-content:center;
    }

    .char-icon{
        width:52px;
        height:52px;
    }

    /* ===== BUTTON ===== */

    .btn-register-main{
        width:200px;
        height:80px;
        font-size:20px;
    }

    /* ===== FLOAT BUTTON ===== */

    .floating-controls{
        right:12px;
        bottom:12px;
    }

    .float-btn{
        width:48px;
        height:48px;
        font-size:18px;
    }

    /* ===== FOOTER ===== */

    .footer-bar{
        font-size:11px;
        text-align:center;
        padding:0 10px;
    }
}

@media (max-width: 480px){

    .main-title{
        font-size:38px;
    }

    .promo-text{
        font-size:16px;
    }

    .grid-row{
        grid-template-columns: repeat(2,1fr);
    }

    .character-visual{
        height:260px;
    }

    .news-title{
        font-size:34px;
    }
}

.floating-logo{
    position: absolute;   /* ← สำคัญสุด */
    top: 5%;
    left: 0%;

    width: 600px;
    height: 600px;

    display:flex;
    align-items:center;
    justify-content:center;

    animation: floatLogo 4s ease-in-out infinite;
    z-index: 10;   /* ทับทั้งเว็บ */
    pointer-events: auto;
}

.floating-logo img{
    width:100%;
    height:100%;
    object-fit:contain;

    filter:
        brightness(1.5)
        drop-shadow(0 12px 18px rgba(0,0,0,.35))
        drop-shadow(0 0 14px rgba(120,180,255,.7));
    /* animation: smoothTilt 1s ease-in-out infinite alternate; */
}

.floating-logo:hover img{
    filter:
        brightness(1.5)
        drop-shadow(0 12px 18px rgba(0,0,0,.35))
        drop-shadow(0 0 8px rgba(255,80,80,.7));
}

.floating-logo::after{
    content:"";
    position:absolute;
    inset:-12px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(120,180,255,.45), transparent 70%);
    filter: blur(12px);
    z-index:-1;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes smoothTilt {
    from {
        transform: rotate(-6deg) translateY(6px);
    }
    to {
        transform: rotate(6deg) translateY(6px);
    }
}

@keyframes glowPulse{
    0%,100%{opacity:.6}
    50%{opacity:1}
}

/* ✨ ลอยแบบมีมิติ */
@keyframes floatLogo{
    0%{
        transform: translateY(0) scale(1);
    }
    50%{
        transform: translateY(-18px) scale(1.04);
    }
    100%{
        transform: translateY(0) scale(1);
    }
}

@media(max-width:768px){
    .floating-logo{
        width:60px;
        height:60px;
        top:18%;
        left:4%;
    }
}

/* ===== BUTTON GROUP ===== */
.action-buttons{
    margin-top: 40px;

    display:flex;
    justify-content:center;
    gap: 20px;
    flex-wrap:wrap;
}

/* ===== BASE BUTTON ===== */
.btn-img{
    position: relative;

    width: 260px;
    height: 100px;

    border: none;
    cursor: pointer;

    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    transition: all .25s ease;
    background-color: transparent !important;
}

/* ===== TEXT ON BUTTON ===== */
.btn-img{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px; /* ระยะ icon กับ text */
}

/* TEXT */
.btn-img span{
    position: static; /* 🔥 เอา absolute ออก */

    font-size: 22px;
    font-weight: 800;
    color: white;

    text-shadow:
        0 2px 6px rgba(0,0,0,.6),
        0 0 10px rgba(255,255,255,.6);
}

/* ICON */
.btn-img i{
    font-size: 26px;  /* 🔥 ปรับใหญ่ */
    color: white;

    display:flex;
    align-items:center;

    text-shadow:
        0 0 6px rgba(255,255,255,.5),
        0 0 14px rgba(120,180,255,.6);
}

/* ===== REGISTER ===== */
.btn-register{
    background-image: url("/assets/images/bg-btn-obt03.png");
}

/* ===== DOWNLOAD ===== */
.btn-download{
    background-image: url("/assets/images/bg-btn-obt02.png"); /* 👈 เปลี่ยนตามรูปคุณ */
}

/* ===== TOPUP ===== */
.btn-topup{
    background-image: url("/assets/images/bg-btn-obt01.png"); /* 👈 เปลี่ยนตามรูปคุณ */
}

/* ===== HOVER EFFECT ===== */
.btn-img:hover{
    transform: translateY(-6px) scale(1.05);
    filter: brightness(1.1);
}

/* ===== CLICK EFFECT ===== */
.btn-img:active{
    transform: translateY(4px) scale(0.98);
    filter: brightness(0.95);
}

a{
    text-decoration: none;
}

/* CONTACT PANEL */
.contact-panel {
    position: absolute;
    bottom: 150px;
    font-size: 13px;
    right: -10px;
    width: 140px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
    transition: bottom 0.3s ease;
}

.contact-panel h4 {
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
}

.contact-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ddd;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    transition: 0.2s;
}

.contact-links a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.contact-links i {
    font-size: 18px;
}

/* Animation */
@keyframes fadeIn {
    from {opacity:0; transform: translateY(10px);}
    to {opacity:1; transform: translateY(0);}
}

.contact-panel.raise {
    bottom: 300px;
}

/* ===== FACEBOOK ===== */
.contact-links a:nth-child(1) i {
    color: #1877F2; /* Facebook blue */
}
.contact-links a:nth-child(1) {
    color: #1877F2;
}

/* ===== DISCORD ===== */
.contact-links a:nth-child(2) i {
    color: #5865F2; /* Discord blurple */
}
.contact-links a:nth-child(2) {
    color: #5865F2;
}

/* ===== GROUP ===== */
.contact-links a:nth-child(3) i {
    color: #2ecc71; /* green */
}
.contact-links a:nth-child(3) {
    color: #2ecc71;
}

/* ===== hover ให้เด่นขึ้น ===== */
.contact-links a:hover {
    filter: brightness(1.2);
}