html, body {
  height: 100%;
  margin: 0;
  font-family: 'Prompt', sans-serif;
}
.check_leader {
    max-width: unset;
    padding-bottom: 50px;
}

.banner-wrapper {
    margin-top: -50px !important;
}

.rank-scroll-wrapper {
  max-height: 1000px; /* ปรับความสูงตามที่ต้องการให้ scroll ได้ */
  overflow-y: auto;
  scrollbar-width: thin; /* สำหรับ Firefox */
  scrollbar-color: #aa8755 #2c2c2c; /* thumb / track สำหรับ Firefox */
}

/* สำหรับ WebKit browser เช่น Chrome */
.rank-scroll-wrapper::-webkit-scrollbar {
  width: 10px;
}

.rank-scroll-wrapper::-webkit-scrollbar-track {
  background: #2c2c2c;
  border-radius: 10px;
}

.rank-scroll-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffb347, #ffcc33); /* สี thumb ไล่เฉด */
  border-radius: 10px;
  border: 2px solid #2c2c2c;
}

.rank-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffa500, #ffdd55);
}


.banner-wrapper {
  position: relative;
}

.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white; /* หรือสีที่เหมาะกับพื้นหลัง */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7); /* เพื่อให้อ่านง่าย */
  animation: fadeSlideIn 1s ease-out forwards;
  opacity: 0; /* เริ่มซ่อนไว้ก่อน แล้วให้ค่อยๆ ปรากฏ */
}

.banner-lead {
    animation: popIn 1s ease-out forwards;
}

.img-logo-main {
    width: 30%;
}

.style-banner {
    color: #e7cfaf;
}

.title-top1 {
    font-size: 26px;
}

.title-top2 {
    font-size: 18px;
}

.animation-100 {
    animation: slideInUp 1s ease-out forwards;
}
/*
.bg-leader {
  background-image: url('../image/desktop/image/background.jpg'); 
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: fixed; 
}*/

@keyframes bgMove {
  0% {
    background-position: center 30%;
  }
  50% {
    background-position: center 33%;
  }
  100% {
    background-position: center 30%;
  }
}

.bg-leader {
  background-image: url('../image/desktop/image/background.jpg'); 
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 30%; /* เริ่มตำแหน่งใกล้กลางแต่สูงขึ้น */
  background-attachment: fixed; 
  animation: bgMove 20s ease-in-out infinite; /* เคลื่อนไหวช้าลงอีกนิด */
}


.header-blog {
    background-color: #ffffff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 8px;    
    width: 100%;
    color: #fff;
}

.header-blog a {
    text-decoration: none;
    color: rgb(1, 126, 129);
    font-size: 24px;
    font-weight: bolder;
}

.img-logo {
    width:65px;
    margin-left: 70px;
}

.img-title {
    width: 20%;
}

.img-rank {
    width: 80%;
}

.form-select {
    margin-right: 80px;
    width: 18%;
    height: 50px;
    font-size: 16px;
    background-color: #ab8755;
    color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.form-select > option {
    background-color: #333333;
    color: #fff;
    border-radius: 0px 10px 10px 0px;
}

.select-server {
    text-align: -webkit-right;
}

.box-rank {
    width: 80%;
    margin: auto;
}

.blog-detail {
    background-color: #fafaf3;
    border-top: 3px solid #b29f95;
    border-bottom: 3px solid #b29f95;
    padding: 2px 10px;
    box-shadow:
        0 -3px 0 0 #7e5e52, /* ต่อขอบบน */
        0 3px 0 0 #7e5e52;  /* ต่อขอบล่าง */
    margin-top: 15px;
    text-align: center;
}

.blog-detail p {
    font-weight: bold;
    margin: 2px 0; /* ระยะห่างด้านบน-ล่าง */
    font-size: 20px;
}

.blog-rank-other {
  background-image: url('../image/desktop/image/scripture.jpg');
}

.img-rank-10 {
  background-image: url('../image/desktop/image/scripture_middle.png');
  background-size: 100% auto; 
  /*background-repeat: no-repeat;*/
  background-position: top center;
  
  width: 100%;
  /*aspect-ratio: 16 / 9; /* หรือเปลี่ยนตามอัตราส่วนภาพจริง */*/
  margin: 0;
  padding: 0;
}

.blog-second {
    margin-top: 35px;
}

table.rank {
    width: 70%;
    margin: auto;
    font-size: 18px;
    border-collapse: collapse;
    table-layout: fixed;
}

table.rank th,
table.rank td {
    padding: 8px 12px;
    border-bottom: 2px solid #43211f;
    text-align: left !important;

    /* ❌ ลบหรือคอมเมนต์บรรทัดเหล่านี้ออก */
    /* overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis; */
}

/* ✅ กำหนดความกว้างของแต่ละคอลัมน์ตามต้องการ */
table.rank th:nth-child(1),
table.rank td:nth-child(1) {
    width: 10%;
}

table.rank th:nth-child(2),
table.rank td:nth-child(2) {
    width: 25%;
}

table.rank th:nth-child(3),
table.rank td:nth-child(3) {
    width: 20%;
}

table.rank th:nth-child(4),
table.rank td:nth-child(4) {
    width: 20%;
}

table.rank th:nth-child(5),
table.rank td:nth-child(5) {
    width: 25%;
}

.blog-bottom {
    width: 70% !important;
    margin: auto;
}

.btn-rank {
    background-color: #aa8755;
    color: #fff;
    width: 100%;
    font-size: 14px;
    border: none;
}

.btn-rank:hover {
    background-color: #7a674b; 
    color: #fff;
}

.text-rank {
    font-size: 14px;
    font-weight: bold;
    color: #5f3f3b;
}

.icon-click {
    width: 25px;
}

.text-coming {
    color: #5f3f3b;
    font-size: 20px;
    font-weight: bold;
    margin-top: 50px;
}

.wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.blog-fix {
    height: 500px;
}

.footer-rank {
    background-color: #333333;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 70px;
    margin-top: 50px;
    font-size: 14px;
}

.footer-left img.img-title {
    width: 50px;
}

#mobile {
    display: none;
}

#desktop {
    display: block;
}

.rank-check {
    width: 100%;
    margin: right;
}

.text-check{
    text-align: right;
}

.img-rank-10 {
      width: 100%;
    }

/* Wrapper ที่ให้ scroll แนวนอนเมื่อจำเป็น */
.rank-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
/*    background-color: #fff;*/
    width: 77%;
    margin: auto;
}

/* ตารางที่กว้างตามเนื้อหา แต่ไม่เกิน wrapper */
.rank-scroll-wrapper .rank {
    min-width: 430px; /* กำหนดความกว้างขั้นต่ำให้ scroll ได้ */
    width: 95%;
    border-collapse: collapse;
    margin-top: 10px;
} 

/*------------------------------------desktop , mobile---------------------------------------------*/

/*  เงื่อนไขที่1: tablet screen(1200px) --> 901px */
@media (max-width: 1200px) {
    .form-select {
        width: 23%;
    }

    .img-title {
        width: 30%;
    }

    .blog-detail p {
        font-size: 18px;
    }
    table.rank {
        font-size: 14px;
    }
    .text-rank {
        text-align: center;
    }

}

/*  เงื่อนไขที่2: mobile landscape screen(900px) --> 601px */
@media (max-width: 900px) {
   .form-select {
        width: 25%;
    }

    .img-title {
        width: 35%;
    }

    .blog-detail p {
        font-size: 14px;
    }

    table.rank {
        font-size: 12px;
        background-color: rgb(255 248 232);
    }

    .rank-check {
        width: 60%;
        margin: auto;
    }

    .text-rank {
        text-align: center;
    }

    .text-check{
        text-align: center;
    }

 }
 
/* เงื่อนไขที่3: mobile screen(600px) --> 0px */
@media (max-width: 600px) {
   .form-select {
        width: 70%;
        margin: auto;
    }

    .img-title {
        width: 50%;
    }

    .blog-detail p {
        font-size: 14px;
    } 

    table.rank {
        font-size: 10px;
    } 

    .box-rank {
        width: 100%;
    }

    #desktop {
        display: none;
    }

    #mobile {
        display: block;
    }

    .text-rank {
        text-align: center;
        font-size: 10px;
    }

    .blog-data-mobile {
        position: relative;
        width: 100%;
        aspect-ratio: 4 / 1;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        align-items: center;        
        justify-content: flex-end;
        border-radius: 12px;
        overflow: hidden;
        padding: 12px;
        box-sizing: border-box;
        margin-bottom: 16px;
    }

    /* รูปอันดับ */
    .blog-data-mobile1 {
        background-image: url('../image/mobile/image/gold.png');
    }
    .blog-data-mobile2 {
        background-image: url('../image/mobile/image/silver.png');
    }
    .blog-data-mobile3 {
        background-image: url('../image/mobile/image/copper.png');
    }

    /* กล่องข้อความ */
    .blog-detail-mobile {
        border-radius: 10px;
        padding: 12px 16px;
        max-width: 60%;
        width: 100%;
        color: #000;
        text-align: right;
        display: flex;
        flex-direction: column;
        justify-content: center; 
        gap: 4px;
        box-sizing: border-box;
        word-break: break-word;
        overflow-wrap: break-word;
        overflow: hidden;
        font-weight: bold;
    }

    /* ข้อความแต่ละบรรทัด */
    .blog-detail-mobile p {
        font-weight: bold;
        margin: 0;
        font-size: clamp(12px, 1.5vw, 18px);
        line-height: 1.2;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .img-logo {
        margin-left: 0px;
    }

    .rank-check {
        width: 70%;
        margin: auto;
    }

    .text-check{
        text-align: center;
    }

    .footer-rank {
        padding: 15px 20px;    
    }

    .title-top1 {
        font-size: 14px;
    }

    .title-top2 {
        font-size: 12px;
    }

    .banner-text {
        left: 33%;
    }

    

/* Media Query สำหรับมือถือ */
@media (max-width: 576px) {
  .blog-detail-mobile {
    max-width: 50%;
    padding: 8px 12px;
    text-align: center;
  }
}


/*---------------------------------------end desktop , mobile-------------------------------------------*/

.custom-container {
    background: #e0f7fa;
    margin: 30px auto;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    font-family: sans-serif;
    max-width: 600px;
}

.blog-title {
    padding: 30px 10px;
}

.blog-data-show {
    margin-top: 10px;
}

/* ปุ่ม server */
.server-btn {
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
}

/* ปุ่ม server active */
.server-btn.active {
    background-color: #0d6efd; 
    color: white;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.7);
    transition: box-shadow 0.3s ease;
}

/* ปุ่ม server hover (ถ้าไม่ active) */
.server-btn:hover:not(.active) {
    background-color: #cce5ff;
    color: #0d6efd;
}

/* container แสดงผล */
#result {
    min-height: 200px;
    /*background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 0.25rem;*/
    /*padding: 1rem;*/
    opacity: 1;
    transform-origin: center center;
    height: 100%;
}

.blog-data {
    /*background-color: #ccc;*/
    /*border: 1px solid #495057 !important;*/
    border-radius: 20px;
    /*padding: 10px 10px;*/
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
    text-align: center;
}

/* เมื่อเม้าชี้ */
.blog-data:hover {
    transform: translateY(-5px) scale(1.02); /* ยกขึ้นเล็กน้อย + ขยายเล็กน้อย */
/*    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); 
    background-color: #e3e3e3; */
}


.spinner {
  display: inline-block;
  font-size: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fa-spinner {
  animation: spin 1s linear infinite;
}



