/* ===== ฟอนต์และกล่องพื้นฐาน ===== */
* {
  box-sizing: border-box;
}

.wrapper {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

body {
  margin: 0;
  font-family: 'Sarabun', sans-serif;
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #b91414, #b91414);
  color: #f5f5f5;
}



/* Main Content */
.main-content {
  padding: 100px 20px 20px;
  text-align: center;
}

/* ===== ------------------------เปิด------ส่วนหัว เมนูบาร์-----เปิด--------------------------------------- ===== */

/* ===== ส่วนหัวบนสุด ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #790000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1vh 2vw;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  gap: 20px;
  flex-wrap: nowrap;
}

/* ===== โลโก้ ===== */
.logo-img {
  width: 14vw;
  max-width: 220px;
  min-width: 90px;
}

/* ===== ข้อความวิ่ง ===== */
.marquee {
  flex: 1; /* ✅ ขยายกลางให้เต็มที่ */
  overflow: hidden;
  background-color: #280000;
  border: 1px solid rgb(255, 153, 0); /* ขอบสีทอง */
  padding: 10px 20px;
  color: #fff;
  font-weight: bold;
  font-size: 0.95rem;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  padding-left: 100%;
  animation: marquee-scroll 15s linear infinite;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.marquee-alt {
  display: none;
  background-color: #bf1616;
  color: white;
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}

/* ===== ปุ่ม ===== */
.auth-buttons {
  display: flex;
  gap: 10px;
}

.auth-buttons a {
  background: linear-gradient(0deg, rgb(105, 0, 0), #e60000);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
  color: rgb(255, 255, 255);
  padding: 1vh 1.5vw;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.auth-buttons a:hover {
  transform: scale(1.05);
  color: rgb(0, 0, 0);
  background: #ff9900;
}

/* ===== ขนาดบนมือถือ (Topbar) ===== */
@media (max-width: 728px) {
  .topbar {
    flex-wrap: wrap;              /* ให้เนื้อหาเว้นบรรทัดเมื่อพื้นที่ไม่พอ */
    padding: 1vh 3vw;
    height: auto;                 /* ปรับให้สูงตามเนื้อหา */
    gap: 10px;
    justify-content: center;     /* จัดให้อยู่กลาง */
  }

  .logo {
    width: 100%;
    display: flex;
    justify-content: center; /* ✅ จัดให้โลโก้ตรงกลางแนวนอน */
  }

  .logo-img {
    width: 40vw;
    max-width: 180px;
    min-width: 80px;
  }

  .marquee {
    font-size: 0.85rem;
    padding: 8px 10px;
    order: 3;                    /* ให้ marquee อยู่ด้านล่างสุดของ .topbar */
    width: 100%;
  }

  .auth-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .auth-buttons a {
    font-size: 0.9rem;
    padding: 8px 14px;
    flex: 1 1 auto;               /* ปรับให้ปุ่มขยายตามพื้นที่ */
    max-width: 160px;
    text-align: center;
  }
}

/* ===== -------------------------ปิด------ส่วนหัว เมนูบาร์-----ปิด--------------------------------------- ===== *


/* ✅ ปุ่ม Hamburger */
.hamburger-toggle {
  position: fixed;
  top: 14px;
  left: 10px;
  background: gold;
  border: none;
  border-radius: 30px;
  padding: 10px 14px;
  font-size: 18px;
  z-index: 1100;
  cursor: pointer;
  display: none;
}

/* ✅ Sidebar มือถือ */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 260px;
  height: 100%;
  background-color: #410000;
  padding: 60px 20px 20px;
  transition: left 0.3s ease;
  z-index: 1050;
}

.mobile-sidebar.show {
  left: 0;
}

/* ✅ ปุ่มปิดเมนู */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: gold;
  border: none;
  font-size: 22px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* ✅ เมนูภายใน */
.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px;
  margin: 12px auto;
  width: 90%;
  background: linear-gradient(to bottom, #760000, #400000);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  transition: all 0.3s;
}

.mobile-nav a:hover {
  background: gold;
  color: #410000;
  transform: scale(1.05);
}

.mb-nav-icon-img {
  width: 40px;
  height: auto;
  margin-bottom: 6px;
  object-fit: contain;
}

.mb-nav-label {
  font-size: 14px;
  line-height: 1.2;
}

/* 🔒 ซ่อน mobile sidebar และปุ่ม hamburger บน Desktop */
.mobile-sidebar,
.hamburger-toggle {
  display: none;
}

/* ✅ แสดงเฉพาะบนมือถือ (จอ ≤ 768px) */
@media (max-width: 768px) {
  .hamburger-toggle {
    display: block; /* แสดงปุ่ม hamburger */
  }

  .mobile-sidebar {
    display: block; /* พร้อมใช้งาน (แต่เริ่มต้นซ่อนไว้ทางซ้ายด้วย left:-100%) */
  }

}


/* ===== -------------------------เปิด--------------------เปิด------------------------------------ ===== */

.container {
  max-width: 750px;
  margin: 40px auto;
  padding: 30px;
  background: linear-gradient(to bottom, #1a1a1a, #000000);
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.15);
  border: 2px solid #ffd700;
}

h1, h2 {
  text-align: center;
  color: #ffd700;
  margin-bottom: 20px;
}

.input-section {
  text-align: center;
  margin-bottom: 30px;
}

.input-section button {
  background-color: #ffd700;
  color: #0d0d0d;
  border: none;
  padding: 12px 24px;
  margin: 6px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.input-section button:hover {
  background-color: #ffcc00;
  transform: scale(1.05);
}

.reset-btn {
  background-color: #cc0000 !important;
  color: #fff !important;
}

.history, .analysis, .prediction {
  margin-top: 20px;
  padding: 15px;
  background-color: #1a1a1a;
  border-radius: 10px;
  border: 1px solid #333;
}

#resultHistory {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.result-box {
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: bold;
  color: white;
  min-width: 60px;
  text-align: center;
  font-size: 16px;
}

.result-box.P { background-color: #0066cc; }
.result-box.B { background-color: #cc0000; }
.result-box.T { background-color: #999999; }


.summary {
  margin-top: 20px;
  padding: 15px;
  background-color: #1a1a1a;
  border-radius: 10px;
  border: 1px solid #333;
  color: #ffd700;
}

.summary ul {
  list-style: none;
  padding-left: 0;
  font-size: 16px;
  line-height: 1.8;
}

.chip {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 16px;
  background-color: #222;
  color: #fff;
  border: 2px solid #555;
  margin: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
}

.highlight-chip {
  background-color: #ffd700;
  color: #000;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
  transform: scale(1.05);
}

.chip.warning {
  background-color: #999;
  color: #222;
}

/* ===== -------------------------ปิด----------------เปิด------------------------------------ ===== */



/* ===== -------------------------เปิด-----------เมนูทางซ่าย Dektop----------เปิด------------------------------------ ===== */

/* ===== เมนูด้านข้างซ้าย (Sidebar) ===== */
.sidebar {
  position: fixed; /* ตรึงตำแหน่งไว้ด้านซ้ายของหน้าจอ */
  top: 80px; /* ระยะห่างจากด้านบน 80px (เว้น Topbar) */
  left: 10px; /* ระยะห่างจากขอบซ้าย */
  width: 220px; /* กำหนดความกว้างของ Sidebar */
  height: calc(100vh - 110px); /* ความสูงเต็มหน้าจอ ลบส่วนหัวและระยะเว้น */
  background-color: #410000; /* พื้นหลังสีแดงเข้ม */
  padding: 30px 10px; /* ระยะห่างด้านใน */
  display: flex; /* จัด Layout ด้วย Flex */
  flex-direction: column; /* เรียงแนวตั้ง */
  border-radius: 10px; /* ขอบโค้งมน */
  gap: 20px; /* เว้นช่องห่างระหว่างเมนู */
  box-shadow: 4px 5px 4px rgba(0, 0, 0, 0.5); /* เงาทองด้านข้าง */
  align-items: center; /* จัดให้อยู่กลางในแนวนอน */
}

@media (max-width: 728px) {
  .sidebar {
    display: none;
  }
  }

/* ===== ปุ่มเมนู ===== */
.nav-item {
  display: flex; /* ใช้ Flex จัดไอคอนและข้อความ */
  flex-direction: column; /* ให้เรียงจากบนลงล่าง */
  align-items: center; /* จัดให้อยู่กลาง */
  justify-content: center; /* จัดให้อยู่กลางแนวตั้ง */
  background: linear-gradient(to bottom, #760000, #400000); /* ไล่สีพื้นหลังปุ่ม */
  border: 2px solid gold; /* ขอบสีทอง */
  border-radius: 12px; /* ขอบโค้งมน */
  padding: 12px 10px; /* ช่องว่างภายในปุ่ม */
  text-align: center; /* จัดข้อความตรงกลาง */
  width: 100%; /* ให้กว้างเต็มบล็อก */
  color: white; /* สีข้อความ */
  text-decoration: none; /* ลบขีดเส้นใต้ */
  transition: transform 0.2s, background 0.3s; /* เอฟเฟกต์เวลา hover */
}

.nav-item:hover {
  background-color: rgb(255, 0, 0); /* เปลี่ยนพื้นหลังเมื่อ hover */
  color: #ffbf00; /* เปลี่ยนสีข้อความ */
  transform: scale(1.05); /* ขยายเล็กน้อยเมื่อ hover */
  font-weight: bold; /* ข้อความหนาเมื่อ hover */
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5); /* เพิ่มเงาทอง */
}

/* ===== ไอคอนในเมนู ===== */
.nav-icon-img {
  width: 40px; /* กำหนดขนาดความกว้าง */
  height: 40px; /* กำหนดความสูง */
  margin-bottom: 6px; /* เว้นระยะด้านล่างก่อนข้อความ */
  object-fit: contain; /* ให้รูปไม่ยืดหรือเพี้ยน */
  transition: transform 0.3s; /* เอฟเฟกต์เวลา hover */
}

.nav-item:hover .nav-icon-img {
  transform: scale(1.1); /* ขยายไอคอนเมื่อ hover */
}

/* ===== ข้อความใต้ไอคอน ===== */
.nav-label {
  font-size: 14px; /* ขนาดตัวอักษร */
  line-height: 1.2; /* ความสูงบรรทัด */
}

/* ===== ปุ่มอื่น ๆ ด้านใน (ถ้ามี) ===== */
.sider-buttons a {
  background: linear-gradient(45deg, gold, #ffec80);
  color: black;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  margin-left: 10px;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* ===== -------------------------ปิด-----------เมนูทางซ่าย Dektop----------ปิด------------------------------------ ===== */

/* ===== ---------------------------------------------------------------------------------- ===== */

/* ===== พื้นที่เนื้อหาหลัก ===== */
.main {
  margin-left: 220px;
  margin-top: 50px;
  padding: 26px;
  flex: 1;
}

/* สำหรับหน้าจอเล็กกว่า 768px (Mobile, Tablet) */
@media (max-width: 768px) {
  .main {
    margin-left: 0;        /* ไม่ต้องเผื่อ Sidebar ที่ซ่อนไว้ */
    margin-top: 100px;      /* คงไว้เท่าเดิมเพื่อเผื่อ Topbar */
    padding: 15px 10px;    /* ลด padding ให้พอดีกับมือถือ */
  }
}


.image-box {
  margin-top: 3px;
  margin-bottom: 8px;
  text-align: center; /* จัดภาพให้อยู่กลาง */
}
@media (max-width: 768px) {
.image-box {
    margin-top: 46%;      /* คงไว้เท่าเดิมเพื่อเผื่อ Topbar */
  }

}
.main-image {
  width: 100%;
  max-width: 1200px; /* ไม่เกินขนาดนี้ */
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(255, 217, 0, 0.3);
  transition: transform 0.3s ease;
}

.main-image:hover {
  transform: scale(1.02); /* ขยายเล็กน้อยเมื่อ hover */
}


/* ===== Section Hero หลัก (Desktop & Mobile) ===== */
.hero {
  background: linear-gradient(rgba(102, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
              url('https://images.unsplash.com/photo-1589732981684-4fc37a6ebf91?auto=format&fit=crop&w=1470&q=80') center/cover;
  padding: 80px 20px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.hero h1 {
  color: gold;
  font-size: 40px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  max-width: 640px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.hero a {
  background-color: gold;
  color: black;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
  transition: background 0.3s ease;
}

.hero a:hover {
  background-color: #fff5b0;
}

/* ===== Feature Section ด้านล่าง ===== */
.features {
  margin-top: 60px;
  padding: 40px 20px;
  background-color: #1a1a1a;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.15);
}

.features .section-title {
  font-size: 28px;
  color: gold;
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 30px;
  max-width: 500px;
}

.feature-list li {
  margin: 10px 0;
  font-size: 18px;
  color: #ddd;
}

/* ===== CTA Buttons ===== */
.cta-buttons a.hero-button,
.cta-buttons a.hero-button-outline {
  display: inline-block;
  margin: 0 10px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
}

.cta-buttons a.hero-button {
  background-color: gold;
  color: black;
}

.cta-buttons a.hero-button-outline {
  background-color: transparent;
  color: gold;
  border: 2px solid gold;
}

.cta-buttons a.hero-button:hover {
  background-color: #fff5b0;
}

.cta-buttons a.hero-button-outline:hover {
  background-color: gold;
  color: #150000;
}

/* ===== Responsive สำหรับมือถือ (≤768px) ===== */
@media (max-width: 768px) {
  .hero {
    padding: 60px 16px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero a {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .features {
    padding: 30px 16px;
  }

  .features .section-title {
    font-size: 22px;
  }

  .feature-list li {
    font-size: 16px;
  }

  .cta-buttons a.hero-button,
  .cta-buttons a.hero-button-outline {
    margin: 6px 5px;
    padding: 10px 18px;
    font-size: 0.9rem;
  }
}

/* -------------- ค่าบชั้นนำ Section ---------------- */
/* กล่องแสดงรูปเลื่อนแนวนอน */
.image-carousel {
  width: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.821) ;
  margin-top: 2%;
  border-radius: 8px;
  padding: 8px 10px;
}

/* แทร็กที่เคลื่อนที่ */
.carousel-track {
  display: flex;
  gap: 20px;
  animation: scroll-carousel 45s linear infinite;
  width: max-content;
}

.carousel-track img {
  width: 100%;
  height: 40px;
  align-items: center;
  object-fit: contain;
}

/* Keyframes สำหรับเคลื่อนที่ต่อเนื่อง */
@keyframes scroll-carousel {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}





/* -------------- คาสิโนยอดฮิต Section ---------------- */
.popular-casino {
  margin-top: 2%;
  padding: 40px 20px;
  background-color: #2a0000;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.1);
  text-align: center;
}

.popular-casino h2 {
  font-size: 2rem;
  color: gold;
  margin-bottom: 30px;
}

/* ===== แสดงแบบ Grid สำหรับ Desktop และ Tablet ===== */
.casino-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  justify-items: center;
}

/* ===== Card ของแต่ละแบรนด์คาสิโน ===== */
.casino-card {
  background: linear-gradient(to bottom, #3c0000, #1a0000);
  padding: 20px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s;
  width: 100%;
  max-width: 180px;
  text-align: center;
}

.casino-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6);
}

.casino-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 10px;
}

.casino-card p {
  color: white;
  font-weight: bold;
  margin: 0;
  font-size: 1rem;
}

/* ✅ Responsive สำหรับหน้าจอขนาดเล็ก (มือถือ) */
@media (max-width: 768px) {
  .popular-casino {
    padding: 8px 12px ;
  }

  .popular-casino h2 {
    font-size: 1.5rem;
  }

  .casino-grid {
    grid-template-columns: repeat(4, 1fr); /* เหลือ 2 คอลัมน์บนมือถือ */
    gap: 6px;
  }

  .casino-card {
    max-width: 85%;
    padding: 5px 5px;
  }

  .casino-card p {
    font-size: 0.80rem;
  }
}


/* ===== ---------------------------------------------------------------------------------- ===== */

/* กลุ่มปุ่ม 3D */
.button-3d-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  border-radius: 12px;
  padding: 26px 2px;
  background: linear-gradient(to bottom, #400000, #630000);
  box-shadow: 0 8px 15px rgba(70, 0, 0, 0.5);
}

/* ปุ่มสไตล์ 3D */
.btn-3d {
  display: inline-block;
  padding: 26px 26px;
  background: linear-gradient(to bottom, #ffffff, #6e6e6e);
  color: #000000;
  font-weight: bold;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 6px #fdfdfd;
  transition: all 0.2s ease-in-out;
  font-size: 1.2rem;
  min-width: 280px;
  text-align: center;
}

.btn-3d:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 215, 0, 0.5);
  background: linear-gradient(to bottom, #ffea00, #d4a900);
}

.btn-3d:active {
  transform: translateY(3px);
  box-shadow: 0 2px #aa7700;
}

/* Responsive สำหรับหน้าจอเล็ก */
@media (max-width: 768px) {
  .btn-3d {
    font-size: 0.95rem;
    min-width: 100%;
  }
}

/* ===== ---------------------------------------------------------------------------------- ===== */




/* ===== กล่องเกมส์ยอดฮิต (slot-box) ===== */
.slot-box {
  margin-top: 2%;
  padding: 2%;
  border-radius: 12px;
  color: rgba(255, 217, 0, 0.85);
}

/* ===== หัวข้อกล่อง ===== */
.slot-box h3 {
  text-align: center;
  font-size: 1.8rem;
  margin: 0 0 20px;
  color: white;
}

/* ===== กล่องจัดรูปภาพหลักและแกลเลอรี ===== */
.image-slot {
  display: flex;
  gap: 4%;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

/* ===== รูปหลักทางซ้าย ===== */
.slot-main-image {
  width: 35%;
  min-width: 250px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
}

/* ===== แกลเลอรีรูปเล็ก 4x3 ===== */
.slot-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex: 1;
  max-width: 500px;
}

.slot-gallery img {
  width: 100%;
  border-radius: 8px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.2);
}

.slot-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* ✅ Responsive Design สำหรับมือถือ */
@media (max-width: 728px) {
  .image-slot {
    flex-direction: column;
    align-items: center;
  }

  .slot-main-image {
    width: 90%;
    margin-bottom: 20px;
  }

  .slot-gallery {
    grid-template-columns: repeat(4, 1fr); /* ปรับให้แสดง 3 คอลัมน์บนมือถือ */
    width: 100%;
    padding: 0 10px;
  }

  .slot-gallery img {
    width: 100%;
  }
}

/* ===== ---------------------------------------------------------------------------------- ===== */

/* ===== animated-icons (อนิเมชั่น ไอคอน) ===== */

/* ===== กล่องเกมหลัก ===== */
.game-box {
  background-color: #1a1a1a;         /* สีพื้นหลังเข้ม */
  border: 1px solid gold;           /* ขอบสีทอง */
  border-radius: 10px;              /* มุมโค้ง */
  width: 100%;                      /* ปรับให้ยืดเต็มพื้นที่กริด */
  max-width: 260px;                 /* ไม่เกิน 260px บนจอใหญ่ */
  padding: 20px;
  text-align: center;
  margin: 0 auto;                   /* จัดตรงกลาง */
  box-sizing: border-box;
}

/* ===== ไอคอนแบบ Lottie หรือภาพ ===== */
.lottie-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  display: block;
}

/* ✅ Responsive สำหรับมือถือ */
@media (max-width: 768px) {
  .game-box {
    width: 90%;              /* ยืดกล่องให้ใหญ่ขึ้นบนมือถือ */
    max-width: 100%;
    padding: 16px;
  }

  .lottie-icon {
    width: 60px;
    height: 60px;
  }
}


/* ===== ---------------------------------------------------------------------------------- ===== */

/* ===== ---------------------------------------------------------------------------------- ===== */

/* 🔽 ปุ่มลอยมุมขวาล่าง ซ่อนตอนแรก */
/* 🔽 ปุ่มลอยด้านขวาล่าง (ซ่อนไว้ตอนเริ่มต้น) */
#floating-register {
  position: fixed;
  bottom: 3%;
  right: 1%;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 🔽 เมื่อเปิดใช้งาน (ผ่านคลาส show) */
#floating-register.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* 🔽 ปรับขนาดภาพให้ใหญ่ขึ้นและ responsive */
#floating-register img {
  width: 20vw;           /* ขยายจากเดิม */
  max-width: 170px;      /* ขนาดใหญ่สุดที่อนุญาต */
  height: auto;
  border-radius: 10%;
  box-shadow: 0 0px 0px rgba(255, 215, 0, 0.5);
  transition: transform 0.3s ease;
  cursor: pointer;
}

#floating-register img:hover {
  transform: scale(1.15);
}

/* 🔽 บนอุปกรณ์เล็ก ปรับขนาดอัตโนมัติ */
@media (max-width: 500px) {
  #floating-register img {
    width: 26vw;
    max-width: 100px;
  }
}

/* ===== ---------------------------------------------------------------------------------- ===== */


footer {
  margin-top: 50px;
  font-size: 14px;
  color: #bbb;
  text-align: center;
}


/* ===== ---------------------------------------------------------------------------------- ===== */
/* ===== Responsive สำหรับมือถือ ===== */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 10px 20px;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 15px;
  }

  .main {
    margin: 0;
    padding: 20px;
  }
}
/* ===== ---------------------------------------------------------------------------------- ===== */