/* 🌑 RESET + BASE */
* {
  font-family: "Noto Sans", "Noto Sans Thai", "Noto Sans JP", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, #0f0f0f, #1b1b1b);
  color: #f0f0f0;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent; 
}

body::-webkit-scrollbar {
  display: none;
}
html, body {
  scrollbar-width: none;
}

*::selection {
  background: rgba(212, 73, 135, 0.541); 
  color: #ffffff;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.6),
    0 0 4px rgba(255, 255, 255, 0.3),
    0 0 6px rgba(255, 255, 255, 0.15);  
}

body.no-scroll {
  overflow: hidden;
}

#header-container {
  overflow: hidden;
  line-height: 0;     
}

/* ===============================
   HEADER / LOGO FIXED FULL WIDTH
   =============================== *//* --- HEADER --- */
.side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background-color: rgba(0,0,0,0.685);
  height: 70px;
  width: 100vw;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 9000;
  border-bottom: 1px solid #333;
  backdrop-filter: blur(13px);
  box-sizing: border-box;
}

/* --- LOGO --- */
.logo-img {
  width: 110px;
  height: auto;
  margin-left: 0;
  margin-right: 10px;
  z-index: 9999;
}
.logo-text {
  overflow: hidden;
  text-indent: -9999px;
  line-height: 0;
  display: block;
}


/* --- ANIMATION: คลิก hamburger ให้เป็น X --- */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .side-header {
    padding: 0.8rem 1rem;
  }
  .logo-img {
    width: 90px;
  }
  .menu-toggle {
    width: 22px;
    height: 18px;
  }
  .menu-toggle span {
    height: 2.5px;
  }
}




.logo a {
  display: contents; 
}


.logo-text {
  font-weight: 600;
  font-size: 1.5rem;
  color: #ffffff;
}


/* ===============================
   MENU ICON / TOGGLE
   =============================== */
.menu-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.menu-toggle,
.side-menu a {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.menu-toggle {
  position: absolute;
  top: 1.4rem;
  right: 1.5rem;
  z-index: 3000;
  width: 32px;
  height: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-toggle span {
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.4s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 10px; }
.menu-toggle span:nth-child(3) { top: 20px; }

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}

/* ===============================
   OVERLAY
   =============================== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 800;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: none;
  will-change: opacity, transform;
}

.overlay.show {
  display: block;
}

/* ===============================
   SIDE MENU
   =============================== */
.side-menu {
  position: fixed;
  top: 1;
  right: -300px;
  width: 300px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.685);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.5rem;
  gap: 1.2rem;
  transition: right 0.3s ease-in-out;
  z-index: 1000;
  overflow-y: auto;
  overscroll-behavior: contain;
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px); 
  border-left: 1px solid #333;
  will-change: opacity, transform;
}

.side-menu.open {
  right: 0;
}

.side-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
  transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

/* ===============================
   TEXT + ICON HOVER EFFECT
   =============================== */
.side-menu a:hover {
  color: #d44987;
  text-shadow: 
    0 0 6px rgba(212, 73, 135, 0.7),
    0 0 12px rgba(212, 73, 135, 0.5),
    0 0 18px rgba(212, 73, 135, 0.3);
  border-bottom-color: #d44987;
  transform: translateX(6px);
}

/* ICON IMAGE HOVER */
.side-menu a img.menu-icon {
  width: 28px;
  height: 28px;
  transition: filter 0.3s ease, transform 0.3s ease;
  filter: brightness(0.9) saturate(0.9);
}

.side-menu a:hover img.menu-icon {
  filter: brightness(1.4) saturate(1.3) drop-shadow(0 0 6px rgba(212, 73, 135, 0.6));
  transform: scale(1.08);
}

/* ===============================
   ACTIVE MENU ITEM
   =============================== */
.side-menu a.active {
  color: #49d467;
  text-shadow:
    0 0 6px rgba(73, 212, 103, 0.7),
    0 0 12px rgba(73, 212, 103, 0.5),
    0 0 18px rgba(73, 212, 103, 0.3);
  border-bottom-color: #49d467;
}

.side-menu a.active img.menu-icon {
  filter: brightness(1.5) saturate(1.5) drop-shadow(0 0 8px rgba(73, 212, 103, 0.8));
  transform: scale(1.05);
}

/* ===============================
   SIDE MENU FOOTER
   =============================== */
.side-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background-color: #1a1a1a;
  color: #ccc;
  text-align: center;
  padding: 25px 15px;
  font-size: 0.9rem;
  border-top: 2px solid #333;
  font-size: 12px;
}

.side-footer p {
  margin: 6px 0;
}

.side-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.side-footer .footer-links li a {
  color: #ffcc66;
  /* text-decoration: none; */
  transition: color 0.3s;
}

.side-footer .footer-links li a:hover {
  color: #ffd480;
}

.side-footer a {
  color: #ffcc66;
  /* text-decoration: none; */
  transition: color 0.3s;
}

.side-footer a:hover {
  color: #ffd480;
}

.social-links a {
  display: inline-block;
  justify-content: center;
  color: white;
  padding: 10px;
  margin: 1px;
  margin-top: 15px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: transform 0.2s;
  font-size: 12px;
}


/* สีพื้นหลังแต่ละโซเชียล */
.social-links a.facebook { background-color: #3b5998; }
.social-links a.twitter  { background-color: #1da1f2; }
.social-links a.instagram{ background-color: #e1306c; }
.social-links a.youtube  { background-color: #ff0000; }

.social-links a.instagram {
  background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
}

/* Responsive */
/* @media (max-width: 480px) {
  .side-footer .footer-links {
    flex-direction: column;
    gap: 2px;
  }
} */


/* ===============================
   LANGUAGE
   =============================== */
#language-switcher {
  text-align: center;
  margin: 20px auto;
  display: flex;
  flex-wrap: wrap;        /* ให้ปุ่มขึ้นบรรทัดใหม่เมื่อพื้นที่ไม่พอ */
  justify-content: center; /* จัดกึ่งกลางแนวนอน */
  gap: 8px;              /* ช่องว่างระหว่างปุ่ม */
}

#language-switcher button {
  font-size: 1rem;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #1e1e1e;
  color: #f0f6fc;
}

/* hover แต่ไม่ทับ active */
#language-switcher button:hover:not(.active) {
  background-color: #f0f6fc;
  color: #1e1e1e;
}

/* active ปุ่มเดียว */
#language-switcher button.active {
  background-color: #f0f6fc;
  color: #1e1e1e;
}

/* ===============================
   LOADER
   =============================== */
#loader-container {
  display: grid;
  justify-content: center;
  align-items: center;
  width: 90%;
  max-width: 800px;
  margin: 25px auto;
}

#loader-text {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1rem;
  display: none;
}

#loader-bar {
  width: 100%;
  height: 10px;
  background-color: #ddd;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

#loader-progress {
  width: 0%;
  height: 100%;
  background-color: #4caf50;
  border-radius: 3px;
  overflow: hidden;
  text-indent: -9999px;  
  line-height: 0;     
}

#loader-text-on-bar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  color: #fff;
  pointer-events: none;
}

