/* German Quiz Plugin Styles */
.german-quiz-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quiz-screen {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.quiz-screen.active {
    display: block;
}

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

/* Start Screen */
#quiz-start-screen h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.2em;
}

#quiz-start-screen p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.level-selection {
    margin-bottom: 30px;
}

.level-selection h3 {
    color: #34495e;
    margin-bottom: 20px;
    text-align: center;
}

.level-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.level-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.level-btn:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.level-btn.selected {
    border-color: #3498db;
    background: #3498db;
    color: white;
}

.level-btn strong {
    font-size: 1.1em;
    display: block;
}

.level-btn span {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Quiz Buttons */
.quiz-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.quiz-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.quiz-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.quiz-btn.secondary {
    background: #95a5a6;
}

.quiz-btn.secondary:hover:not(:disabled) {
    background: #7f8c8d;
}

.quiz-btn.primary {
    background: #27ae60;
}

.quiz-btn.primary:hover:not(:disabled) {
    background: #229954;
}

#start-quiz-btn {
    display: block;
    margin: 0 auto;
    padding: 15px 30px;
    font-size: 1.1em;
}

/* Question Screen */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-progress {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9em;
    color: #7f8c8d;
}

.quiz-level {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.question-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#question-text {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
}

.question-topic {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 25px;
    font-style: italic;
}

.answer-options {
    margin-bottom: 30px;
}

.answer-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.answer-option:hover {
    border-color: #3498db;
    background: #ebf3fd;
}

.answer-option input[type="radio"] {
    margin: 0;
    transform: scale(1.2);
}

.answer-option label {
    cursor: pointer;
    flex: 1;
    font-size: 1em;
    line-height: 1.4;
}

.answer-option input[type="radio"]:checked + label {
    font-weight: 500;
    color: #2c3e50;
}

.answer-option:has(input[type="radio"]:checked) {
    border-color: #3498db;
    background: #ebf3fd;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.quiz-controls .quiz-btn {
    flex: 1;
    max-width: 150px;
}

/* Result Screen */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-header h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.result-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8em;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.score-details p {
    margin: 8px 0;
    font-size: 1.1em;
}

.result-status {
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.result-status.passed {
    background: #d5f4e6;
    color: #27ae60;
}

.result-status.failed {
    background: #fadbd8;
    color: #e74c3c;
}

.result-feedback {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-feedback p {
    font-size: 1.1em;
    line-height: 1.5;
    color: #2c3e50;
    margin: 0;
}

.result-details h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

#detailed-results {
    max-height: 500px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-item {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.correct {
    border-left: 4px solid #27ae60;
    background: #f8fff9;
}

.result-item.incorrect {
    border-left: 4px solid #e74c3c;
    background: #fef9f9;
}

.result-question {
    margin-bottom: 12px;
    font-size: 1em;
    line-height: 1.4;
}

.result-answers {
    margin-bottom: 12px;
}

.user-answer, .correct-answer {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.correct-mark {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2em;
}

.incorrect-mark {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2em;
}

.result-explanation {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.95em;
    line-height: 1.4;
}

.result-topic {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
}

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

.result-actions .quiz-btn {
    padding: 12px 24px;
}

/* Loading */
.quiz-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.quiz-loading p {
    color: white;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .german-quiz-wrapper {
        margin: 10px;
        padding: 15px;
    }
    
    .level-buttons {
        grid-template-columns: 1fr;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .result-score {
        flex-direction: column;
        gap: 20px;
    }
    
    .quiz-controls {
        flex-direction: column;
    }
    
    .quiz-controls .quiz-btn {
        max-width: none;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    #question-text {
        font-size: 1.1em;
    }
    
    .answer-option {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .german-quiz-wrapper {
        margin: 5px;
        padding: 10px;
    }
    
    .question-container {
        padding: 20px;
    }
    
    .quiz-header {
        padding: 15px;
    }
    
    .result-score {
        padding: 20px;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 1.5em;
    }
}

