* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #333333;
    background: #f8f9fa;
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.screen {
    display: block;
}

.hidden {
    display: none !important;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: #E31E24;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #2c2c2c;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.5;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    white-space: pre-line;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #E31E24;
    margin-bottom: 1.5rem;
}

h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #E31E24;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E31E24;
}

p {
    font-size: 1.1rem;
    text-align: center;
    color: #666666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Start Screen Styling */
#startScreen .container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 4rem 2rem;
    max-width: 600px;
}

#startScreen h1 {
    margin-bottom: 2rem;
}

#startScreen p {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 8px;
    min-width: 200px;
    min-height: 52px;
    touch-action: manipulation;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background: #E31E24;
    color: white;
}

.btn-primary:hover {
    background: #c41e23;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227,30,36,0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,117,125,0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.3);
}

/* Quiz Interface */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-left: 4px solid #E31E24;
}

.wrong-counter, .question-progress {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c2c2c;
}

.wrong-counter {
    color: #E31E24;
}

.question-container {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-top: 4px solid #E31E24;
}

.input-container {
    margin-bottom: 2.5rem;
    text-align: center;
}

#answerInput {
    font-family: 'Lato', sans-serif;
    font-size: 1.3rem;
    padding: 18px 24px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    width: 100%;
    max-width: 400px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    color: #2c2c2c;
}

#answerInput:focus {
    border-color: #E31E24;
    background: white;
    box-shadow: 0 0 0 4px rgba(227,30,36,0.1);
    transform: scale(1.02);
}

#answerInput:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.button-container {
    text-align: center;
    margin-bottom: 2rem;
}

.feedback {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.feedback.success {
    border-left: 4px solid #28a745;
    color: #155724;
    background: #f8fff9;
}

.feedback.error {
    border-left: 4px solid #E31E24;
    color: #721c24;
    background: #fff8f8;
}

/* Final Screen */
#finalScreen .container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 4rem 2rem;
    max-width: 700px;
    text-align: center;
}

.final-score {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
    border-left: 4px solid #E31E24;
}

.final-score p {
    font-size: 1.0rem;
    color: #2c2c2c;
    margin: 0;
}

#finalMessage {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #2c2c2c;
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #28a745;
}

/* Admin Interface */
.admin-nav {
    text-align: center;
    margin-bottom: 2rem;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-top: 4px solid #E31E24;
}

.admin-content {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    color: #333;
}

.section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.section:last-child {
    border-bottom: none;
}

.question-editor {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2c2c2c;
    font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #E31E24;
    outline: none;
    box-shadow: 0 0 0 3px rgba(227,30,36,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.answers-list {
    margin-top: 1rem;
}

.answer-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 12px;
}

.answer-item input {
    flex: 1;
    margin: 0;
}

.answer-item button {
    min-width: auto;
    padding: 8px 16px;
    margin: 0;
    font-size: 0.9rem;
    min-height: auto;
}

.add-answer-btn {
    margin-top: 1rem;
    min-width: auto;
    padding: 10px 20px;
    font-size: 0.95rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border-top: 4px solid #E31E24;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: #E31E24;
}

.modal-content p {
    color: #555;
    margin-bottom: 2rem;
}

.modal-content input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.modal-content input:focus {
    border-color: #E31E24;
    outline: none;
    box-shadow: 0 0 0 3px rgba(227,30,36,0.1);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-buttons .btn {
    min-width: 120px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2.0rem;
    }
    
    h2 {
        font-size: 1.2rem;
        padding: 1.5rem;
    }
    
    .btn {
        min-width: 160px;
        font-size: 1rem;
        padding: 14px 24px;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .question-container {
        padding: 2rem 1.5rem;
    }
    
    #answerInput {
        font-size: 1.2rem;
        padding: 16px 20px;
    }
    
    .admin-content {
        padding: 2rem 1.5rem;
    }
    
    .question-editor {
        padding: 1.5rem;
    }
    
    #startScreen .container,
    #finalScreen .container {
        padding: 2.5rem 1.5rem;
    }
    
    .modal-content {
        padding: 2rem;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        min-width: 140px;
        font-size: 0.95rem;
        padding: 12px 20px;
    }
    
    .answer-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .answer-item input {
        margin-bottom: 8px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-buttons .btn {
        width: 100%;
    }
}

/* Prevent zoom on input focus for mobile */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="password"],
    textarea {
        font-size: 16px !important;
    }
}

/* Custom animations for SPAR branding */
@keyframes spar-pulse {
    0% { box-shadow: 0 0 0 0 rgba(227,30,36,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(227,30,36,0); }
    100% { box-shadow: 0 0 0 0 rgba(227,30,36,0); }
}

.btn-primary:focus {
    animation: spar-pulse 1.5s infinite;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Enhanced focus states for accessibility */
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #E31E24;
    outline-offset: 2px;
}

.spar-tanne {
  max-width: min(300px, 100%);
  margin: auto;
}

#congratsMessage {
    width: 100%;
}

/* Simple custom radio buttons */
.choice-option {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.9);
    margin: 10px 0;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.5);
    user-select: none;
    font-size: 1.1rem;
}

.choice-option:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.choice-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    appearance: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.choice-option input[type="radio"]:checked {
    background: #4CAF50;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.2);
}

.choice-option input[type="radio"]:checked::after {
    content: '✓';
    display: block;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
}

.choice-option:has(input[type="radio"]:checked) {
    border-color: #4CAF50;
    background: rgba(76,175,80,0.1);
}

.choice-option input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.choice-option:has(input[type="radio"]:disabled) {
    cursor: not-allowed;
    opacity: 0.6;
}