* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Prompt', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background-color: #AFD5F0;
    overflow: hidden;
}

.container {
    display: flex;
    width: 100%;
    height: 100%;
}

.left-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    height: 100%;
    background-color: #AFD5F0;
}

.left-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.right-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    height: 100%;
    background-color: #FFFFFF;
    padding: 20px;
}

.register-form {
    width: 100%;
    max-width: 320px;
    padding: 1.2rem;
    background: linear-gradient(145deg, #e0f7ff, #ffffff);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(182, 45, 45, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.register-form h2 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    color: hsl(213, 90%, 69%);
}

.register-form input,
.register-form select {
    width: 100%;
    padding: 0.5rem;
    margin: 0.35rem 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: border 0.3s ease;
}

.register-form select option {
    font-size: 12px;
    padding: 6px;
}

.register-form input:focus,
.register-form select:focus {
    border-color: #94c0e0;
    outline: none;
}

.date-input {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input input {
    padding-left: 40px;
    background: #f9f9f9;
}

.date-input i {
    position: absolute;
    left: 10px;
    color: #ccc;
    font-size: 1.2rem;
}

.register-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: #AFD5F0;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.register-form button:hover {
    background-color: #94c4e0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* PDPA Popup Styles */
.pdpa-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.pdpa-card {
    background: #fff;
    border-radius: 12px;
    max-width: 800px;
    width: 90vw;
    padding: 32px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.pdpa-card h3 {
    margin-top: 0;
    color: #3050c4;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.pdpa-card p {
    font-size: 1em;
    color: #222;
    text-align: left;
    line-height: 1.6;
    margin-bottom: 16px;
}

.pdpa-close-btn {
    margin-top: 20px;
    background: #3050c4;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.pdpa-close-btn:hover {
    background: #2040a0;
}

.pdpa-link {
    color: #3050c4;
    text-decoration: underline;
}

.pdpa-text {
    font-size: 0.97em;
    vertical-align: middle;
}

.password-container {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.password-container input {
    width: 100%;
    padding-right: 40px; /* เผื่อที่ให้ icon */
    margin-bottom: 0;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 16px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #333;
}

.toggle-password.fa-eye-slash {
    color: #007bff;
}

/* Responsive Design */

/* Large Desktop (≤1200px) */
@media (max-width: 1200px) {
    .register-form {
        max-width: 450px;
        padding: 1.8rem;
    }
}

/* Medium Desktop / Tablet Landscape (≤1024px) */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        overflow-y: auto;
    }

    .left-section {
        width: 100%;
        height: 35vh;
        min-height: 200px;
    }

    .left-section img {
        width: 50%;
        height: 100%;
        object-fit: contain;
    }

    .right-section {
        width: 100%;
        height: 65vh;
        min-height: 500px;
        padding: 30px 20px;
        overflow-y: auto;
    }

    .register-form {
        max-width: 500px;
        padding: 1.8rem;
    }

    .register-form input,
    .register-form select {
        padding: 0.65rem;
        font-size: 16px;
        margin: 0.4rem 0;
    }

    .register-form button {
        padding: 0.7rem;
        margin-top: 0.8rem;
    }
}

/* Tablet Portrait (≤768px) */
@media (max-width: 768px) {
    .left-section {
        display: none;
    }

    .right-section {
        width: 100%;
        height: 100%;
        min-height: 100vh;
        padding: 20px 15px;
    }

    .register-form {
        max-width: 300px;
        padding: 1.5rem;
    }

    .register-form h2 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .register-form input,
    .register-form select {
        padding: 0.5rem;
        font-size: 16px;
        margin: 0.4rem 0;
    }

    .register-form button {
        padding: 0.7rem;
        font-size: 16px;
    }

    .pdpa-card {
        width: 95vw;
        padding: 24px 20px;
        max-height: 80vh;
    }

    .pdpa-card h3 {
        font-size: 1.2rem;
    }

    .pdpa-card p {
        font-size: 0.9em;
    }
}

/* Mobile Large (≤576px) */
@media (max-width: 576px) {
    .register-form {
        max-width: 250px;
        padding: 1.2rem;
        border-radius: 15px;
    }

    .register-form h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .register-form input,
    .register-form select {
        padding: 0.5rem;
        font-size: 16px;
        margin: 0.35rem 0;
        border-radius: 6px;
    }

    .password-container {
        margin-bottom: 12px;
    }

    .password-container input {
        padding-right: 35px;
    }

    .toggle-password {
        right: 10px;
        font-size: 14px;
    }

    .register-form button {
        padding: 0.65rem;
        font-size: 16px;
        margin-top: 0.8rem;
    }

    .pdpa-text {
        font-size: 0.85em;
    }

    .pdpa-card {
        width: 95vw;
        padding: 20px 16px;
        border-radius: 10px;
    }

    .pdpa-card h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .pdpa-card p {
        font-size: 0.85em;
        line-height: 1.5;
    }

    .pdpa-close-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

/* Mobile Medium (≤400px) */
@media (max-width: 400px) {
    .register-form {
        padding: 1rem;
    }

    .register-form h2 {
        font-size: 1.1rem;
        margin-bottom: 0.9rem;
    }

    .register-form input,
    .register-form select {
        padding: 0.5rem;
        font-size: 16px;
        margin: 0.3rem 0;
    }

    .register-form button {
        padding: 0.5rem;
        font-size: 16px;
    }

    .pdpa-text {
        font-size: 0.8em;
    }

    .pdpa-card {
        padding: 18px 14px;
    }

    .pdpa-card h3 {
        font-size: 1rem;
    }

    .pdpa-card p {
        font-size: 0.8em;
    }
}

/* Mobile Small (≤350px) */
@media (max-width: 350px) {
    .register-form {
        padding: 0.9rem;
        border-radius: 12px;
    }

    .register-form h2 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .register-form input,
    .register-form select {
        padding: 0.5rem;
        font-size: 16px;
        margin: 0.25rem 0;
    }

    .password-container {
        margin-bottom: 10px;
    }

    .toggle-password {
        font-size: 13px;
        right: 8px;
    }

    .register-form button {
        padding: 0.55rem;
        font-size: 16px;
        margin-top: 0.7rem;
    }

    .pdpa-text {
        font-size: 0.75em;
    }

    .pdpa-card {
        width: 98vw;
        padding: 16px 12px;
        max-height: 85vh;
    }

    .pdpa-card h3 {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .pdpa-card p {
        font-size: 0.75em;
        line-height: 1.4;
    }

    .pdpa-close-btn {
        padding: 9px 18px;
        font-size: 0.9rem;
    }
}