@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400&family=Pacifico&display=swap');

body {
    font-family: 'Kanit', sans-serif; /* ฟอนต์น่ารักๆ */
    background: linear-gradient(to bottom right, #ffdde1, #ee9ca7); /* ไล่สีชมพูหวานๆ */
    color: #5c3a3e; /* สีข้อความเข้มๆ หน่อย */
    margin: 0;
    padding: 20px;
    text-align: center;
}

header {
    background-color: rgba(255, 255, 255, 0.7); /* พื้นหลังโปร่งแสง */
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-family: 'Pacifico', cursive; /* ฟอนต์หัวข้อแบบลายมือ */
    color: #d63384; /* สีชมพูเข้ม */
    margin: 0;
    font-size: 2.5em; /* เพิ่มขนาดฟอนต์ */
}

header p {
    font-size: 1.1em;
    color: #8c5a5f;
}

main {
    max-width: 900px; /* จำกัดความกว้าง */
    margin: 0 auto; /* จัดกึ่งกลาง */
}

.emoji-category {
    background-color: rgba(255, 255, 255, 0.8); /* พื้นหลังขาวโปร่งแสง */
    border-radius: 15px; /* ขอบมน */
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.emoji-category h2 {
    color: #bf6b8a; /* สีหัวข้อหมวดหมู่ */
    border-bottom: 2px dashed #f8b1cc; /* เส้นประใต้หัวข้อ */
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: left; /* จัดชิดซ้าย */
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); /* จัดเรียง emoji */
    gap: 15px; /* ระยะห่างระหว่าง emoji */
}

.emoji {
    font-size: 2rem; /* ขนาด emoji */
    cursor: pointer;
    transition: transform 0.2s ease-in-out, background-color 0.2s; /* เพิ่ม animation */
    padding: 5px;
    border-radius: 10px; /* ขอบมน */
    display: inline-block; /* ทำให้ padding มีผล */
}

.emoji:hover {
    transform: scale(1.3); /* ขยายเมื่อเมาส์ชี้ */
    background-color: rgba(255, 192, 203, 0.5); /* เพิ่มพื้นหลังสีชมพูอ่อนๆ ตอน hover */
}

footer {
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    color: #8c5a5f;
    font-size: 0.9em;
}

/* ส่วนแจ้งเตือนการคัดลอก */
#copy-notification {
    position: fixed; /* ตำแหน่งคงที่ */
    bottom: 20px; /* ห่างจากด้านล่าง 20px */
    left: 50%; /* กึ่งกลางแนวนอน */
    transform: translateX(-50%); /* ย้ายกลับมาให้อยู่กึ่งกลางเป๊ะๆ */
    background-color: #4CAF50; /* สีเขียว */
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000; /* ให้แสดงอยู่เหนือสุด */
    transition: opacity 0.5s ease-in-out;
}

#copy-notification.hidden {
    opacity: 0;
    pointer-events: none; /* ไม่ให้คลิกได้ตอนซ่อน */
}

/* ทำให้ Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 10px;
    }
    .emoji {
        font-size: 1.8rem;
    }
}