/* ===== BODY ===== */
body {
    font-family: Arial, sans-serif;
    background: url('img/index.jpg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
}

/* ===== CONTAINER ===== */
.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px 10px;
}

/* ===== FORM ===== */
.register-box {
    background: rgba(255, 255, 255, 0.92);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    color: #000;
    box-sizing: border-box;

    backdrop-filter: blur(6px);
    transition: 0.3s;

    max-height: 95vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* ===== TITLE ===== */
.register-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* ===== SECTION TITLE ===== */
.section-title {
    margin-top: 15px;
    font-size: 16px;
    font-weight: bold;
    padding-left: 10px;
    border-left: 4px solid #28a745;
    color: #333;
}

.section-title.pj {
    border-color: #007bff;
}

/* ===== INPUT GROUP ===== */
.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

/* ===== INPUT ===== */
.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-sizing: border-box;
    transition: 0.2s;
    font-size: 16px;
}

/* focus */
.input-group input:focus,
.input-group select:focus {
    border-color: #28a745;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
    outline: none;
}

/* ===== FILE INPUT ===== */
input[type="file"] {
    padding: 6px;
    background: #f8f8f8;
    border: 1px dashed #ccc;
}

/* ===== BUTTON สมัคร ===== */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #28a745, #218838);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.btn-primary:hover {
    transform: scale(1.03);
}

/* ===== ปุ่มกลับ ===== */
.btn-secondary {
    display: block;
    text-align: center;
    margin-top: 12px;
    text-decoration: none;

    background: linear-gradient(45deg, #ffc107, #e0a800);
    color: #000;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;

    transition: 0.3s;
}

.btn-secondary:hover {
    transform: scale(1.05);
}

/* ===== 🔥 POPUP ===== */
.slide {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 90%;
    max-width: 400px;
    background: linear-gradient(45deg, #3e4469, #2c2f4a);
    color: #fff;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    font-size: 16px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

/* ตอนแสดง */
.slide.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== 📱 MOBILE ===== */
@media (max-width: 480px) {

    .register-box {
        padding: 20px;
        border-radius: 10px;
        max-height: none;
    }

    h2 {
        font-size: 20px;
    }

    .input-group input,
    .input-group select {
        padding: 12px;
    }

    .btn-primary {
        padding: 14px;
    }

    /* 🔥 popup mobile */
    .slide {
        width: 85%;
        font-size: 15px;
        padding: 15px;
        border-radius: 10px;
    }
}