/* ตั้งค่าการจัดวางและพื้นหลัง */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Sarabun', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #333; /* สีเทาเข้ม */
}

/* การตั้งค่าของ container ให้เป็นสี่เหลี่ยมผืนผ้าแนวนอน */
.container {
    background: linear-gradient(135deg, #667eea, #764ba2); /* เปลี่ยนเป็นน้ำเงินเข้มแบบไล่ระดับ */
    padding: 2rem;
    width: 400px; /* กำหนดความกว้าง */
    height: 270px; /* กำหนดความสูง */
    border-radius: 30px; /* เพิ่มมุมโค้ง */
    text-align: center;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2); /* เพิ่มเงาให้ชัดเจนขึ้น */
    color: #fff;
    opacity: 0;
    transform: scale(0.9);
    animation: fadeIn 1s ease-out forwards;
    overflow: hidden; /* ทำให้เนื้อหาไม่เกินขอบ */
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.container h2 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* ไอคอนด้านบน */
.icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon img {
    width: 60px;
    height: 60px;
}

/* การตั้งค่าของ input */
.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-group input {
    width: 80%;
    padding: 0.6rem 2.5rem;
    font-family: 'Sarabun', sans-serif;
    border: none; /* ไม่ให้มีขอบ */
    border-radius: 15px; /* มุมโค้ง */
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    outline: none;
}

/* เพิ่มไอคอนใน input */
.form-group .icon-input {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

/* ไอคอนสำหรับซ่อน/แสดงรหัสผ่าน */
.eye-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
}

/* การตั้งค่าของปุ่ม */
.btn-login {
    width: 100%;
    padding: 0.8rem;
    font-family: 'Sarabun', sans-serif;
    background-color: #fbc531;
    border: none; /* ไม่ให้มีขอบ */
    border-radius: 15px; /* มุมโค้ง */
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-login:hover {
    background-color: #e1a100;
    transform: scale(1.05);
}

/* ลิงก์ด้านล่าง */
.bottom-links {
    margin-top: 1rem;
    font-size: 0.8rem;
}

.bottom-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.bottom-links a:hover {
    color: #fbc531;
}

/* แสดงข้อความผิดพลาด */
.error-message {
    display: none;
    color: #ff7675;
    font-size: 0.8rem;
    margin-top: 5px;
}