@font-face {
    font-family: 'pslxkittithadabold';
    src: url('pslxkittithada_bold-webfont.woff2') format('woff2'),
         url('pslxkittithada_bold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'Sukhumvit Set';
    src: url('SukhumvitSet-Medium.eot');
    src: url('SukhumvitSet-Medium.eot?#iefix') format('embedded-opentype'),
        url('SukhumvitSet-Medium.woff2') format('woff2'),
        url('SukhumvitSet-Medium.woff') format('woff'),
        url('SukhumvitSet-Medium.ttf') format('truetype'),
        url('SukhumvitSet-Medium.svg#SukhumvitSet-Medium') format('svg');
    font-weight: 500;
    font-style: normal;
}
body {
    background-image: url("../imges/bg.webp");
    background-position: center top;  /* จัดตำแหน่งภาพให้อยู่กลางด้านบน */
    background-size: cover;          /* ปรับขนาดภาพให้เต็มพื้นที่ */
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;  /* เปลี่ยนเป็น scroll บนอุปกรณ์มือถือเพื่อลดปัญหาประสิทธิภาพ */
    }
}

.input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

h3 {
    font-size: 20px;
    color: #ffe600;
    font-family: 'Sukhumvit Set';
    font-weight:100;
}


.object-cover {
  height: 150px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .object-cover {
    height: 90px;
  }
}

.text-sm {
    font-size: 20px;
    color: #ffffff;
}

.text-xl {
    font-size: 50px;
    color: rgb(255, 238, 0);
    margin-top: 80px ;
    font-family: 'Sukhumvit Set';

}


.btn {
    background-color: #2563eb;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #5e1dd8;
}


table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

table th, table td {
    padding: 8px 12px;
    border-bottom: 1px solid #1f0900;
}

    /* สำหรับ Countdown */
    .countdown {
        font-size: 15px;
        font-weight: bold;
        padding: 15px;
        border: 3px solid #ff00f2; /* กรอบสีเข้ม */
        border-radius: 10px; /* มุมมน */
        background-color: rgba(0, 0, 0, 0.856); /* พื้นหลังโปร่งแสง */
        width: auto;
        max-width: 400px;
        margin: 50px auto; /* จัดกึ่งกลาง */
        text-align: center;
        font-family: 'Sukhumvit Set';
    }

        /* ปรับขนาดโลโก้ให้พอดี */
        .team-logo {
            width: 130px;  /* เพิ่มขนาดโลโก้ */
            height: 130px; /* เพิ่มขนาดโลโก้ */
            object-fit: contain;
            margin-bottom: 8px;
        }

        /* เพิ่มกรอบสวยๆ ให้ฟอร์ม */
.match-card {
  background-image: url("../imges/bg12.jpg");
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 25px;
  color: white;
  max-width: 700px;
  margin: 0 auto;
  /*margin-top: 100px; */
  text-align: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .match-card {
    max-width: 90%;
    padding: 16px;
    /*margin-top: 170px;*/
    font-size: 14px;
  }
}
        
        .no-matches {
       background-image: url("../imges/bg12.jpg");
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
            border-radius: 12px;
            padding: 25px;
            color: white;
            max-width: 700px; /* กำหนดความกว้างสูงสุด */
            margin: 0 auto; /* จัดให้อยู่ตรงกลาง */
            /*margin-top: 170px; */
            text-align: center; /* ตัวหนังสือทั้งหมดอยู่กลาง */
            background-position: center; /* จัดตำแหน่งรูปภาพให้ตรงกลาง */
            background-size: cover; /* ให้รูปภาพเต็มกรอบ */
            background-repeat: no-repeat; /* ป้องกันการทำซ้ำรูปภาพ */
        }


        .match-card h2 {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 20px;
            font-family: 'Sukhumvit Set';
        }
        .form-container {
            background-color: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center; /* ตัวหนังสือในฟอร์มกึ่งกลาง */
        }

        .form-container input[type="text"], 
        .form-container input[type="number"] {
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #000000;
            width: 90%;
            margin-bottom: 12px;
            font-size: 16px;
            text-align: center;
        }
      
        .form-container button {
            background-color:rgb(255, 0, 0);
            padding: 12px;
            border-radius: 8px;
            color: white;
            font-size: 18px;
            cursor: pointer;
            width: 80%;
            transition: background-color 0.3s;
        }
        .form-container button:hover {
            background-color: #005bb5;
        }

        /* ปรับให้ตัวเลือกของทีมและผลการแข่งขันอยู่ตรงกลาง */
        .team-selection {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
        }

        .team-selection label {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .team-selection span {
            margin-top: 8px;
            text-align: center;
            color: #005bb5;
            font-size: 50px;
        }
              /* เพิ่มสไตล์ที่ใช้กับฟอร์ม */
              .score-inputs {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            
        }

        .score-input {
            width: 48%;  /* ทำให้ช่องกรอกสกอร์ทั้งสองมีขนาด 50:50 */
            padding: 0.75rem;
            border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 1rem;
        }

        .score-input:focus {
            outline: none;
            border-color: #3b82f6; /* สี border เมื่อ focus */
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
        }

.match-card select {
    width: 30%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
    text-align: center;
    font-family: 'Sukhumvit Set';
}

@media (max-width: 768px) {
  .match-card select {
    width: 80%;
    font-size: 14px;
  }
}

.match-card input {
    width: 30%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
    text-align: center;
    font-family: 'Sukhumvit Set';
}

@media (max-width: 768px) {
  .match-card input {
    width: 20%;
    font-size: 14px;
  }
}
        
        .match-card input:focus, .match-card select:focus {
            font-family: 'Sukhumvit Set';
            outline: none;
            border-color: #ff0000;
            text-align: center;
        }
        .match-card button {
            font-family: 'Sukhumvit Set';
            width: 60%;
            padding: 0.8rem;
            background-color: #ff0000;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 1.1rem;
            cursor: pointer;
            transition: background-color 0.3s ease;
            margin: 10px auto; /* จัดกึ่งกลาง */
        }
        .match-card button:hover {
            background-color: #1534e2;
        }

        
        /* Header Styling (Legacy - kept for compatibility if needed, but overridden below) */
header {
    background-color: #161616; /* พื้นหลังเข้ม */
    padding: 1px 0px; /* ระยะห่างจากขอบ */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* เงาด้านล่าง */
    transition: background-color 0.3s ease; /* เปลี่ยนสีพื้นหลังเมื่อ hover */
}

header:hover {
    background-color: #000000; /* สีเมื่อเมาส์ชี้ที่ header */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header a {
    text-decoration: none;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    transition: color 0.3s, background-color 0.3s;
}

header a:hover {
    color: #ffffff;
    background-color: #ff0000;
}

header .flex {
    display: flex;
    align-items: center;
}

header .space-x-6 {
    gap: 24px;
}

header .bg-gray-700 {
    background-color: #ffe600; /* สีน้ำเงินเข้ม */
}

header .text-white {
    color: #ffffff;
    font-family: 'Sukhumvit Set';
}
header .text-bg {
    color: #000000;
    font-family: 'Sukhumvit Set';
}

header .px-4 {
    padding-left: 18px;
    padding-right: 18px;
}

header .py-2 {
    padding-top: 10px;
    padding-bottom: 10px;
}

header .rounded-lg {
    border-radius: 8px;
    
}

header .text-xl {
    font-size: 1.25rem;
}

header .font-semibold {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Sukhumvit Set';
}

header nav ul {
    display: flex;
    gap: 24px;
}

header nav ul li {
    list-style-type: none;
}

header nav ul li a.active {
    background-color: #48BB78;
    color: #FFFFFF;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }

    header nav ul {
        flex-direction: column;
        gap: 12px;
    }

    header nav ul li a {
        padding: 10px 0;
        width: 100%;
        text-align: left;
    }
}


.banner {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    margin-top: 55px;
}

.banner img {
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    width: 50%; /* ปรับขนาดแบนเนอร์ให้เล็กลง */
    display: inline-block;
}
.banner-container {
  display: flex;
  justify-content: center; /* จัดให้อยู่ตรงกลางแนวนอน */
  flex-wrap: wrap;        /* ให้ขึ้นบรรทัดใหม่ถ้ามีหลายรูป */
  gap: 15px;              /* ระยะห่างระหว่างรูป */
  margin: 20px 0;
}

.banner-link {
  display: inline-block;
  line-height: 0;  /* ป้องกัน spacing เกิน */
}

.responsive-banner {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* เพิ่มเงาให้สวย */
}

/* กรอบนอก */
.ranking-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* ตารางจัดอันดับ */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'Sukhumvit Set';
}

.ranking-table thead {
    background-color: #0055ff;
    color: #ffffff;
}

.ranking-table th, .ranking-table td {
    border: 1px solid #e5e7eb;
    padding: 12px 10px;
    text-align: center;
    font-size: 14px;
}

.ranking-table tbody tr {
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

.ranking-table tbody tr:hover {
    background-color: #f9fafb;
}

/* หัวข้อ */
.ranking-title {
    font-size: 34px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #271111;
    text-align: center;
    font-family: 'Sukhumvit Set';
}

/* dropdown เลือกเดือน */
.select-month {
    margin-bottom: 15px;
    font-family: 'Sukhumvit Set';
}

.select-month select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Sukhumvit Set';
}

/* ไฟ Lottie */
.streak-fire {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

p {
    text-align: center;
    font-family: 'Sukhumvit Set';
    color: #ffffff;
}

.navbar {
    background-image: url("../imges/hbg.webp"); /* รูปเดิมของคุณ */
    background-size: cover;
    border-bottom: 1px solid #ffee00; /* ขอบเหลืองเดิม */
    padding: 6px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* เพิ่ม Padding ด้านข้าง */
    flex-wrap: wrap;
}

.logo {
    /* ถ้าเป็น Text */
    font-family: 'pslxkittithadabold';
    font-size: 2rem;
    color: var(--gold-primary);
    text-decoration: none;
    text-shadow: 1px 1px 2px #000;
    
    /* ถ้ามีรูป logo.png ให้ใส่ img tag ใน html แทน */
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Sukhumvit Set';
    transition: transform 0.2s;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-register {
    background-color: #ff0000; /* แดงเดิม */
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-login {
    background-color: #ffd900; /* เหลืองเดิม */
    box-shadow: 0 0 10px rgba(255, 217, 0, 0.4);
    color: rgb(0, 0, 0);
    font-weight: bold;
}

/* =========================================
   7. RESPONSIVE (มือถือ)
   ========================================= */
@media (max-width: 768px) {
    .login-wrapper {
        width: 100%;
        padding: 15px;
        margin-top: 80px; /* หลบ Navbar */
    }

    .login-container {
        padding: 30px 20px;
        /* ในมือถือ ถ้าอยากให้อ่านง่าย อาจลดความใสลง */
        background: rgba(15, 15, 15, 0.95);
    }

    .container {
        flex-direction: column;
        gap: 1px;
    }
    
    .logo {
        margin-bottom: 5px;
    }
    
    .auth-buttons {
        width: 100%;
        justify-content: center;
    }
}

  /* CSS ปกติ */
.responsive-banner {
    width: 100%;
    max-width: 1024px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
    margin-top: 10px;
  }
 
.container2 {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center; /* ตัวหนังสือในฟอร์มกึ่งกลาง */
    max-width: 650px; /* กำหนดความกว้างสูงสุด */
    margin: 0 auto; /* จัดให้อยู่ตรงกลาง */
    margin-top: 30px;
}

   /* สไตล์สำหรับตาราง */
   table {
    width: 100%;
    border-collapse: collapse;
    background-color: #181818;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    font-size: 1rem;
}

th {
    background-color: #1b0900;
    color: white;
}

tr:nth-child(even) {
    background-color: #1a0800;
}

tr:hover {
    background-color: #f1f1f1;
}
@media (max-width: 768px) {
  .container2 {
    max-width: 95%;
    padding: 16px;
    margin-top: 20px;
  }

  table {
    min-width: 300px; /* ทำให้ table ไม่เบียดในมือถือ */
    font-size: 8px;
  }

  th, td {
    padding: 8px;
    font-size: 1rem;
  }

  /* ห่อ table เพื่อให้ scroll ได้ */
  .table-wrapper {
    width: 100%;
    overflow-x: auto;
  }
}
.vote-container {
    max-width: 700px;
    margin: auto;
    font-family: sans-serif;
    padding: 20px;
    color: #FFFFFF;
}
.vote-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #FFFFFF;
    text-align: center;
    font-family: 'Sukhumvit Set';
}
.team-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.team-name {
    font-weight: bold;
    font-size: 18px;
    color: #FFFFFF;
    font-family: 'Sukhumvit Set';
}
.vote-bar-wrapper {
    background: #ddd;
    border-radius: 20px;
    overflow: hidden;
    height: 24px;
    margin: 15px 0;
    display: flex;
}
.teamA-bar {
    background: #1e00ff;
    height: 100%;
    text-align: left;
    color: #fff;
    font-size: 12px;
    padding-left: 10px;
    line-height: 24px;
}
.teamB-bar {
    background: #ff0000;
    height: 100%;
    text-align: right;
    color: #fff;
    font-size: 12px;
    padding-right: 10px;
    line-height: 24px;
}
.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.team-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.floating-right-box {
    position: fixed;
    right: 0;
    bottom: 35%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.floating-btn {
    padding: 0;
    background: none;
    border: none;
}

.floating-img {
    width: 100px;
    height: auto;
    display: block;
    transition: transform 0.2s ease;
}

.floating-img:hover {
    transform: scale(1.05);
}

.close-floating-btn {
    background: #ff0000;
    color: #fff;
    border: none;
    font-size: 16px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    cursor: pointer;
    opacity: 0.8;
    transition: background 0.3s ease;
}

.close-floating-btn:hover {
    background: #ff0000;
    opacity: 1;
}

.col-md-12 {
  display: flex;
  justify-content: center;     /* จัดให้อยู่กลางแนวนอน */
  align-items: center;         /* จัดให้อยู่กลางแนวตั้ง (ถ้าจำเป็น) */
  margin: 5px auto;           /* ระยะด้านบน/ล่าง */
  max-width: 1000px;           /* จำกัดความกว้างสูงสุดบน Desktop */
  padding: 0 15px;             /* เผื่อระยะหายใจซ้าย/ขวา */
  box-sizing: border-box;
  margin-top: 10px;
}

.col-md-12 img {
  display: block;
  width: 100%;                 /* ยืดเต็ม container */
  height: auto;                /* รักษาสัดส่วน */
  max-width: 800px;           /* ไม่ให้ใหญ่เกินไป */
  border-radius: 10px;         /* มุมโค้ง */
  box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* เงา */
  object-fit: contain;
}

/* --- Responsive --- */

/* 📱 มือถือเล็ก */
@media (max-width: 480px) {
  .col-md-12 {
    margin-top: 15px;
    max-width: 100%;         /* เต็มหน้าจอ */
    padding: 0 8px;
  }
  .col-md-12 img {
    max-width: 100%;
    border-radius: 6px;
  }
}

/* 📱 แท็บเล็ต */
@media (min-width: 481px) and (max-width: 768px) {
  .col-md-12 {
    margin-top: 60px;
    max-width: 95%;
    padding: 0 8px;
  }
  .col-md-12 img {
    max-width: 95%;
  }
}

/* 💻 Desktop */
@media (min-width: 769px) {
  .col-md-12 {
    max-width: 800px;
  }
}

/* ======================================================
    NEW MODERN DESIGN OVERRIDES
    (เพิ่ม CSS ใหม่สำหรับหน้า index)
    ====================================================== */

 :root {
     --glass-bg: rgba(20, 20, 20, 0.85); /* พื้นหลังกระจกสีเข้ม */
     --card-border: 1px solid rgba(255, 255, 255, 0.1);
     --neon-gold: #ffe600;
     --neon-blue: #00f2ff;
     --text-primary: #ffffff;
 }

 /* ปรับ Layout หน้าจอหลัก */
 .main-layout {
     max-width: 1200px;
     margin: 0 auto;
     padding: 5px;
 }

 /* 1. Grid System สำหรับ Match Card */
 .matches-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
     gap: 25px;
     margin-top: 30px;
 }

 @media (max-width: 768px) {
     .matches-grid {
         grid-template-columns: 1fr; /* มือถือเรียง 1 แถว */
     }
 }

 /* 2. ดีไซน์การ์ดทายผลแบบใหม่ */
 .match-card-modern {
     background: var(--glass-bg);
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
     border: var(--card-border);
     border-radius: 20px;
     padding: 20px;
     position: relative;
     overflow: hidden;
     transition: transform 0.3s ease, box-shadow 0.3s ease;
     box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
 }

 .match-card-modern:hover {
     transform: translateY(-5px);
     box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
     border-color: var(--neon-gold);
 }

 /* League Badge Header */
 .league-badge {
     background: linear-gradient(90deg, #ff0000, #b30000);
     color: white;
     padding: 5px 15px;
     border-radius: 50px;
     font-size: 0.9rem;
     font-weight: bold;
     display: inline-block;
     margin-bottom: 15px;
     box-shadow: 0 4px 10px rgba(255, 0, 0, 0.3);
     font-family: 'Sukhumvit Set';
 }

 /* Teams Display */
 .match-versus-area {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 20px;
     position: relative;
 }

 .team-block {
     flex: 1;
     display: flex;
     flex-direction: column;
     align-items: center;
     text-align: center;
 }

 .team-logo-lg {
     width: 90px;
     height: 90px;
     object-fit: contain;
     filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
     transition: transform 0.2s;
     margin-bottom: 10px;
 }
 
 .team-block:hover .team-logo-lg {
     transform: scale(1.1);
 }

 .team-name-lg {
     font-size: 1.1rem;
     color: white;
     font-weight: 600;
     font-family: 'Sukhumvit Set';
     line-height: 1.3;
     height: 2.6em; /* จำกัดความสูง 2 บรรทัด */
     overflow: hidden;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
 }

 .vs-badge {
     width: 50px;
     height: 50px;
     background: #222;
     border: 2px solid var(--neon-gold);
     border-radius: 50%;
     display: flex;
     justify-content: center;
     align-items: center;
     color: var(--neon-gold);
     font-weight: 900;
     font-size: 1.2rem;
     font-style: italic;
     box-shadow: 0 0 15px rgba(255, 230, 0, 0.4);
     z-index: 2;
 }

 /* Input Area Design */
 .prediction-inputs {
     background: rgba(255, 255, 255, 0.05);
     border-radius: 15px;
     padding: 15px;
     margin-bottom: 15px;
     border: 1px solid rgba(255, 255, 255, 0.1);
 }

 .input-group-modern {
     display: flex;
     justify-content: center;
     align-items: center;
     gap: 15px;
 }

 .input-modern {
     width: 70px;
     height: 50px;
     background: #fff;
     border: none;
     border-radius: 10px;
     text-align: center;
     font-size: 1.5rem;
     font-weight: bold;
     color: #000;
     font-family: 'Sukhumvit Set';
     box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
 }

 .input-modern:focus {
     outline: 3px solid var(--neon-gold);
 }

 .select-modern {
     width: 100%;
     padding: 10px;
     border-radius: 8px;
     border: none;
     background: #333;
     color: #fff;
     font-family: 'Sukhumvit Set';
     text-align: center;
     margin-bottom: 10px;
     cursor: pointer;
 }

 .btn-modern {
     width: 100%;
     padding: 12px;
     background: linear-gradient(45deg, #ff0000, #ff5e00);
     color: white;
     border: none;
     border-radius: 12px;
     font-size: 1.1rem;
     font-weight: bold;
     font-family: 'Sukhumvit Set';
     cursor: pointer;
     transition: all 0.3s;
     text-transform: uppercase;
     letter-spacing: 1px;
     box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
 }

 .btn-modern:hover {
     background: linear-gradient(45deg, #b30000, #ff0000);
     transform: translateY(-2px);
     box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
 }

 .countdown-badge {
     text-align: center;
     color: var(--neon-gold);
     font-family: 'monospace';
     font-size: 1.1rem;
     margin-top: 10px;
     background: rgba(0,0,0,0.5);
     padding: 5px;
     border-radius: 8px;
 }

 /* 3. Modern Section Header */
 .section-header {
     text-align: center;
     margin: 40px 0 20px;
     position: relative;
 }

 .section-title {
     font-size: 2rem;
     color: #fff;
     text-transform: uppercase;
     letter-spacing: 2px;
     text-shadow: 0 0 10px var(--neon-gold);
     font-family: 'Sukhumvit Set';
     display: inline-block;
     border-bottom: 3px solid var(--neon-gold);
     padding-bottom: 5px;
 }

 /* 4. NEW GLASSMOPHISM TABLES (Horizontal Scroll on Mobile) */
 .glass-table-container {
    background: rgba(30, 30, 30, 0.85); /* พื้นหลังเข้มโปร่งแสง เพื่อให้ตัวหนังสืออ่านง่าย */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Key for scrolling on mobile */
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 30px;
}

/* Table Style */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff; /* Default Text White */
    font-family: 'Sukhumvit Set', sans-serif;
    min-width: 600px; /* บังคับความกว้างขั้นต่ำ เพื่อให้ไม่บีบจนเสียทรง และเกิด Scroll บนมือถือ */
}

/* Header */
.modern-table thead {
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-table th {
    padding: 18px;
    text-align: left;
    font-weight: 600;
    color: #ffe600; /* สีทองหัวข้อ */
    text-transform: uppercase;
    font-size: 0.95rem;
    white-space: nowrap; /* ห้ามตัดคำหัวข้อ */
}

/* Rows */
.modern-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

.modern-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modern-table td {
    padding: 16px;
    vertical-align: middle;
}

/* --- Cell Specific Styles (High Contrast) --- */

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #220029; /* ชื่อคนสีขาว */
    white-space: nowrap;
}

.user-icon {
    color: #710088;
    background: rgba(0, 198, 255, 0.15);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Team Info */
.team-info-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000; /* สีชมพู หรือ ฟ้า ให้ตัดกับพื้นหลัง */
    font-weight: 500;
    white-space: nowrap;
}

.team-mini-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Score */
.score-badge {
    background: rgb(24, 24, 24);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    min-width: 70px;
    text-align: center;
}

/* Time */
.time-text {
    color: #ffffff; /* สีเทาอ่อน */
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

/* Ranking Badges */
.rank-badge-wrap {
    display: flex;
    justify-content: center;
}

.rank-badge-new {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: #000000;
    background: rgba(255,255,255,0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rank-1 { background: linear-gradient(135deg, #FFD700, #ffb300); color: #000; border: none; box-shadow: 0 0 10px rgba(255, 215, 0, 0.6); }
.rank-2 { background: linear-gradient(135deg, #E0E0E0, #9e9e9e); color: #000; border: none; }
.rank-3 { background: linear-gradient(135deg, #CD7F32, #8d6e63); color: #000; border: none; }

/* Streak & Bonus */
.streak-count {
    color: #ff4757;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.bonus-text {
    color: #ff0000;
    font-weight: bold;
    font-size: 1.15rem;
    text-shadow: 0 0 8px rgba(46, 213, 115, 0.4);
}

.total-score {
    color: #000000;
    font-weight: 800;
    font-size: 1.15rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* CSS ใหม่สำหรับส่วนสถิติคนเชียร์ */
 .vote-card-modern {
    background: rgba(255, 255, 255, 0.05); /* Glass feel */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.vote-card-modern:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 230, 0, 0.5);
}
.vote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.vote-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35%;
}
.vote-team img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.vote-team-name {
    font-size: 0.95rem;
    color: #fff;
    text-align: center;
    font-family: 'Sukhumvit Set';
    line-height: 1.2;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.vote-vs-badge {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffe600;
    font-style: italic;
    text-shadow: 0 0 15px rgba(255, 230, 0, 0.6);
}
.vote-bar-container {
    height: 14px;
    background: #2a2a2a;
    border-radius: 50px;
    overflow: hidden;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
    margin-top: 5px;
}
.vote-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.8s ease-in-out;
    position: relative;
}
/* แสงวิ้งๆ บนหลอด */
.vote-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2), transparent);
}
.vote-bar.home {
    background: linear-gradient(90deg, #ff0b0b, #ff2b2b); /* สีแดงไล่เฉด */
    box-shadow: 0 0 10px rgba(255, 75, 43, 0.4);
}
.vote-bar.away {
    background: linear-gradient(90deg, #0026ff, #0072ff); /* สีฟ้าไล่เฉด */
    box-shadow: 0 0 10px rgba(0, 114, 255, 0.4);
}
.vote-stats-text {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #ccc;
    font-family: 'Sukhumvit Set';
    font-weight: 500;
}
.vote-stats-text .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-home { color: #ff6b6b; }
.stat-away { color: #4facfe; }

/* === MODERN NAVBAR === */
.modern-navbar {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 70px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.brand-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 230, 0, 0.4));
    transition: transform 0.3s;
}

.nav-brand:hover .brand-logo {
    transform: scale(1.05) rotate(-3deg);
}

/* Toggle */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    margin-left: 15px; /* Add margin to separate from auth buttons */
}

/* Menu (Links) */
.nav-menu {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-family: 'Sukhumvit Set', sans-serif;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-link.active, .nav-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffe600;
    transition: width 0.3s;
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

/* Controls (Auth + Toggle) */
.nav-controls {
    display: flex;
    align-items: center;
}

/* Auth Buttons */
.auth-buttons-group {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-family: 'Sukhumvit Set', sans-serif;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-register-nav {
    background: transparent;
    border: 2px solid #ffe600;
    color: #ffe600;
}

.btn-register-nav:hover {
    background: #ffe600;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.4);
}

.btn-login-nav {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
}

.btn-login-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.5);
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 15px 6px 6px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.3s;
    color: #fff;
    font-family: 'Sukhumvit Set', sans-serif;
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
}

.profile-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #a8ff78, #78ffd6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 0.9rem;
}

.profile-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
    padding: 8px;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.user-profile-dropdown:hover .profile-menu {
    display: block;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #ddd;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
    font-family: 'Sukhumvit Set', sans-serif;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.menu-item.logout {
    color: #ff6b6b;
}

.menu-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 20, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 20px;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: none;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        justify-content: flex-start;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
        justify-content: center;
    }

    /* Auth Buttons visible on navbar */
    .nav-auth {
        display: block;
    }

    .auth-buttons-group {
        flex-direction: row; /* Keep buttons in row */
        gap: 8px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Mobile User Profile (Keep it compact on right) */
    .profile-trigger {
        padding: 4px 10px 4px 4px;
    }
    
    .profile-name {
        display: none; /* Hide name on mobile to save space */
    }
    
    .user-profile-dropdown:hover .profile-menu {
        display: none; /* Disable hover menu */
    }

}


/* =========================================
   AUTH PAGES (Login & Register)
   ========================================= */
.auth-wrapper {

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px; /* Top padding to clear Navbar */
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(30, 30, 30, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.5s ease-out;
}

.auth-title {
    text-align: center;
    color: #ffffff;
    font-family: 'Sukhumvit Set', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 230, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    color: #cccccc;
    margin-bottom: 8px;
    font-family: 'Sukhumvit Set', sans-serif;
    font-size: 1rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Sukhumvit Set', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Important for padding */
}

.form-control:focus {
    outline: none;
    border-color: #ffe600;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.15);
}

.form-control::placeholder {
    color: #666;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ffe600, #ffb300);
    color: #000;
    border: none;
    border-radius: 12px;
    font-family: 'Sukhumvit Set', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5);
    background: linear-gradient(135deg, #ffb300, #ffe600);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: #aaa;
    font-family: 'Sukhumvit Set', sans-serif;
    font-size: 0.95rem;
}

.auth-footer a {
    color: #ffe600;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.error-message {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.5);
    color: #ff4757;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Sukhumvit Set', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Auth */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }
    .auth-title {
        font-size: 1.8rem;
    }
}

/* ======================================================
   RANKING PAGE (Modern + Safe Override)
   (วางไว้ท้ายสุดของ style3.css)
   ====================================================== */

.rk-page * { box-sizing: border-box; }

.rk-page{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 70px;
  color: #eaf0ff;
}

.rk-hero{
  background: linear-gradient(135deg, rgba(255,230,0,.18), rgba(59,130,246,.12));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  margin: 10px 0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.rk-hero h2{
  margin:0;
  font-size: 1.15rem;
  letter-spacing: .2px;
  display:flex;
  align-items:center;
  gap:10px;
  font-family: 'Sukhumvit Set';
}

.rk-hero .sub{
  font-size: .72rem;
  color: rgba(234,240,255,.75);
  margin-top: 4px;
  font-family: 'Sukhumvit Set';
}

.rk-hero-badge{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  white-space: nowrap;
  font-size: .92rem;
  color: rgba(234,240,255,.75);
  font-family: 'Sukhumvit Set';
}

.rk-filter{
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rk-filter .label{
  display:flex; align-items:center; gap:10px;
  font-weight: 800;
  color: #ffe600;
  font-size: 1rem;
  font-family: 'Sukhumvit Set';
}

.rk-filter form{
  width: 100%;
  display:flex;
  justify-content:flex-end;
}

.rk-select-wrap{
  position: relative;
  min-width: 240px;
  width: 100%;
  max-width: 420px;
}

.rk-select-wrap:after{
  content:"\f078";
  font-family:"Font Awesome 6 Free";
  font-weight: 900;
  position:absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(234,240,255,.75);
  pointer-events:none;
  font-size:.9rem;
}

.rk-select{
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 11px 40px 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(10,14,25,.55);
  color: #eaf0ff;
  font-family: 'Sukhumvit Set';
  font-size: 1rem;
  outline: none;
  transition: .15s ease;
}

.rk-select:focus{
  border-color: rgba(255,230,0,.55);
  box-shadow: 0 0 0 4px rgba(255,230,0,.15);
}

.rk-card{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0,0,0,.26);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.rk-topbar{
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.06), transparent);
  font-family: 'Sukhumvit Set';
}

.rk-topbar .title{
  display:flex; align-items:center; gap:10px;
  font-weight: 900;
}

.rk-topbar .hint{
  color: rgba(234,240,255,.70);
  font-size: .72rem;
  display:flex; align-items:center; gap:8px;
}

.rk-card table{
  width: 100%;
  margin-top: 0 !important;
  border-collapse: collapse;
  background: #000000a1 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.rk-scroll{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rk-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-family: 'Sukhumvit Set';
}

.rk-table thead th{
  text-align: left;
  font-size: .92rem;
  color: rgba(234,240,255,.80);
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.rk-table tbody td{
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  vertical-align: middle;
}

.rk-table tbody tr:hover{
  background: rgba(255,255,255,.04);
}

.rk-rank{
  width: 40px; height: 40px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  font-weight: 900;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #eaf0ff;
}

.rk-r1{ background: linear-gradient(135deg, rgba(255,230,0,.55), rgba(255,230,0,.18)); color:#111827; }
.rk-r2{ background: linear-gradient(135deg, rgba(226,232,240,.50), rgba(226,232,240,.12)); color:#0b1220; }
.rk-r3{ background: linear-gradient(135deg, rgba(245,158,11,.55), rgba(245,158,11,.16)); color:#111827; }

.rk-user{
  display:flex; align-items:center; gap:10px;
  min-width: 220px;
}

.rk-avatar{
  width: 38px; height: 38px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(59,130,246,.18);
  border: 1px solid rgba(59,130,246,.28);
  color:#eaf0ff;
}

.rk-name a{
  color: #eaf0ff;
  text-decoration: none;
  font-weight: 900;
}

.rk-name a:hover{ color: #ffe600; }

.rk-name small{
  display:block;
  color: rgba(234,240,255,.70);
  font-size: .85rem;
  margin-top: 4px;
}

.rk-pill{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.16);
  font-weight: 900;
  white-space: nowrap;
}

.rk-pill.hot{ border-color: rgba(255,71,87,.35); }
.rk-pill.hot span{ color: #ff4757; }

.rk-pill.good{ border-color: rgba(34,197,94,.35); }
.rk-pill.good span{ color: #22c55e; }

.rk-score{
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: .2px;
}

.rk-bonus.plus{ color:#ff4757; font-weight:900; }
.rk-bonus.none{ color: rgba(234,240,255,.50); font-weight:900; }

.rk-empty{
  padding: 26px 16px;
  text-align:center;
  color: rgba(234,240,255,.75);
  font-family: 'Sukhumvit Set';
}

.rk-empty i{ font-size: 2.6rem; opacity: .55; margin-bottom: 10px; }

@media (max-width: 640px){
  .rk-hero{ flex-direction: column; align-items:flex-start; }
  .rk-filter{ flex-direction: column; align-items:flex-start; }
  .rk-filter form{ justify-content:flex-start; width:100%; }
  .rk-select-wrap{ max-width:none; }
  .rk-hero-badge{ width:100%; justify-content:space-between; }
}


/* แถวคู่ (สีอ่อน) ให้ตัวหนังสือเข้ม */
.rk-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.12);
}

/* ชื่อผู้ใช้ */
.rk-table tbody tr:nth-child(even) .rk-name a {
    color: #ffffff !important;
}

/* เวลาส่งล่าสุด */
.rk-table tbody tr:nth-child(even) .rk-name small {
    color: rgba(255,255,255,0.85) !important;
}

/* Total Score */
.rk-table tbody tr:nth-child(even) .rk-score {
    color: #ffffff !important;
    font-weight: 900;
}

/* ลบสีเทาซีดจาก global table เก่า */
.rk-table td,
.rk-table th {
    color: #ffffff !important;
}

/* ทำให้หัวตารางเด่นขึ้น */
.rk-table thead th {
    color: #ffe600 !important;
}

/* ทำให้ rank badge อ่านง่ายทุกพื้นหลัง */
.rk-rank {
    color: #ffffff !important;
}

.banner-card{
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

/* โชว์ภาพเต็มแบบไม่โดนตัด */
.banner-img{
  width: 100%;
  height: auto;         /* สำคัญ: ไม่บังคับสูง */
  display: block;
  object-fit: contain;  /* ไม่ crop */
}

/* === MODERN NAVBAR === */
.modern-navbar {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 70px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.brand-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 230, 0, 0.4));
    transition: transform 0.3s;
}

.nav-brand:hover .brand-logo {
    transform: scale(1.05) rotate(-3deg);
}

/* Toggle */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    margin-left: 15px; /* Add margin to separate from auth buttons */
}

/* Menu (Links) */
.nav-menu {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-family: 'Sukhumvit Set', sans-serif;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-link.active, .nav-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffe600;
    transition: width 0.3s;
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

/* Controls (Auth + Toggle) */
.nav-controls {
    display: flex;
    align-items: center;
}

/* Auth Buttons */
.auth-buttons-group {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-family: 'Sukhumvit Set', sans-serif;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-register-nav {
    background: transparent;
    border: 2px solid #ffe600;
    color: #ffe600;
}

.btn-register-nav:hover {
    background: #ffe600;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.4);
}

.btn-login-nav {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
}

.btn-login-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.5);
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 15px 6px 6px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.3s;
    color: #fff;
    font-family: 'Sukhumvit Set', sans-serif;
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
}

.profile-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #a8ff78, #78ffd6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 0.9rem;
}

.profile-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
    padding: 8px;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.user-profile-dropdown:hover .profile-menu {
    display: block;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #ddd;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
    font-family: 'Sukhumvit Set', sans-serif;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.menu-item.logout {
    color: #ff6b6b;
}

.menu-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 20, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 20px;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: none;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        justify-content: flex-start;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
        justify-content: center;
    }

    /* Auth Buttons visible on navbar */
    .nav-auth {
        display: block;
    }

    .auth-buttons-group {
        flex-direction: row; /* Keep buttons in row */
        gap: 8px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Mobile User Profile (Keep it compact on right) */
    .profile-trigger {
        padding: 4px 10px 4px 4px;
    }
    
    .profile-name {
        display: none; /* Hide name on mobile to save space */
    }
    
    .user-profile-dropdown:hover .profile-menu {
        display: none; /* Disable hover menu */
    }

}

.swal2-confirm.modern-btn{
  border: 0 !important;
  border-radius: 14px !important;
  padding: 10px 18px !important;
  font-weight: 900 !important;
  letter-spacing: .2px;
  color: rgba(255, 255, 255, 0.95) !important;

  /* gradient สีหลักเว็บ */
  background: linear-gradient(135deg, var(--p1), var(--c1)) !important;

  /* glow ให้ดู premium */
  box-shadow:
    0 14px 30px rgba(168,85,247,.28),
    0 14px 30px rgba(34,211,238,.22) !important;

  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
  min-width: 130px;
}

.swal2-confirm.modern-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 16px 36px rgba(168,85,247,.34),
    0 16px 36px rgba(34,211,238,.28) !important;
}

.swal2-confirm.modern-btn:active{
  transform: translateY(0px) scale(.99);
  filter: brightness(1.00);
}

/* (เสริม) ให้ปุ่มโฟกัสสวย ๆ */
.swal2-confirm.modern-btn:focus{
  outline: none !important;
  box-shadow:
    0 0 0 4px rgba(168,85,247,.20),
    0 0 0 7px rgba(34,211,238,.14),
    0 16px 36px rgba(0,0,0,.25) !important;
}