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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    min-height: 100vh;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.matura-header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid #ffffff;
    margin-bottom: 30px;
}

.official-seal {
    width: 80px;
    height: 80px;
    border: 4px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    font-size: 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.seal-inner {
    transform: rotate(-30deg);
}

.matura-header h1 {
    font-family: 'Courier Prime', monospace;
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.matura-header .subtitle {
    color: #e0e0e0;
    font-size: 1.1rem;
}

.matura-header .year {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-top: 10px;
}

.quiz-progress {
    color: #ffffff;
    font-family: 'Courier Prime', monospace;
    font-size: 1rem;
    margin-top: 15px;
}

.form-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.form-card h2 {
    font-family: 'Courier Prime', monospace;
    color: #5865f2;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.instruction {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Courier Prime', monospace;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #5865f2;
}

.error-msg {
    color: #ed4245;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #5865f2;
    color: #ffffff;
}

.btn-primary:not(:disabled):hover {
    background: #4752c4;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #99aab5;
    color: #ccd6f4;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f2f3f5;
    color: #5865f2;
}

.btn-secondary:not(:disabled):hover {
    background: #e3e5e8;
}

.footer-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin-top: 20px;
}
.quiz-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.candidate-id {
    font-family: 'Courier Prime', monospace;
    background: #f2f3f5;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #5865f2;
    font-weight: bold;
}

.question-container {
    min-height: 300px;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f2f3f5;
}

.question {
    margin-bottom: 30px;
}

.question h3 {
    font-family: 'Courier Prime', monospace;
    color: #5865f2;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.option:hover {
    border-color: #5865f2;
    background: #f2f3f5;
}

.option.selected {
    border-color: #5865f2;
    background: #e3e5e8;
}

.option input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #5865f2;
}
.scan-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.scan-border {
    position: relative;
    padding: 40px;
    background: #ffffff;
    border: 3px solid #5865f2;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.4);
}

.scan-glare {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    height: 60px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    opacity: 0.6;
}

.scan-content {
    position: relative;
    max-width: 600px;
}

.document-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #5865f2;
    padding-bottom: 20px;
}

.doc-title {
    font-family: 'Courier Prime', monospace;
    font-size: 1.5rem;
    color: #5865f2;
    font-weight: bold;
}

.doc-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.doc-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
    margin-bottom: 30px;
}

.doc-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
}

.field-label {
    color: #5865f2;
    font-weight: bold;
}

.field-value {
    color: #333;
}

.doc-seal {
    margin: 30px 0;
    text-align: center;
}

.seal-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: #5865f2;
    border: 2px solid #5865f2;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transform: rotate(-15deg);
}

.seal-text-small {
    font-size: 0.7rem;
    color: #888;
    margin-top: 5px;
    font-family: 'Courier Prime', monospace;
}

.doc-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.doc-signature-line {
    color: #666;
    font-size: 0.9rem;
}

.doc-signature-label {
    color: #888;
    font-size: 0.8rem;
    margin-top: 5px;
}

.doc-watermark {
    color: #e0e0e0;
    font-size: 0.7rem;
    margin-top: 15px;
    font-family: 'Courier Prime', monospace;
    letter-spacing: 2px;
}
.result-summary {
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.result-summary h2 {
    font-family: 'Courier Prime', monospace;
    color: #5865f2;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.score-display {
    font-family: 'Courier Prime', monospace;
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.grade-badge {
    display: inline-block;
    padding: 10px 30px;
    border: 3px solid;
    border-radius: 8px;
    font-family: 'Courier Prime', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.grade-badge.ndst { border-color: #ed4245; color: #ed4245; }
.grade-badge.dop { border-color: #faa81a; color: #faa81a; }
.grade-badge.dob { border-color: #3ba55d; color: #3ba55d; }
.grade-badge.bdb { border-color: #3ba55d; color: #3ba55d; }

#result-message {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    body { padding: 10px; }
    .matura-header h1 { font-size: 1.8rem; }
    .form-card, .quiz-card, .result-summary { padding: 25px 20px; }
    .doc-info-grid { grid-template-columns: 1fr; gap: 15px; }
    .scan-border { padding: 25px; }
    .score-display { font-size: 2rem; }
}