@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;700&display=swap');
body {
    font-family: 'Kanit', sans-serif;
}
/* Optional: Add smooth scrolling for browsers that support it */
html {
    scroll-behavior: smooth;
}
.text-gradient {
    background-image: linear-gradient(to right, #2f2bff, #00c3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.experience-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    text-align: center;
    transform: scale(1);
    transition: transform 0.3s ease-in-out;
}
.experience-card:hover {
    transform: scale(1.05);
}
#preloader {
    transition: opacity 0.5s ease-out;
}
/* สไตล์สำหรับ Mobile Menu Item */
.mobile-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lang-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.lang-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.lang-selected {
    background-color: #0031b8 !important;
    font-weight: bold;
}
#lang-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease-in-out;
    align-items: center;
    justify-content: center;
}
#lang-modal.modal-open {
    display: flex;
}
.lang-modal-content {
    background-color: #010027;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-in-out;
}
.lang-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lang-modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}
.lang-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}
.lang-modal-close:hover {
    color: #00c3ff;
}
/* Search input inside modal */
#lang-search {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background-color: rgba(255,255,255,0.95);
    color: #0b1220;
    font-size: 0.95rem;
    outline: none;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
#lang-search:focus {
    box-shadow: 0 0 0 3px rgba(0,195,255,0.12);
    border-color: #00c3ff;
}
.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}
.lang-modal-option {
    padding: 5px;
    text-align: center;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.lang-modal-option:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #00c3ff;
    transform: translateY(-2px);
}
.lang-modal-option.modal-selected {
    background-color: #0031b8;
    border-color: #00c3ff;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 195, 255, 0.3);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Preloader Styles */
#preloader {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(to bottom, #010027, #0031b8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    font-family: 'Kanit', sans-serif;
}

.loader-content {
    text-align: center;
    width: 80%;
    max-width: 300px;
}

.loader-logo {
    width: 96px; /* w-24 */
    height: 96px;
    margin: 0 auto 16px;
    animation: bounce 1s infinite;
}

.loader-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#snow-canvas {
    position: fixed; /* เปลี่ยนเป็น fixed เพื่อให้อยู่คงที่ขณะ scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* ป้องกันไม่ให้บังการคลิกปุ่มหรือลิงก์ */
    z-index: 9999; /* ให้อยู่ชั้นบนสุดเสมอ หรือปรับตามความต้องการ */
}

/* ปรับให้ส่วนของ Content อื่นๆ แสดงผลได้ปกติ */
.loader-content, header, section {
    position: relative;
    z-index: 10;
}

#progress-bar {
    position: absolute;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #010027, #0031b8);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.counter {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
    color: #ffffff;
}

.loader-status {
    font-size: 0.875rem;
    color: #ffffff;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* อนิเมชั่นเมื่อโหลดเสร็จ */
.loaded #preloader {
    transform: translateY(-100%);
}

.loaded body {
    overflow: auto;
}

@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}