body {
    font-family: 'Noto Sans Thai', sans-serif;
    margin: 0;
    padding: 0;
    background: url('images/bg.jpg') no-repeat center center fixed; 
    background-size: cover; 
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* ทำให้ body สูงเท่าหน้าจอ */
}

.container-wrapper {
    position: relative;
    max-width: 420px; /* ปรับขนาดฟอร์ม */
    width: 100%;
}

.container {
    background: rgba(255, 255, 255, 0.9); /* สีพื้นหลังของฟอร์ม */
    padding: 20px; /* เพิ่ม padding */
    border-radius: 0 0 10px 10px; /* ปรับให้กรอบด้านบนของฟอร์มตรง */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* เพิ่มเงาให้กับฟอร์ม */
    position: relative;
    z-index: 1;
    text-align: center; /* จัดข้อความให้อยู่ตรงกลาง */
}

.header {
    color: white;
    font-size: 35px; /* เพิ่มขนาดตัวอักษร */
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* เพิ่มเงาให้กับข้อความ */
    background-color: #062146; /* พื้นหลังของหัวข้อ */
    padding: 10px;
    border-radius: 10px 10px 0 0; /* กรอบบนโค้งมน */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* เพิ่มเงาให้กับหัวข้อ */
    margin-bottom: 0; /* เอา margin-bottom ออกเพื่อให้ติดกับฟอร์ม */
}

label {
    display: block; /* ทำให้ label เป็นบล็อกเต็มความกว้าง */
    text-align: left; /* จัดข้อความให้อยู่ด้านซ้าย */
    margin-bottom: 5px; /* เพิ่มพื้นที่ด้านล่างเล็กน้อย */
    font-size: 16px; /* กำหนดขนาดตัวอักษร */
    color: #062146; /* กำหนดสีข้อความ */
}


input[type="text"], input[type="password"] {
    width: 95%; /* ปรับให้ช่องกรอกฟอร์มกว้างเต็ม */
    padding: 14px;
    margin: 10px 0;
    background-color: transparent; /* พื้นหลังโปร่งใส */
    border: 1px solid rgba(6, 33, 70, 0.5); /* ขอบโปร่งแสง */
    border-radius: 5px; /* เพิ่มความโค้งมน */
    font-size: 16px;
    text-align: center; /* จัดข้อความให้อยู่ตรงกลาง */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #062146; /* กำหนดสีข้อความ */
    transition: all 0.3s ease;
}

input[type="submit"] {
    width: 100%; /* ปรับให้ปุ่มกว้างเต็ม */
    padding: 14px;
    background-color: #062146; /* สีพื้นหลังปุ่ม */
    color: white;
    border: none;
    border-radius: 20px; /* เพิ่มความโค้งมน */
    cursor: pointer;
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

input[type="submit"]:hover {
    background-color: #0056b3; /* สีปุ่มเมื่อชี้เมาส์ */
    transform: translateY(-2px); /* ยกปุ่มขึ้นเล็กน้อยเมื่อชี้เมาส์ */
}

.message {
    color: red;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* ค่า z-index ที่สูงเพื่อให้แสดงอยู่ด้านบนสุด */
}

.popup-content {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px; /* เพิ่มความโค้งมนให้กับป๊อปอัพ */
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.popup-content img {
    width: 100px;
    height: 100px;
}

.popup-content .popup-message {
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .login-container {
        max-width: 300px;
    }

    .login-header {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .login-container {
        max-width: 90%;
    }

    .login-header {
        max-width: 90%;
    }
}