body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    color: #333;
}

.controls {
    margin: 20px 0;
}

.controls label {
    font-weight: bold;
    margin-right: 10px;
}

.controls input {
    padding: 8px;
    width: 100px;
    margin-right: 10px;
}

.controls button {
    padding: 10px 20px;
    margin: 5px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.controls button:hover {
    background-color: #0056b3;
}

.omr-sheet {
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 20px;
    width: 210mm; /* A4 width */
    min-height: 297mm; /* A4 height */
    box-sizing: border-box;
}

.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.field {
    flex: 1;
    margin-right: 10px;
}

.field label {
    display: block;
    font-weight: bold;
}

.field input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.questions {
    display: flex;
    justify-content: space-between;
}

.column {
    flex: 1;
    margin-right: 10px;
}

.column:last-child {
    margin-right: 0;
}

.question {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.question-number {
    width: 40px; /* Increased for three-digit numbers */
    font-weight: bold;
    margin-right: 10px;
    text-align: right; /* Right-align numbers */
}

.option {
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.option.filled {
    background-color: #333;
    color: white;
}

@media (max-width: 768px) {
    .omr-sheet {
        width: 100%;
        padding: 10px;
    }

    .header {
        flex-direction: column;
    }

    .field {
        margin-bottom: 10px;
        margin-right: 0;
    }

    .questions {
        flex-direction: column;
    }

    .column {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media print {
    .container {
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 0;
    }

    .controls {
        display: none;
    }

    .omr-sheet {
        box-shadow: none;
        border: none;
        margin: 0;
    }
}