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

body {
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    background: linear-gradient(145deg, #2ecc71 0%, #f1c40f 50%, #3498db 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    margin: 0;
}

.site-footer {
  margin-top: 16px;
  text-align: center;
  color: #0088cc;
  font-size: 1rem;
}

.quiz-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
    overflow: hidden;
    padding: 1rem;
    border: 2px solid #f1c40f;
    position: relative;
    max-height: 95vh;
    overflow-y: auto;
    margin-top: 20px;
}

/* Mute knop linksboven */
.mute-control {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.3rem 0.6rem 0.3rem 0.5rem;
    border-radius: 2rem;
    backdrop-filter: blur(4px);
    border: 1px solid #3498db;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mute-control.visible {
    opacity: 1;
    pointer-events: all;
}

.mute-control span {
    font-size: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f39c12;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #27ae60;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.reset-btn-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.3rem;
}

#resetBtn {
    background: #f39c12;
    width: auto;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    box-shadow: 0 2px 0 #e67e22;
    margin-top: 0;
    border: 1px solid #3498db;
}

h1, h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 0.3rem;
    line-height: 1.2;
    text-shadow: 1px 1px 0 #f1c40f;
    margin-top: 1rem;
}

/* Beginscherm afbeelding */
.start-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(145deg, #2ecc71, #f1c40f);
    border-radius: 1rem;
    margin: 0.5rem 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #3498db;
}

.image-placeholder-large {
    font-size: 4rem;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-text {
    background: #f1c40f;
    padding: 0.8rem;
    border-radius: 1rem;
    margin: 0.5rem 0 1rem 0;
    font-size: 0.9rem;
    border-left: 5px solid #27ae60;
    color: #2c3e50;
    border: 1px solid #3498db;
}

button {
    background: #27ae60;
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: 2rem;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 3px 0 #1e8449;
    transition: 0.1s ease;
    border: 1px solid #f1c40f;
    margin-top: 0.3rem;
}

button:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #1e8449;
}

button:disabled {
    background: #95a5a6;
    box-shadow: 0 3px 0 #7f8c8d;
    cursor: not-allowed;
    opacity: 0.7;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.progress-badge {
    background: #f1c40f;
    color: #2c3e50;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    display: inline-block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    border: 1px solid #27ae60;
}

.question-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(145deg, #2ecc71, #f1c40f);
    border-radius: 1rem;
    margin: 0.3rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #3498db;
}

.image-placeholder {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.image-placeholder img {
     width: 100%;
     height: 100%;
     object-fit: fill;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #27ae60;
    margin: 0.3rem 0 0.5rem 0;
    line-height: 1.3;
    background: #f1c40f;
    padding: 0.6rem;
    border-radius: 1rem;
    border: 1px solid #3498db;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.option-btn {
    background: #f1c40f;
    border: 2px solid #27ae60;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.8rem;
    border-radius: 40px;
    text-align: center;
    box-shadow: 0 3px 0 #1e8449;
    transition: 0.08s linear;
    cursor: pointer;
}

.option-btn:active {
    transform: translateY(3px);
    box-shadow: none;
}

.feedback-panel {
    background: #f1c40f;
    padding: 1rem;
    border-radius: 1.2rem;
    margin: 0.8rem 0;
    border-left: 5px solid #f39c12;
    border: 1px solid #3498db;
}

.correct-msg {
    font-size: 1.2rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 0.2rem;
}

.extra-info {
    font-size: 0.9rem;
    color: #2c3e50;
    margin: 0.3rem 0;
}

.score-row {
    font-size: 1.1rem;
    background: #f39c12;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    display: inline-block;
    margin-top: 0.5rem;
    border: 1px solid #27ae60;
}

.next-btn {
    background: #27ae60;
    font-size: 1.1rem;
    padding: 0.6rem;
    margin-top: 0.5rem;
    border: 1px solid #f1c40f;
}

.result-screen {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.result-score {
    font-size: 2.2rem;
    background: #f1c40f;
    padding: 0.8rem;
    border-radius: 70px;
    display: inline-block;
    margin: 0.5rem auto;
    border: 3px solid #3498db;
    text-align: center;
}

.final-feedback {
    font-size: 1.2rem;
    background: #f1c40f;
    padding: 1rem;
    border-radius: 1.5rem;
    border: 2px solid #f39c12;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
}

.diploma-input-section {
    background: white;
    padding: 1rem;
    border-radius: 1.5rem;
    margin: 1rem 0;
    border: 2px solid #27ae60;
    text-align: center;
    width: 100%;
}

.diploma-input-section h3 {
    color: #27ae60;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.diploma-input-section p {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.diploma-input-section input {
    width: 100%;
    padding: 0.7rem;
    font-size: 1rem;
    border: 2px solid #f1c40f;
    border-radius: 2rem;
    margin-bottom: 0.5rem;
    background: #f9f9f9;
    text-align: center;
}

.diploma-input-section input.error {
    border-color: #e74c3c;
    background-color: #fdf1f0;
}

.validation-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    min-height: 1.2rem;
}

.generate-diploma-btn {
    background: #27ae60;
    color: white;
    font-size: 1rem;
    padding: 0.7rem;
    border-radius: 2rem;
    border: 1px solid #f1c40f;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    box-shadow: 0 3px 0 #1e8449;
}

.generate-diploma-btn:disabled {
    background: #95a5a6;
    box-shadow: 0 3px 0 #7f8c8d;
    cursor: not-allowed;
}

hr {
    border: 1px solid #3498db;
    margin: 0.5rem 0;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Diploma modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
}

.modal.active {
    display: flex;
}

.diploma-card {
    background: white;
    padding: 1.2rem 1rem;
    border-radius: 1.5rem;
    max-width: 380px;
    width: 100%;
    border: 6px solid #f1c40f;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.diploma-card h2 {
    color: #27ae60;
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    text-shadow: none;
    font-family: 'Georgia', serif;
}

.diploma-card .subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-family: 'Arial', sans-serif;
}

.diploma-card .certificate-text {
    font-size: 1rem;
    line-height: 1.5;
    margin: 1rem 0;
    text-align: center;
}

.archaic-font {
    font-family: 'Courier New', 'Lucida Console', 'Monaco', monospace;
    font-size: 1rem;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.sans-serif-grey {
    font-family: 'Arial', 'Helvetica', sans-serif;
    color: #666666;
    font-size: 0.9rem;
    font-style: italic;
}

.diploma-card .name-line {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
    margin: 0.3rem 0;
    border-bottom: 2px solid #3498db;
    border-top: 2px solid #3498db;
    padding: 0.3rem;
    font-family: 'Georgia', serif;
    line-height: 1.8rem;
}

.diploma-card .date-line {
    font-size: 1rem;
    color: #444;
    margin: 0.5rem 0;
    font-family: 'Arial', sans-serif;
}

.diploma-card .serial {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #b94e0b;
    margin: 0.5rem 0;
    word-break: break-all;
    letter-spacing: 1px;
    background: #f5f5f5;
    padding: 0.3rem;
    border-radius: 1rem;
    font-weight: 600;
}

.diploma-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 2px solid #3498db;
}

.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.qr-code {
    width: 60px;
    height: 60px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #27ae60;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-text {
    font-size: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.download-btn {
    background: #27ae60;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid #f1c40f;
    box-shadow: 0 2px 0 #1e8449;
}

.close-btn {
    background: #f39c12;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
/* No-JS warning styling */
.no-js-warning {
    display: none;
}

/* Deze class wordt alleen gebruikt als JS uit staat via noscript */
.noscript-active .no-js-warning {
    display: flex;
}

/* Error boundary voor JS fouten */
.js-error {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #2ecc71 0%, #f1c40f 50%, #3498db 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.error-box {
    background: white;
    padding: 2rem;
    border-radius: 2rem;
    border: 4px solid #e74c3c;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.error-box h2 {
    color: #e74c3c;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.error-box p {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.error-box .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-box button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    border-radius: 3rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #1e8449;
    border: 1px solid #f1c40f;
    margin-top: 1rem;
}

.error-box button:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #1e8449;
}
