/* Reset */
@font-face {
  font-family: 'MyFont';
  src: url('Font.woff2') format('woff2');
}

body {
  font-family: 'MyFont', sans-serif;
}




* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body with full-page gradient background */
body {
  font-family: 'Roboto', Arial, sans-serif;
  background: linear-gradient(to bottom, #ffd6e8, #b288eb, #7a00cc);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: white;
}

/* Header transparent to show background */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.15); /* พื้นหลังขาวจาง */
  backdrop-filter: blur(10px); /* ทำให้ดูฟุ้ง/โปร่ง */
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* เส้นคั่นบางๆ เพิ่มความลอย */
  position: relative;
  z-index: 5;
  border-radius: 0 0 16px 16px; /* มุมโค้งด้านล่างนิดๆ */
}

/* Logo styles */
.logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* Navigation */
nav a {
  position: relative;
  margin-left: 20px;
  text-decoration: none;
  color: #2b2b2b;
  font-weight: bold;
  transition: color 0.3s ease;
  padding: 5px 10px;
  border-radius: 8px;
  background-image: linear-gradient(to right, #e3c4ff, #c59bff);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease, color 0.3s ease;
}

nav a:hover {
  color: #7a00cc;
  background-size: 100% 100%;
}


/* Main section with transparent background */
.main {
  text-align: center;
  padding: 60px 20px;
  background: transparent;
  min-height: 100vh; /* ให้ความสูงเต็มหน้าจอ */
}

/* Large logo in main */
.main-logo {
  max-width: 500px;
  width: 100%;
  height: auto;
  margin-bottom: 40px;
  animation: tiltLoop 4s ease-in-out infinite;
}



/* About Box */
.about {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 30px;
  max-width: 600px;
  margin: 0 auto 10px auto; /* ✅ ตรงนี้เพิ่ม margin-bottom: 10px */
  color: #fff;
  backdrop-filter: blur(10px);
}


.about h2 {
  margin-bottom: 10px;
}

.about p {
  font-size: 16px;
  line-height: 1.5;
}

/* Footer */
.footer {
  background-color: #3a0066; /* ม่วงเข้ม */
  color: white;
  text-align: center;
  padding: 15px 20px;
  font-size: 14px;
  position: relative; /* ไม่ fixed, แสดงต่อจาก content */
  z-index: 10; /* ซ้อนอยู่บน gradient */
}

/* Discord Frame */
.discord-frame {
  margin: 5px auto 20px; /* ✅ margin-top: 5px เท่านั้น */
  max-width: 600px;
  height: 120px;
  background: linear-gradient(to right, #a066f5, #7a00cc);
  border-radius: 20px;
  border: 2px solid #e0c8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(122, 0, 204, 0.3);
}




.discord-link {
  text-decoration: none;
  color: white;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discord-content {
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s ease;
}

.discord-link:hover .discord-content {
  transform: scale(1.10); /* ขยายขึ้น 5% */
}

.discord-logo {
  height: 50px;
  width: auto;
  flex-shrink: 0;
}

.discord-text {
  font-size: 20px;
  font-weight: bold;
  transition: text-shadow 0.3s ease;
}

.discord-link:hover .discord-text {
  text-shadow: 0 0 8px #ffffffaa;
}

@keyframes tiltLoop {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-2deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}

.cloud-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  pointer-events: none; /* ให้คลิกทะลุได้ */
  overflow: hidden;
  z-index: 1; /* ใต้ header, main, etc. */
}

/* เมฆลอยขึ้นลง */
.cloud {
  position: absolute;
  animation: float 6s ease-in-out infinite;
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
  transition: transform 0.3s ease;
}

/* ลอยขึ้นลงให้รัศมีมากขึ้น (ห่างมากขึ้น) */
@keyframes float {
  0%   { transform: translateY(0px); }
  25%  { transform: translateY(-20px); }
  50%  { transform: translateY(0px); }
  75%  { transform: translateY(20px); }
  100% { transform: translateY(0px); }
}

.main-logo {
  position: relative; /* ต้องมีเพื่อให้ z-index ทำงาน */
  z-index: 2; /* สูงกว่า .cloud-container ที่ z-index: 1 */
}


/* ✅ Menu Toggle (Hamburger) */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #2b2b2b;
  z-index: 999;
}

/* ✅ Mobile Styles */
@media (max-width: 768px) {
  nav.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 220px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 20px;
    gap: 20px;
    transition: right 0.3s ease-in-out;
    z-index: 998;
  }

  nav.nav-links.open {
    right: 0;
  }

  .menu-toggle {
    display: block;
  }

  /* ซ่อนเมนูปกติใน header สำหรับมือถือ */
  .header {
    flex-wrap: wrap;
  }

  .nav-links a {
    color: #2b2b2b;
    font-size: 18px;
  }

  .nav-links a:hover {
    color: #7a00cc;
  }
}

/* Dropdown container */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown toggle button (Our team) */
.dropdown-toggle {
  cursor: pointer;
  color: #2b2b2b;
  font-weight: bold;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 8px;
  background-image: linear-gradient(to right, #e3c4ff, #c59bff);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease, color 0.3s ease;
}

/* Arrow icon */
.dropdown-toggle .arrow {
  font-size: 10px;
  margin-left: 5px;
}

/* Dropdown menu hidden by default */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  min-width: 160px;
  overflow: hidden;
}

/* Style for items inside dropdown */
.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #2b2b2b;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: #e0c8ff;
  color: #7a00cc;
}

/* Hover effect (desktop) */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
  .dropdown {
    width: 100%;
  }

  .dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #2b2b2b;
  text-decoration: none;
  transition: color 0.3s ease;
  background: none; /* ลบพื้นหลังไฮไลต์ */
}

.dropdown-menu a:hover {
  color: #7a00cc;
}

  /* When class 'open' is toggled */
  .dropdown.open .dropdown-menu {
    display: block;
  }
}

.dropdown-menu a {
  background: none !important; /* ยกเลิกแถบ highlight */
  background-image: none !important;
  color: #2b2b2b;
  padding: 10px 20px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.dropdown-menu a:hover {
  background: none !important;
  color: #7a00cc;
}


/* Responsive Menu สำหรับมือถือ */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #2b2b2b;
  z-index: 1001;
}

@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    width: 200px;
    padding: 10px 20px;
    display: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a, .dropdown-toggle {
    color: #2b2b2b;
    padding: 10px 0;
    background: none;
  }

  .dropdown-menu {
    position: relative;
    background: none;
    box-shadow: none;
    padding-left: 10px;
  }

  .dropdown-menu a {
    font-size: 14px;
    padding: 6px 0;
  }
}

/* เพิ่ม fade-in ตอนโหลดหน้า */
body {
  animation: fadeInPage 1s ease-in-out;
}

/* หรือใช้กับ .main ก็ได้ ถ้าอยากให้เฉพาะเนื้อหาค่อยๆ โผล่ */
@keyframes fadeInPage {
  0% {
    opacity: 0;
    transform: translateY(20px); /* ลอยขึ้นมานิดๆ */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-logo {
  animation: fadeInPage 1s ease-in-out;
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

.about {
  animation: fadeInPage 1s ease-in-out;
  animation-delay: 0.4s;
  animation-fill-mode: both;
}

.discord-frame {
  animation: fadeInPage 1s ease-in-out;
  animation-delay: 0.6s;
  animation-fill-mode: both;
}

/* Loading overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  object-fit: contain;
}


.main-logo {
  max-width: 500px;
  width: 100%;
  height: auto;
  margin-bottom: 40px;
  animation: tiltLoop 4s ease-in-out infinite;
}

@keyframes tiltLoop {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-2deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}


.contact-section {
  text-align: center;
  padding: 60px 20px;
}

.contact-section h1 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: white;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.contact-item {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 20px 30px;
  width: 180px;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.contact-item.large {
  width: 240px;
  padding: 30px 40px;
}

.contact-item.full {
  max-width: 800px;
  width: 100%;
  margin: 0 auto 30px;
}

.contact-item img {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}

.contact-item span {
  font-size: 1.1rem;
  font-weight: bold;
  color: white;
  transition: color 0.3s ease;
}

.contact-item:hover {
  transform: scale(0.95);
}

.contact-item:hover span {
  color: #b96eff;
}

/* Email ไม่เป็นลิงก์ */
.contact-item.email {
  cursor: default;
}


.contact-item.email {
  cursor: pointer;
  position: relative;
}

#copy-popup {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #b96eff;
  color: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}







/* ปุ่ม Back */
.back-button {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 8px 16px;
  background-color: #d06dd6;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}
.back-button:hover {
  background-color: #b94cc3;
}

/* ฟอร์ม */
.staff-form {
  background: #fdf0fd;
  border: 2px solid #dba4e2;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 2rem;
  max-width: 500px;
}
.staff-form input[type="text"],
.staff-form input[type="email"] {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  margin-bottom: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.staff-form label {
  font-weight: bold;
  color: #6b2d83;
}
.staff-form button {
  background-color: #c94bd0;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
.staff-form button:hover {
  background-color: #a837b2;
}
.admin-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.admin-checkbox input {
  margin-right: 8px;
}





.add-staff-container {
  text-align: center;
  margin: 2em auto;
  max-width: 500px;
}

.add-staff-container input, .add-staff-container button {
  width: 90%;
  padding: 10px;
  margin: 10px 0;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.add-staff-container button {
  background: linear-gradient(45deg, #d36df5, #ff82c9);
  color: white;
  border: none;
  cursor: pointer;
}

.staff-list-container {
  max-width: 900px;
  margin: auto;
  padding: 1em;
  height: 400px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.staff-card {
  background: rgba(255, 255, 255, 0.9); /* พื้นหลังโปร่งใสสีขาวนิดๆ */
  color: #333; /* สีตัวอักษรเข้ม มองเห็นชัด */
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  margin: 10px;
  width: 250px;
  flex-shrink: 0;
  position: relative;
}


.staff-card h4 {
  margin: 0;
  color: #8c00bf;
}

.staff-card p {
  margin: 5px 0;
}

.delete-btn {
  position: absolute;
  top: 6px;
  right: 10px;
  background: #ff4d6d;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  width: 25px;
  height: 25px;
  cursor: pointer;
}



.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 15px;
  font-size: 16px;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff66cc; /* ปรับสี checkbox ให้เข้าธีมชมพูม่วง */
}

.checkbox-wrapper label {
  cursor: pointer;
  user-select: none;
  color: #fff; /* สีข้อความ ถ้าพื้นหลังเข้ม */
}




.career-section {
  max-width: 800px;
  margin: 60px auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  font-family: 'Roboto', sans-serif;
  color: #222;
}

.career-section h2 {
  font-size: 30px;
  text-align: center;
  margin-bottom: 30px;
}

.career-content p {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.7;
}

.dash-list {
  margin-left: 20px;
  padding-left: 0;
  list-style: none;
}

.dash-list li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}

.dash-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: #444;
}

.apply-btn {
  display: inline-block;
  margin-top: 40px;
  background: linear-gradient(135deg, #a64bf4, #ff69b4); /* ม่วง-ชมพู */
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none; 
  font-weight: bold;
  transform-origin: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background-size: 200% 200%;
  transition: all 0.3s ease, background-position 1s ease;
}

.apply-btn:hover {
  transform: scale(1.08) rotate(2deg);
  background-position: right center; /* ทำให้ gradient ขยับ */
}



.our-games-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.games-title {
  color: white;
  font-size: 2.2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  justify-items: center;
}

.game-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  text-align: center;
  overflow: hidden;
  padding-bottom: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 260px;
  width: 100%;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.game-cover {
  width: 100%;
  border-radius: 16px 16px 0 0;
  display: block;
}

.game-title {
  padding: 12px 10px 6px;
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
}

.wiki-link {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  text-decoration: none;
  font-size: 0.95em;
  color: #444;
  transition: color 0.3s ease;
}

.wiki-link:hover {
  color: #6b48ff;
}

.wiki-icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
}


.our-team-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.team-title {
  color: white;
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 40px;
  text-align: center;
}

.team-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.team-card {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden; /* ทำให้ภาพไม่ล้น */
  align-items: stretch; /* ขยายลูกให้สูงเท่ากัน */
  min-height: 140px;
}

.team-photo {
  width: 140px; /* ความกว้างคงที่ */
  height: 100%; /* สูงเท่ากับ parent */
  object-fit: cover; /* เติมภาพเต็มโดยไม่ยืด */
  object-position: top center; /* จัดตำแหน่งภาพด้านบน */
  border-radius: 0; /* ไม่มีมุมโค้งแล้ว */
  flex-shrink: 0;
}


.team-info {
  flex: 1;
}

.team-name {
  font-size: 1.6em;
  font-weight: bold;
  color: white;
  margin-bottom: 10px;
}

.team-roles {
  margin-bottom: 10px;
}

.team-role {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9em;
  margin-right: 6px;
  display: inline-block;
}

.roblox-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: white;
  font-size: 0.95em;
}

.roblox-icon {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
}


@keyframes subtlePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.team-card {
  animation: subtlePulse 4s ease-in-out infinite;
  animation-delay: var(--pulse-delay);
}

#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* ให้คลิกผ่านได้ */
  z-index: 0; /* อยู่หลังทุกอย่าง */
}


.game-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  text-align: center;
  overflow: hidden;
  padding-bottom: 16px;
  max-width: 260px;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
}

.game-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.25) 50%, transparent 80%);
  transform: skewX(-25deg);
  opacity: 0;
  transition: all 0.4s ease; /* เร็วขึ้น */
  pointer-events: none;
}

.game-card:hover::before {
  left: 130%;
  opacity: 1;
  transition: all 0.6s ease; /* เร็วขึ้นแบบนุ่มนวล */
}
