/* Reset some default styles */ body, h1, div { margin: 0; padding: 0; box-sizing: border-box; } /* Body styling */ body { font-family: 'Arial', sans-serif; display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #c5fcaf, #0b1f01); line-height: 1.3; } /* Container styling */ .container { text-align: center; background: white; padding: 30px; border-radius: 20px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); max-width: 600px; width: 100%; opacity: 0; transform: translateY(30px); animation: fadeIn 1s ease-in forwards; } /* Title styling */ .container h1 { font-size: 2.4em; margin-bottom: 20px; color: #333; opacity: 0; animation: slideIn 1s ease-in forwards; } .visitor-count { margin-top: 20px; font-size: 1.2em; color: #555; display: flex; justify-content: center; align-items: center; background-color: #f1f1f1; border-radius: 5px; padding: 10px; position: absolute; /* เปลี่ยนเป็น absolute */ top: 50px; /* ปรับตำแหน่งด้านบนของหน้าเว็บ */ right: 50px; /* ปรับตำแหน่งด้านขวาของหน้าเว็บ */ } /* Image styling */ .photo img, .slideshow-container img { max-width: 100%; height: auto; border-radius: 10px; transition: transform 0.3s ease; display: block; } .photo img:hover, .slideshow-container img:hover { transform: scale(1.05); position: relative; z-index: 2; } /* Hide the images by default */ .mySlides { display: none; width: auto; text-align: center; } .mySlides img { width: 100%; /* ปรับขนาดให้เต็ม container */ height: max-content; /* ตั้งค่าความสูง */ object-fit: cover; /* ให้ภาพถูกตัดให้พอดีกับกรอบ โดยไม่ยืด */ display: block; margin: auto; /* จัดให้อยู่กึ่งกลาง */ } /* Popup styling */ .popup { display: none; position: relative ; top:400px; left: 7%; transform: translate(-50%, -50%); z-index: 9999; max-height: 100vh; /* จำกัดความสูงไม่เกิน 80% ของหน้าจอ */ overflow-y: auto; /* ถ้าข้อความยาว ให้ scroll ได้ */ background-color: rgba(0, 0, 0, 0.5); width: 255px; padding: 20px; border-radius: 5px; color: #fff; word-wrap: break-word; /* บรรทัดไม่ล้นจอ */ opacity: 0; transition: opacity 0.5s ease; animation: popupShow 0.6s ease forwards; } /* Show popup */ .popup.show { display: block; opacity: 1; } /* Close button */ .close { font-size: 20px; position: absolute; top: 5px; right: 10px; cursor: pointer; } /* General button */ button { margin-top: 10px; padding: 13px 16px; border: none; background-color: #ffffff; color: rgb(0, 0, 0); border-radius: 100px; cursor: pointer; transition: transform 0.3s ease; border: 3px solid #ccc; } button:hover { transform: translateY(-5px); background-color: #4c5f1e; } /* Popup button */ #openPopupBtn { position: absolute; bottom: 170px; right: -80px; /* Updated to a more visible position */ z-index: 1; } #openPopupBtn2 { position: absolute; bottom: 118px; right: -80px; /* Updated to a more visible position */ z-index: 1; } .image-gallery { display: flex; /* แก้จาก inside → flex */ flex-wrap: wrap; /* ให้รูปภาพขึ้นบรรทัดใหม่ถ้าพื้นที่ไม่พอ */ justify-content: center; /* จัดกลางรูปภาพ */ gap: 10px; /* ระยะห่างระหว่างรูปภาพ เพิ่มจาก 5px เล็กน้อยดูสบายตา */ padding: 10px; /* เพิ่มระยะขอบรอบๆ gallery */ overflow-x: auto; /* เลื่อนแนวนอนได้ถ้าภาพเกิน */ scroll-behavior: smooth; /* เลื่อนแบบ smooth */ background-color: #f9f9f905; /* สีพื้นหลังอ่อนๆ ทำให้ gallery ดูเด่น */ border-radius: 15px; /* มุมมนทั้ง gallery */ box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* เงาเบาๆ เพิ่มมิติ */ } .image-gallery img { width: 120px; /* ขนาดความกว้างของรูปภาพเพิ่มขึ้นเล็กน้อย */ height: auto; border-radius: 15px; /* ขอบมนมากขึ้น */ transition: transform 0.3s ease, box-shadow 0.3s ease; /* เพิ่มแอนิเมชันเงา */ cursor: pointer; /* เปลี่ยนเคอร์เซอร์เมื่อชี้เมาส์ */ } .image-gallery img:hover { transform: scale(1.1); /* ขยายรูป */ box-shadow: 0 8px 15px rgba(0,0,0,0.2); /* เงาเมื่อ hover */ } .fullscreen-image-gallery { max-width: 90%; max-height: 90%; border-radius: 10px; } .fullscreen-image.visible { visibility: visible; opacity: 1; } #logo { width: 50px; /* ปรับขนาดโลโก้ตามต้องการ */ height: auto; transition: transform 0.3s ease; position: relative; /* กำหนดให้โลโก้เป็นตำแหน่งแบบเดี่ยว (absolute) ซึ่งจะอ้างอิงตำแหน่งตามคอนเทนเนอร์แม่ (relative) */ top: 50px; /* ปรับตำแหน่งตามต้องการ */ left: 1px; /* ปรับตำแหน่งตามต้องการ */ } #logo:hover { transform: scale(1.1); /* ขยายขนาดโลโก้เมื่อผู้ใช้นำเม้าส์มาชี้ */ } #cookieConsent { position: fixed ; border-radius: 15px; bottom: -150px; /* Initial hidden position */ left: 500px; width: 30%; background-color: rgba(255, 255, 255, 0.8); /* สีพื้นหลัง */ color: rgb(82, 44, 0); /* สีข้อความ */ text-align: left; padding: 10px; /* ขนาดการเว้นช่อง */ z-index: 1000; /* ให้แสดงอยู่ด้านบน */ animation: slideUp 5s forwards; /* Apply the animation */ } #cookieConsent button { margin-left: 5px; padding: 10px 20px; background-color: #ffce47e0; /* สีปุ่ม */ border: none; cursor: pointer; } #cookieConsent button:hover { background-color: #ffc400; /* สีปุ่มเมื่อ hover */ } #logo2 { width: 100px; /* ปรับขนาดโลโก้ตามต้องการ */ height: auto; transition: transform 0.3s ease; position: absolute; /* กำหนดให้โลโก้เป็นตำแหน่งแบบเดี่ยว (absolute) ซึ่งจะอ้างอิงตำแหน่งตามคอนเทนเนอร์แม่ (relative) */ top: -55px; /* ปรับตำแหน่งตามต้องการ */ left: 15px; /* ปรับตำแหน่งตามต้องการ */ } .modal { position: sticky; z-index: 1000; text-align: center; font-size: 1.0em; left: 0; padding: 10px 20px; top: 0; width: 100%; height: 100%; overflow: hidden; } .modal-content { background-color: rgba(255, 255, 255, 0.8); /* สีพื้นหลัง */ padding: 0px; width: 100%; /* ขนาดของ modal */ } /* ใช้ฟอนต์ Prompt ทั่วทั้งเว็บไซต์ */ body { font-family: 'Prompt', sans-serif; } h1, h2 { font-family: 'Prompt', sans-serif; font-weight: 600; /* น้ำหนักตัวอักษรสำหรับ h1, h2 */ } p { font-family: 'Prompt', sans-serif; font-weight: 800; /* น้ำหนักตัวอักษรสำหรับข้อความปกติ */ } #snowCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; /* ให้อยู่ด้านหลังเนื้อหา */ } /* Loader เต็มหน้าจอ */ #loader { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(5, 32, 5, 0.89) ; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; } /* กล่องพื้นหลังใหญ่ (อยู่กลางหน้าจอ) */ .loader-box1 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border:0px solid #f0f0f0; padding: 200px 200px; border-radius: 100px; background-color: rgba(13, 20, 13, 0.8) ; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9); text-align: center; z-index: 1; } /* กล่องข้อความโหลด */ .loader-box { border: 2px solid #ffffff; padding: 1px 50px; border-radius: 52px; background-color: rgba(252, 252, 252, 0.055); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); margin-top: -5px; min-width: 100px; text-align: center; z-index: 2; } /* โลโก้ */ .logo-loader { width: 150px; height: auto; margin-bottom: 15px; animation: waveEffect 1.5s ease-in-out infinite; /* เพิ่มการเคลื่อนไหวเป็นคลื่น */ z-index: 9999; } /* ข้อความโหลด + เอฟเฟกต์แสง */ .loading-text { min-width: 150px; margin-top: 20px; font-size: 20px; font-weight: bold; font-family: monospace; color: transparent; background-color: rgb(255, 255, 255,); /* ไม่จำเป็นถ้ามี bg-page อยู่แล้ว */ background-image: linear-gradient( 90deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 25%, rgb(255, 255, 255) 25%, rgb(27, 92, 38) 55%, rgb(27, 92, 38) 75%, rgba(14, 56, 5, 0.623) 100% ); background-size: 200% 100%; background-position: 100% 0; background-clip: text; -webkit-background-clip: text; animation: l24 1.5s linear infinite; } /* จุดตามหลังข้อความ */ .loading-text::after { content: ''; animation: dots 1.2s steps(4, end) infinite; } /* อักษร Z ลอย */ .z { position: absolute; font-size: 32px; opacity: 0; margin-top: -200px; z-index: 9999; } .z-1 { animation: swayUpToRight 2s ease-out infinite; } .z-2 { animation: swayUpToRight 2s ease-out 0.5s infinite; } .z-3 { animation: swayUpToRight 2s ease-out 1s infinite; } .z-4 { animation: swayUpToRight 2s ease-out 1.5s infinite; } .overlay { display: flex; /* flex เพื่อจัดภาพกลางจอ */ justify-content: center; align-items: center; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.8); z-index: 10000; opacity: 0; /* เริ่มต้นซ่อน */ pointer-events: none; /* ป้องกันการคลิก */ transition: opacity 0.4s ease; } .overlay.active { opacity: 1; /* แสดง */ pointer-events: all; /* ให้คลิกได้ */ } .overlay img { max-width: 90%; max-height: 90%; border-radius: 10px; transform: scale(0.95); /* เล็กนิดตอนเริ่ม */ transition: transform 0.4s ease; } .overlay.active img { transform: scale(1); /* ขยายเต็ม */ } @keyframes waveEffect { 0% { transform: translateY(0); } 50% { transform: translateY(-10px); /* ยกขึ้นเล็กน้อย */ } 100% { transform: translateY(0); /* กลับลง */ } } /* Animation Keyframes */ @keyframes l24 { 0% { background-position: 100% 0; } 100% { background-position: 0% 0; } } @keyframes l24 { 100% { background-position: left } } @keyframes swayUpToRight { 0% { transform: translate(0, 0) rotate(0deg); opacity: 1; } 100% { transform: translate(80px, -100px) rotate(30deg); opacity: 0; } } @keyframes dots { 0% { content: ''; } 25% { content: '✿'; } 50% { content: '✿❀'; } 75% { content: ' ✿ ❀ 𓆸'; } 100% { content: ''; } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes wing { 0% { transform: rotateY(0deg); } 50% { transform: rotateY(60deg); } 100% { transform: rotateY(0deg); } } @keyframes moveAround { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes anim1 { from { transform: translateY(0px); } to { transform: translateY(var(--stepBtf)); } } /* @media (prefers-color-scheme: dark) { .loader[showShadow]{ filter: drop-shadow(0 10px 10px #dbdbdbde); } } */ @keyframes slideUp { from { bottom: 700px; /* Start position */ } to { bottom: 100px; /* End position where the box is visible */ } } /* Keyframes for popup animation */ @keyframes popupShow { 0% { opacity: 0; transform: translate(-50%, -60%); } 100% { opacity: 1; transform: translate(-50%, -50%); } } /* Keyframes for slide-in title */ @keyframes slideIn { 0% { opacity: 0; transform: translateY(50px); } 100% { opacity: 1; transform: translateY(0); } } /* Keyframes for fade-in */ @keyframes fadeIn { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } } /* -------------------- Media Queries สำหรับ responsiveness -------------------- */ /* มือถือเล็ก - หน้าจอถึง 480px */ @media (max-width: 480px) { .container { padding: 15px; } .container h1 { font-size: 1.5em; } .visitor-count { font-size: 0.9em; padding: 5px; } .image-gallery img { width: 70px; } button { font-size: 0.8em; padding: 8px 12px; } #logo { width: 28px; top: 200px; left: -180px; } /* ย่อโลโก้และขยับตำแหน่งให้สมดุล */ #logo2 { width: 28px; } .popup { width: 90%; max-width: 250px; padding: 15px; } #cookieConsent { width: 90%; font-size: 0.85em; padding: 8px; } /* ปรับปุ่ม popup ให้อยู่ในกรอบ */ #openPopupBtn { position: absolute; bottom: -70px; /* ต่ำกว่าของมือถือกลางเล็กน้อย */ right: 180px; /* ชิดขอบซ้ายมากขึ้น */ transform: none; z-index: 1000; } #openPopupBtn2 { position: absolute; bottom: -30px; /* ต่ำกว่าของมือถือกลางเล็กน้อย */ right: 180px; transform: none; z-index: 1000; } } /* มือถือเล็กมาก - หน้าจอถึง 480px */ @media (max-width: 480px) { #logo2 { width: 45px; /* ย่อเล็กลงอีก */ top: -25px; left: 5px; } } /* มือถือกลาง - หน้าจอถึง 768px */ @media (max-width: 768px) { .container { max-width: 100%; padding: 20px; } .image-gallery img { width: 90px; } button { padding: 10px 14px; font-size: 0.9em; } /* โลโก้ */ #logo { width: 35px; top: 260px; left: -250px; } /* ปุ่ม popup */ #openPopupBtn { bottom: -45px;; right: 250px; } #openPopupBtn2 { bottom: -90px; right: 250px; } /* กล่องคุกกี้ */ #cookieConsent { width: 90%; max-width: 300px; font-size: 0.9em; padding: 10px; bottom: 20px; left: 50%; transform: translateX(-50%); } } @media (max-width: 768px) { #logo2 { width: 60px; /* หดโลโก้ให้เล็กลงเวลาอยู่ในมือถือ */ top: -35px; /* ขยับตำแหน่งลง */ left: 10px; /* ขยับไปทางซ้ายอีกหน่อย */ } } @media (max-width: 768px) { .popup { position: fixed; /* fix ให้อยู่บนหน้าจอ */ width: 200px; /* ปรับขนาด */ max-height: 80vh; /* จำกัดความสูงไม่เกิน 80% ของหน้าจอ */ top: 49%; /* ขยับขึ้นลง ใช้ % หรือ px */ left: 29%; /* ขยับซ้ายขวา ใช้ % หรือ px */ transform: translate(-50%, -50%); /* จัดให้อยู่กึ่งกลาง */ padding: 15px; /* ลด padding */ border-radius: 10px; overflow-y: auto; /* scroll ได้ถ้าข้อความยาว */ } }