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;
}

/* Navigation Bar */
nav {
    background-color: #062146;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

nav .logo {
    display: flex;
    align-items: center;
    font-size: 26px;
    font-weight: bold;
}

nav .logo img {
    margin-right: 10px;
    width: 50px;
    height: 50px;
}

nav .menu {
    display: flex;
    gap: 15px;
}

/* Link Effects */
nav .menu a {
    position: relative;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    overflow: hidden; 
    transition: color 0.3s ease;
}

nav .menu a::before {
    content: '';
    position: absolute;
    bottom: 0; 
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,0,150,1) 0%, rgba(0,204,255,1) 100%);
    transform: scaleX(0); 
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 0;
}

nav .menu a:hover::before {
    transform: scaleX(1);
}

nav .menu a.active {
    color: #f0f0f0;
    font-weight: bold;
}

nav .menu a.active::before {
    transform: scaleX(1);
}

.login-container-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.login-header img {
    width: 35px; /* ปรับความกว้างตามต้องการ */
    height: 35px; /* ปรับความสูงตามต้องการ */
    margin-left: 10px; /* ระยะห่างจากข้อความ */
    vertical-align: middle;
}


/* กำหนดขนาดของกรอบหัวข้อ "เข้าสู่ระบบ" */
.login-header {
    color: white;
    font-size: 35px;
    font-weight: bold; 
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* เพิ่มเงาให้กับข้อความ */
    background-color: #062146; 
    padding: 20px; 
    border-radius: 20px 20px 0 0; 
    width: 420px; /* ปรับกว้าง */
    height: 50px; /* ปรับความสูง */
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* เพิ่มเงาให้กับกรอบ */
}

/* กำหนดขนาดของฟอร์ม */
.login-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 0 0 20px 20px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* เพิ่มเงาให้กับฟอร์ม */
    width: 400px; /* ปรับกว้าง */
    height: 400px; /* ปรับความสูง */
    max-width: 90%; 
    text-align: center;
    background-image: url('images/bg-form2.png'); /* ใส่ URL ของรูปภาพที่ต้องการ */
    background-repeat: no-repeat; /* ป้องกันการทำซ้ำของรูปภาพ */
    background-position: bottom center; /* เลื่อนรูปภาพลงมาด้านล่างสุด */
}


.login-container label {
    display: block;
    margin: 10px 0 5px;
    color: #062146;
    text-align: left;
    font-weight: bold;
}

.login-container input {
    width: calc(100% - 20px);
    padding: 14px;
    margin-bottom: 20px;
    background-color: transparent; /* ทำให้พื้นหลังโปร่งใส */
    border: 1px solid rgba(6, 33, 70, 0.5); /* ขอบโปร่งแสง */
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    color: #062146; /* กำหนดสีตัวอักษร */
}

.login-container input:focus {
    border-color: rgba(0, 91, 187, 0.8); /* เพิ่มความเข้มเมื่อโฟกัส */
    box-shadow: 0 0 8px rgba(0, 91, 187, 0.6);
    outline: none;
}


.login-container button {
    width: 100%; /* ปรับความกว้างให้เท่ากับช่องกรอกข้อมูล */
    padding: 14px;
    background-color: #062146;
    color: #fff;
    border: none;
    border-radius: 30px; /* เพิ่มความโค้งมนของปุ่ม */
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}



.login-container button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* 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%;
    }
}