body {
    font-family: 'Calibri', 'Times New Roman', sans-serif;
    background-color: #f1f3f8;
    color: #555;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 0;
    box-sizing: border-box;
}

.main-container {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
}

.form-card, .exam-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 2rem 3rem;
    box-sizing: border-box;
}

.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.card-header h1 {
    color: #415094;
    font-weight: 700;
    font-size: 2.5rem;
    margin: 0;
}

.card-header p {
    color: #777;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f8f9fa;
    color: #333;
    font-family: 'Calibri', 'Times New Roman', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: #673ab7;
    box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.15);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #415094 0%, #673ab7 100%);
    color: white;
    font-family: 'Calibri', 'Times New Roman', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

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

/* Styles for exam view */
.exam-card pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-family: 'Times New Roman', serif;
    font-size: 0.9rem;
    line-height: 1.6;
}

.action-buttons {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-buttons a {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
    color: white;
}

.action-buttons a:hover {
    transform: translateY(-2px);
}

.btn-pdf {
    background-color: #d9534f;
}

.btn-docx {
    background-color: #2956b9;
}

.btn-back {
    background-color: #777;
}

.btn-print {
    background-color: #28a745;
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f8f9fa;
    color: #333;
    font-family: 'Calibri', 'Times New Roman', sans-serif;
    font-size: 1rem;
}

.footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #777;
}

@media print {
    body {
        background-color: white;
        display: block;
        padding: 0;
    }
    .main-container, .exam-card {
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    .card-header, .action-buttons {
        display: none !important;
    }
    .exam-card pre {
        border: none;
        background-color: transparent;
        padding: 0;
        color: black;
    }
}