@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;          /* ปรับขนาดภาพให้เต็มพื้นที่ */
    margin: 0;
    padding: 0;
  }

@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;
}

body {
    font-family: 'Inter', sans-serif;
}

table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

table th, table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

    /* สำหรับ 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: 26px;
            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 */
header {
    background-color: #00259e; /* พื้นหลังเข้ม */
    padding: 15px 0px; /* ระยะห่างจากขอบ */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* เงาด้านล่าง */
    transition: background-color 0.3s ease; /* เปลี่ยนสีพื้นหลังเมื่อ hover */
}

header:hover {
    background-color: #002c79; /* สีเมื่อเมาส์ชี้ที่ 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: 1rem;
}

.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: #a200ff;
}

.navbar {
    background-image: url("../imges/hbg.webp");
    border-bottom: 1px solid #af02ff;
    padding-bottom: 20px;
    padding-top: 10px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
  }

  .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
  }

  .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    text-decoration: none;
    width: 60px;
    height: 60px; 
  }

  .auth-buttons {
    display: flex;
    gap: 10px;
  }

  .btn {
    padding: 12px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    white-space: nowrap;
    text-align: center;
    font-family: 'Sukhumvit Set';
  }

  .btn-register {
    background-color: #ff0000;
    color: white;
    width: 100px;
  }

  .btn-login {
    background-color: #ffd900;
    color: rgb(0, 0, 0);
  }

  .menu-toggle {
    display: none;
  }

  @media (max-width: 768px) {
    .container {
      flex-direction: column;
      align-items: center;
    }

    .logo {
      order: 1;
      text-align: center;
      width: 100%;
      margin-bottom: 10px;
    }

    .auth-buttons {
      order: 2;
      display: flex;
      justify-content: center;
      width: 100%;
      gap: 20px;
      margin-top: 5px;
    }

    .auth-buttons a {
      min-width: 120px;
      text-align: center;
    }

    .menu-toggle {
      display: none;
    }
  }

  /* 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: #fff;
    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: #4CAF50;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

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: 8px;
  }

  /* ห่อ 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: 100px;
}

.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: 160px;
    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: 160px;
    max-width: 95%;
    padding: 0 8px;
  }
  .col-md-12 img {
    max-width: 95%;
  }
}

/* 💻 Desktop */
@media (min-width: 769px) {
  .col-md-12 {
    max-width: 800px;
  }
}