* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Mitr', sans-serif;
}

body {
    background-image: url('/images/bgreg.png');
    background-color: #f0f2f5;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.popup-content {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 5px;
    height: auto;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.popup-content p {
    margin-bottom: 12px;
}

.popup-content div {
    margin-bottom: 15px;
}

.popup-content  p:nth-child(6),
.popup-content p:nth-child(9),
.popup-content p:nth-child(19),
.popup-content p:nth-child(20),
.popup-content p:nth-child(21),
.popup-content p:nth-child(22),
.popup-content p:nth-child(23),
.popup-content p:nth-child(25),
.popup-content p:nth-child(26),
.popup-content p:nth-child(27),
.popup-content p:nth-child(28),
.popup-content p:nth-child(29),
.popup-content p:nth-child(30){
    margin-bottom: 1rem;
    margin-left: 30px;
}
.popup-content p:nth-child(8),
.popup-content p:nth-child(12){
    margin-bottom: 1rem;
    margin-left: 50px;
    color: #ff0000;
}

.popup-content p:nth-child(7),
.popup-content p:nth-child(10),
.popup-content p:nth-child(11){
    margin-bottom: 1rem;
    margin-left: 50px;
}

/* กรอบของการ login */
.login-section {
    background-color: rgb(255, 255, 255);
    padding: 40px;
    /* ปรับ Padding */
    box-shadow: 15px 30px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    /* ลดมุมมน */
    text-align: center;
    color: #292828;
    width: 90%;
    /* กว้าง 90% สำหรับมือถือ */
    max-width: 400px;
    /* จำกัดความกว้างสูงสุด */
}

/* ปรับขนาดของหัวข้อหลัก */
.login-section h2 {
    color: #353535;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* ขนาดของกรอบการกรอกข้อมูล */
.login-section input[type="text"],
.login-section input[type="password"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

/* ส่วนของ button login */
.login-section input[type="submit"] {
    width: 100%;
    background-color: #F89931;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

/* ส่วนของการปิด link การสมัครสมาชิก */
.register-btn:hover {
    background-color: #ff9100;
}

.no-underline {
    text-decoration: none;
}

.black-link {
    color: rgb(83, 83, 83);
    text-decoration: none;
}

/* ปรับตำแหน่ง logo บริษัท */
.logo-img {
    position: absolute;
    top: 40px;
    left: 70px;
    width: 200px;
    height: auto;
    z-index: 1;
}

/* สไตล์ในส่วนของ popup */
.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.popup-content {
    background-color: #ffffff;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 1000px;
    min-width: 300px;
    height: auto;
    max-height: 80vh;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow-y: auto;
}


.close-btn {
    color: #aaa;
    position: absolute;
    top: 0px;
    right: 25px;
    font-size: 36px;
    font-weight: 100;
}


.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

h3 {
    text-align: center;
    font-weight: 500;
    font-size: 22px;
    margin: 0 0 10px;
}

.checkbox-group {
    margin-bottom: 10px;
}

.button-container {
    display: flex;
    justify-content: flex-end;
}

button {
    background-color: #ff9100;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 2px;
}

button:hover {
    background-color: #000000;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 500;
}

.modal-content p {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 300;
    line-height: 1.6;
}

.modal-content p strong {
    color: #F89931;
    font-weight: 500;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.text-center {
    text-align: center;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translate(-50%, -60%);}
    to {opacity: 1; transform: translate(-50%, -50%);}
}

/* Responsive Styles */
@media (max-width: 768px) {
    .login-section {
        padding: 20px;
        /* ลด Padding สำหรับมือถือ */
    }

    .logo-img {
        width: 40%;
        /* ลดขนาด logo */
    }

    .login-section h2 {
        font-size: 24px;
        /* ปรับขนาดฟอนต์ */
    }
}

@media (max-width: 576px) {
    .login-section h2 {
        font-size: 20px;
        /* ปรับขนาดฟอนต์สำหรับมือถือเล็ก */
    }

    input[type="submit"] {
        padding: 12px;
        /* ปรับขนาดปุ่ม */
        font-size: 16px;
        /* ปรับขนาดฟอนต์ */
    }
}
