﻿/* -------------------------------------------
   Modern Centered Web Design Style
------------------------------------------- */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    /* บังคับ Flexbox ให้ทุกอย่างขยับเข้ากึ่งกลาง */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1e293b;
}

/* จัดสัดส่วน Container ให้หยืดหยุ่นและรองรับระยะขอบหน้าจอ */
.modern-wrapper {
    width: 100%;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* การ์ดกระจกโปร่งแสง (Glassmorphism) */
.modern-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    box-shadow: 0 25px 55px rgba(15, 23, 42, 0.1);
}

/* ตกแต่งส่วนหัว */
.icon-box-modern {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.2);
}

.header-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 1rem;
    color: #64748b;
    font-weight: 300;
}

/* หัวข้อย่อยประจำส่วน */
.section-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .section-title span {
        background: #e0f2fe;
        color: #0369a1;
        padding: 2px 10px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 600;
    }

/* โครงสร้าง Input โต้ตอบแบบนิ่งลึก (Floating Label) */
.modern-input-group {
    position: relative;
    margin-top: 15px;
}

.modern-input {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: #0f172a;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    background: transparent;
    outline: none;
    transition: 0.3s;
}

/* เส้นอนิเมชั่นใต้ Input ตอนคลิก */
.input-line {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: #0284c7;
    transition: 0.4s;
}

.modern-input:focus ~ .input-line,
.modern-input:not(:placeholder-shown) ~ .input-line {
    width: 100%;
}

/* อนิเมชั่นตัวหนังสือขยับขึ้นตอนกรอกข้อมูล */
.floating-label {
    position: absolute;
    left: 0;
    top: 10px;
    color: #64748b;
    pointer-events: none;
    transition: 0.3s ease all;
    font-weight: 300;
}

.modern-input:focus ~ .floating-label,
.modern-input:not(:placeholder-shown) ~ .floating-label {
    top: -12px;
    font-size: 0.85rem;
    color: #0284c7;
    font-weight: 500;
}

/* ตัวควบคุมแบบ Dropdown */
.modern-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
}

.modern-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.6);
    color: #0f172a;
    outline: none;
    transition: 0.3s;
}

    .modern-select:focus {
        border-color: #0284c7;
        background-color: #fff;
    }

/* วิทยุ (Radio List) */
.modern-radio-group {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 8px 15px;
}

.rbl-modern td {
    padding-right: 20px;
}

.rbl-modern input[type="radio"] {
    margin-right: 6px;
    accent-color: #0284c7;
    transform: scale(1.15);
}

/* ปุ่มกดสไตล์นีโอมินิมอลลิสต์ */
.btn-modern-submit {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    border: none;
    padding: 14px 45px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.25);
    transition: all 0.3s ease;
}

    .btn-modern-submit:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(2, 132, 199, 0.4);
        opacity: 0.95;
    }

    .btn-modern-submit:active {
        transform: translateY(-1px);
    }

/* ตัวแจ้งเตือนเมื่อลืมกรอก */
.val-msg {
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
    font-weight: 400;
}



/* -------------------------------------------
   Modern Web Design - Deep Purple & Indigo Theme
   (สำหรับหน้าลงทะเบียนเสนอผลงานวิจัย)
------------------------------------------- */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    /* เปลี่ยนพื้นหลังเป็นโทนสีม่วง-น้ำเงินครามล้ำ ๆ */
    background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 50%, #c7d2fe 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1e1b4b;
}

/* จัดสัดส่วน Container */
.modern-wrapper {
    width: 100%;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* การ์ดกระจกโปร่งแสง (Glassmorphism เคลือบสีนวลม่วง) */
.modern-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    box-shadow: 0 25px 55px rgba(79, 70, 229, 0.08);
}

/* ตกแต่งส่วนหัว (เปลี่ยนเป็นไอคอนสีม่วง Indigo) */
.icon-box-modern {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.header-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e1b4b;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 1rem;
    color: #4b5563;
    font-weight: 300;
}

/* หัวข้อย่อยประจำส่วน (01, 02, 03) */
.section-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #1e1b4b;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .section-title span {
        background: #e0e7ff;
        color: #4f46e5;
        padding: 2px 10px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 600;
    }

/* โครงสร้าง Input Floating Label */
.modern-input-group {
    position: relative;
    margin-top: 15px;
}

.modern-input {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: #1e1b4b;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    background: transparent;
    outline: none;
    transition: 0.3s;
}

/* เส้นอนิเมชั่นใต้ Input ตอนคลิก (เปลี่ยนเป็นสีอินดิโก้) */
.input-line {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: #6366f1;
    transition: 0.4s;
}

.modern-input:focus ~ .input-line,
.modern-input:not(:placeholder-shown) ~ .input-line {
    width: 100%;
}

.floating-label {
    position: absolute;
    left: 0;
    top: 10px;
    color: #4b5563;
    pointer-events: none;
    transition: 0.3s ease all;
    font-weight: 300;
}

.modern-input:focus ~ .floating-label,
.modern-input:not(:placeholder-shown) ~ .floating-label {
    top: -12px;
    font-size: 0.85rem;
    color: #6366f1;
    font-weight: 500;
}

/* ตัวควบคุมแบบ Dropdown */
.modern-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 8px;
}

.modern-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.6);
    color: #1e1b4b;
    outline: none;
    transition: 0.3s;
}

    .modern-select:focus {
        border-color: #6366f1;
        background-color: #fff;
    }

/* วิทยุ (Radio List) */
.modern-radio-group {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 8px 15px;
}

.rbl-modern td {
    padding-right: 20px;
}

.rbl-modern input[type="radio"] {
    margin-right: 6px;
    accent-color: #6366f1;
    transform: scale(1.15);
}

/* ปุ่มกดสไตล์อินดิโก้เข้ม มั่นคง แข็งแรง */
.btn-modern-submit {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    padding: 14px 45px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
    transition: all 0.3s ease;
}

    .btn-modern-submit:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(79, 70, 229, 0.4);
        opacity: 0.95;
    }

    .btn-modern-submit:active {
        transform: translateY(-1px);
    }

/* ตัวแจ้งเตือนเมื่อลืมกรอก */
.val-msg {
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
    font-weight: 400;
}

/* กรอบเงื่อนไข Terms & Conditions */
.modern-terms-card {
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
    overflow: hidden;
}

    .modern-terms-card .card-header {
        background-color: #312e81; /* ม่วงเข้มมืด */
        color: #fff;
        padding: 12px 20px;
        font-size: 0.95rem;
        border: none;
    }

    .modern-terms-card ul {
        padding-left: 1.25rem;
        margin-bottom: 0.5rem;
    }

/* กล่องแจ้งเตือนสีเหลืองนวลมินิมอล */
.alert-warning-custom {
    background-color: #fef9c3;
    border-left: 4px solid #eab308;
    color: #713f12;
    font-size: 0.85rem;
}

.rbl-terms td {
    padding: 6px 0;
    display: block;
}

.rbl-terms input[type="radio"] {
    accent-color: #4f46e5;
    transform: scale(1.15);
    margin-right: 8px;
}

/* ตัวควบคุมความสวยงามของ FileUpload */
.modern-file-upload input[type="file"] {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #4b5563;
    outline: none;
    transition: 0.3s;
}

    .modern-file-upload input[type="file"]:hover {
        border-color: #6366f1;
        background: #fff;
    }
