* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #030303;
    font-family: 'Syncopate', sans-serif;
    overflow: hidden; /* ซ่อน Scrollbar ที่ไม่จำเป็น */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* ให้อยู่หลังข้อความ */
}

.container {
    z-index: 2; /* ให้อยู่หน้า Canvas */
    position: relative;
    pointer-events: none; /* ป้องกันไม่ให้ข้อความไปบังการตรวจจับเมาส์ของ Canvas */
}

/* ตั้งค่าเอฟเฟกต์ข้อความ */
.glitch-text {
    font-size: 4vw; /* ขยายตามหน้าจอ */
    letter-spacing: 8px;
    color: #ffffff;
    position: relative;
    text-shadow: 0 0 10px rgba(0, 255, 249, 0.5), 
                 0 0 20px rgba(0, 255, 249, 0.5);
    animation: pulse 2s infinite alternate;
}

/* สร้างภาพซ้อนทับสำหรับทำ Glitch Effect */
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #030303;
}

.glitch-text::before {
    left: 3px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -3px;
    text-shadow: -2px 0 #00fff9;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

/* แอนิเมชันให้ข้อความเรืองแสงกระพริบช้าๆ */
@keyframes pulse {
    0% { transform: scale(1); text-shadow: 0 0 10px #00fff9; }
    100% { transform: scale(1.02); text-shadow: 0 0 20px #00fff9, 0 0 40px #0055ff; }
}

/* แอนิเมชันรอยตัด (Glitch) */
@keyframes glitch-anim {
    0% { clip: rect(15px, 9999px, 45px, 0); }
    20% { clip: rect(75px, 9999px, 10px, 0); }
    40% { clip: rect(35px, 9999px, 95px, 0); }
    60% { clip: rect(95px, 9999px, 25px, 0); }
    80% { clip: rect(5px, 9999px, 85px, 0); }
    100% { clip: rect(55px, 9999px, 15px, 0); }
}