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

body {
    font-family: 'Times New Roman', serif;
    background-color: #f5f5f5;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.biodata-container {
    max-width: 650px;
    width: 100%;
}

.border-outer {
    border: 6px solid #000;
    padding: 12px;
    background-color: #e8e8e8;
    position: relative;
}

.border-inner {
    border: 2px solid #000;
    padding: 30px 40px;
    background-color: #e8e8e8;
    position: relative;
}

.decorative-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><path d="M5,5 Q5,25 15,25 Q15,15 5,15 M15,5 Q25,5 25,15 Q15,15 15,5 M5,20 Q5,30 10,30 M20,5 Q30,5 30,10" stroke="%23000" fill="none" stroke-width="1.5"/><circle cx="8" cy="8" r="2" fill="%23000"/><circle cx="18" cy="18" r="1.5" fill="%23000"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

.top-left {
    top: -8px;
    left: -8px;
}

.top-right {
    top: -8px;
    right: -8px;
    transform: rotate(90deg);
}

.bottom-left {
    bottom: -8px;
    left: -8px;
    transform: rotate(-90deg);
}

.bottom-right {
    bottom: -8px;
    right: -8px;
    transform: rotate(180deg);
}

.title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: #000;
}

.section-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    margin: 25px 0 20px 0;
    color: #000;
}

.content-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.info-section {
    flex: 1;
}

.photo-section {
    width: 160px;
    flex-shrink: 0;
}

.photo-placeholder {
    width: 160px;
    height: 200px;
    border: 2px solid #000;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-input {
    display: none;
}

.photo-upload-label {
    position: absolute;
    bottom: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-placeholder:hover .photo-upload-label {
    opacity: 1;
}


.form-row {
    display: grid;
    grid-template-columns: 120px 20px 1fr;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.4;
    align-items: center;
    gap: 10px;
}

.label {
    font-weight: normal;
    color: #000;
}

.colon {
    text-align: center;
    min-width: 20px;
}

.input-field,
select {
    padding: 8px 10px;
    border: 1px solid #999;
    background-color: #fff;
    font-family: 'Times New Roman', serif;
    font-size: 14px;
    color: #000;
}

.input-field:focus,
select:focus {
    outline: none;
    border-color: #333;
    background-color: #fffbf0;
}

.input-field::placeholder {
    color: #999;
}


.form-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 10px;
}

.btn-submit,
.btn-reset {
    padding: 10px 30px;
    font-size: 15px;
    font-weight: bold;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    font-family: 'Times New Roman', serif;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-submit:hover {
    background-color: #000;
    color: #fff;
}

.btn-reset:hover {
    background-color: #ddd;
}

.btn-submit:active,
.btn-reset:active {
    transform: scale(0.98);
}


.gender-row {
    align-items: flex-start;
    grid-template-columns: 120px 15px 1fr !important;
}

.radio-group {
    display: flex;
    gap: 30px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.radio-input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #000;
}

.radio-input:focus {
    outline: 1px solid #000;
}


.photo-text {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.photo-subtext {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 5px;
    display: none;
}

.photo-placeholder:hover .photo-text,
.photo-placeholder:hover .photo-subtext {
    display: block;
}

@media print {
    body {
        background-color: white;
        padding: 0;
    }
    
    .biodata-container {
        max-width: 100%;
    }
    
    .form-buttons {
        display: none;
    }
}

@media (max-width: 600px) {
    .border-outer {
        padding: 8px;
    }
    
    .border-inner {
        padding: 20px;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .photo-section {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .form-row {
        grid-template-columns: 100px 15px 1fr;
        font-size: 14px;
    }
}

.error-message {
    color: #f39c12;
    font-size: 12px;
    margin-top: 6px;
    display: none;
    font-weight: 600;
    margin-left: 115px;
    white-space: nowrap;
}

.input-error {
    border: 2px solid #d32f2f !important;
    background-color: #ffebee !important;
}

.input-error:focus {
    outline: none;
    border-color: #d32f2f !important;
    box-shadow: 0 0 5px rgba(211, 47, 47, 0.3) !important;
}