/* ===== Global ===== */
body {
    margin: 0;
    font-family: "Segoe UI", Arial, "Khmer OS Battambang", "Noto Serif Khmer", sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #333;
}

/* ===== Header ===== */
header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;
    text-align: center;
    padding: 30px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

header h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: 1px;
}

header p {
    margin-top: 8px;
    font-size: 16px;
    opacity: 0.9;
}

/* ===== Navigation ===== */
nav {
    background: #0b1c2d;
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 12px 0;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: #00e5ff;
    left: 0;
    bottom: 0;
    transition: 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* ===== Main Container ===== */
main {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* ===== Titles ===== */
main h2 {
    color: #1e3c72;
    margin-bottom: 5px;
}

main p {
    margin-top: 0;
    color: #555;
}

/* ===== Fieldset ===== */
fieldset {
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background: #f9fbfd;
}

legend {
    padding: 0 10px;
    font-weight: bold;
    color: #1e3c72;
}

/* ===== Form Controls ===== */
label {
    display: block;
    margin-top: 12px;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #ccd3db;
    font-size: 14px;
    transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30,144,255,0.2);
}

/* Radio & Checkbox spacing */
input[type="radio"],
input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
}

/* ===== Buttons ===== */
.buttons {
    text-align: center;
    margin-top: 25px;
}

button {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    margin: 0 10px;
    transition: 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

button[type="reset"] {
    background: linear-gradient(135deg, #555, #333);
}

/* ===== Footer ===== */
footer {
    background: #0b1c2d;
    color: #ffffff;
    text-align: center;
    padding: 20px 10px;
    margin-top: 50px;
}

footer a {
    color: #00e5ff;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    main {
        padding: 20px;
        margin: 20px;
    }

    header h1 {
        font-size: 24px;
    }
}
