* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5e6e8;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

h1 {
    color: #d84860;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

fieldset {
    background: white;
    border: 2px solid #f0c6d0;
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(216, 72, 96, 0.15);
}

legend {
    background-color: #d84860;
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
}

#formContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

label {
    font-weight: 600;
    color: #b03050;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 6px 0;
}

.radio-group label,
.checkbox-group label {
    font-weight: normal;
    color: #333;
    margin: 0;
    cursor: pointer;
}

.error-msg {
    color: #d84860;
    font-size: 13px;
    font-weight: 600;
    min-height: 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #f0c6d0;
    border-radius: 10px;
    margin-top: 4px;
    transition: border-color 0.2s;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: #d84860;
}

input[type="radio"],
input[type="checkbox"] {
    accent-color: #d84860;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

#submitBtn,
#displayBtn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    background-color: #d84860;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}

#submitBtn:hover,
#displayBtn:hover {
    background-color: #b03050;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(216, 72, 96, 0.35);
}

#output p {
    font-size: 15px;
    color: #555;
    padding: 8px 12px;
    border-left: 4px solid #f0c6d0;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fdf0f2;
    transition: border-color 0.3s;
}

#output.filled p {
    border-left-color: #d84860;
    color: #333;
}