/* 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:450px; left: 7%; transform: translate(-50%, -50%); z-index: 9999; background-color: rgba(0, 0, 0, 0.5); width: 255px; padding: 20px; border-radius: 5px; color: #fff; 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: inside; flex-wrap: wrap; /* ป้องกันไม่ให้รูปภาพอยู่ในบรรทัดถัดไป */ justify-content: center; /* จัดกลางรูปภาพ */ gap: 5px; /* ระยะห่างระหว่างรูปภาพ */ overflow-x: auto; /* เพิ่มการเลื่อนในแนวนอนถ้าจำเป็น */ } .image-gallery img { width: 100px; /* ขนาดความกว้างของรูปภาพ */ height: auto; /* ให้ความสูงปรับตามอัตราส่วน */ border-radius: 10px; /* ขอบมน */ transition: transform 0.3s ease; /* เพิ่มแอนิเมชันเมื่อเลื่อนเมาส์ */ } .image-gallery img:hover { transform: scale(1.1); /* ขยายรูปเมื่อเลื่อนเมาส์ */ } .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: #f1f1f1; 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%); 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: 1px solid #ffffff; padding: 1px 50px; border-radius: 52px; background-color: rgba(255, 255, 255, 0.9); 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, pulse 1.5s 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, rgba(243, 90, 90, 0) 0%, rgba(0, 0, 0, 0.8) 50%, rgb(60, 139, 8) 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; } @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 for small screens */ @media (max-width: 768px) { /* ปรับ .visitor-count ให้เหมาะกับหน้าจอเล็ก */ .visitor-count { top: 10px; right: 10px; font-size: 2em; padding: 8px; } /* ปรับป็อปอัปให้แสดงผลได้ดี */ .popup { display: none; position: relative ; top:400px; left: 7%; width: 100%; /* ลดขนาดความกว้าง */ padding: 15px; } /* ปรับตำแหน่งปุ่ม */ #openPopupBtn { right: 10px; bottom: -45px; font-size: 0.9em; } /* ปรับตำแหน่งปุ่ม */ #openPopupBtn2 { right: 10px; bottom: -100px; /* เลื่อนลงไปที่ระยะห่าง 20px จากขอบล่าง */ font-size: 0.9em; } /* โลโก้ */ #logo { width: 35px; /* ลดขนาดโลโก้ */ top: 290px; left: -135px; } /* ปรับคอนเทนเนอร์ */ .container { padding: 20px; max-width: 80%; } /* ปรับ image-gallery */ .image-gallery { gap: 10px; /* ลดระยะห่างระหว่างภาพ */ } .image-gallery img { width: 80px; /* ลดขนาดรูป */ } /* Cookie consent */ #cookieConsent { left: 5%; width: 60%; bottom: 10px; font-size: 0.9em; padding: 10px; } #snowCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; /* ให้อยู่ด้านหลังเนื้อหา */ } } @media (max-width: 480px) { /* หน้าจอเล็กมาก */ h1, h2 { font-size: 1.5em; /* ลดขนาดตัวอักษร */ } .visitor-count { font-size: 0.9em; padding: 5px; } button { font-size: 0.8em; padding: 10px; } }