/* ===== MODERN 2025 DESIGN SYSTEM ===== */

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    min-height: 100vh !important;
    color: #0f172a !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== RICH TEXT EDITOR STYLES ===== */
.rich-editor-container {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.rich-editor {
    background: white;
    border-radius: 8px;
    font-family: inherit;
}

.rich-editor .ql-editor {
    min-height: 80px;
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 15px;
}

.rich-editor .ql-toolbar {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-color: #ddd;
    background: #f8fafc;
}

.rich-editor .ql-container {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-color: #ddd;
}

/* Sicherstellen, dass Toolbar über dem Editor steht und volle Breite nutzt */
.rich-editor .ql-toolbar,
.rich-editor .ql-container {
    display: block;
    width: 100%;
}

/* Kleinere Checkbox und Label für "Richtig" */
.correct-checkbox {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.correct-checkbox input[type="checkbox"] {
    transform: scale(0.9);
}

/* MathJax Formula Styles */
.math-formula {
    display: inline-block;
    margin: 5px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #e6f3ff 0%, #cce7ff 100%);
    border: 2px solid #4dabf7;
    border-radius: 8px;
    font-family: 'Times New Roman', serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.math-formula:hover {
    background: linear-gradient(135deg, #d0ebff 0%, #a5d8ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 171, 247, 0.3);
}

/* Question and Answer Rich Content */
.question-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.question-text h1,
.question-text h2,
.question-text h3 {
    color: #2d3748;
    margin-top: 20px;
    margin-bottom: 12px;
}

.question-text strong {
    color: #2d3748;
    font-weight: 600;
}

.question-text em {
    color: #4a5568;
}

.question-text ul,
.question-text ol {
    margin: 12px 0;
    padding-left: 24px;
}

.question-text blockquote {
    border-left: 4px solid #667eea;
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.answer-text {
    font-size: 16px;
    line-height: 1.5;
}

.answer-text strong {
    font-weight: 600;
}

.answer-text em {
    font-style: italic;
}

/* Preview Modal */
#previewModal .modal-body {
    font-size: 16px;
    line-height: 1.6;
}

#previewModal .math-formula {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-color: #fc8181;
}

/* Editor Toolbar Enhancements */
.editor-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.editor-toolbar .btn-sm {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Responsive Design für Rich-Text */
@media (max-width: 768px) {
    .rich-editor .ql-toolbar {
        padding: 8px;
    }

    .rich-editor .ql-editor {
        font-size: 16px;
        /* Größere Schrift auf mobilen Geräten */
        padding: 12px;
    }

    .math-formula {
        margin: 3px;
        padding: 6px 10px;
        font-size: 14px;
    }

    .question-text {
        font-size: 16px;
    }

    .answer-text {
        font-size: 15px;
    }
}

/* Modern Container */
.container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5b61f0 0%, #8454f5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
}

.btn-outline:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-1px);
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid transparent;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ===== MULTIPLE CHOICE QUIZ STYLES ===== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.start-screen {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.start-screen h3 {
    color: #0f172a;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.start-screen p {
    color: #475569;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.quiz-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    color: #334155;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-icon {
    font-size: 1.5rem;
}

/* Quiz Selection */
.quiz-selection h3 {
    color: #0f172a;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.quiz-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.quiz-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.quiz-header h4 {
    color: #0f172a;
    margin: 0;
    font-weight: 600;
}

.quiz-meta {
    display: flex;
    gap: 1rem;
    color: #64748b;
    font-size: 0.9rem;
}

.quiz-description {
    color: #475569;
    margin-bottom: 1rem;
    font-weight: 400;
}

.quiz-difficulty {
    display: flex;
    gap: 0.5rem;
}

.difficulty-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-easy {
    background: rgba(76, 175, 80, 0.8);
    color: white;
}

.badge-medium {
    background: rgba(255, 193, 7, 0.8);
    color: black;
}

.badge-hard {
    background: rgba(244, 67, 54, 0.8);
    color: white;
}

/* Question Display */
.question-display {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    color: #333333;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.question-counter {
    color: #666666;
    font-weight: bold;
}

.difficulty-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.difficulty-easy {
    background: rgba(76, 175, 80, 0.8);
    color: white;
}

.difficulty-medium {
    background: rgba(255, 193, 7, 0.8);
    color: black;
}

.difficulty-hard {
    background: rgba(244, 67, 54, 0.8);
    color: white;
}

.timer {
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    border: 2px solid rgba(102, 126, 234, 0.5);
}

.timer-warning {
    background: rgba(244, 67, 54, 0.8);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.question-content h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Media Files */
.media-section {
    margin: 2rem 0;
    text-align: center;
}

.question-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 0.5rem;
}

.question-video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    margin: 0.5rem;
}

.question-audio {
    width: 100%;
    max-width: 400px;
    margin: 0.5rem;
}

/* Answer Options */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2d3748;
}

.answer-option:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.answer-option input[type="checkbox"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.answer-option.selected {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.6);
    color: #2d3748;
}

.answer-text {
    color: #2d3748;
    font-size: 1.1rem;
    flex: 1;
    font-weight: 500;
}

/* Question Actions */
.question-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Answer Feedback */
.answer-feedback {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.answer-feedback.correct {
    border: 2px solid rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.answer-feedback.incorrect {
    border: 2px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.feedback-header h4 {
    color: white;
    margin: 0;
}

.points {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-weight: bold;
}

.explanation {
    margin-bottom: 1.5rem;
}

.explanation h5 {
    color: white;
    margin-bottom: 0.5rem;
}

.explanation p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.correct-answers h5 {
    color: white;
    margin-bottom: 1rem;
}

.correct-answers ul {
    list-style: none;
    padding: 0;
}

.correct-answers li {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 8px;
}

/* Quiz Results */
.quiz-results {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.score-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.score-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.score-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.score-value {
    display: block;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Results Details */
.results-details {
    margin-bottom: 2rem;
}

.results-details h3 {
    color: white;
    margin-bottom: 1rem;
}

.result-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    border-left: 4px solid;
}

.result-item.correct {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: rgba(76, 175, 80, 0.8);
}

.result-item.incorrect {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: rgba(244, 67, 54, 0.8);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.question-number {
    color: white;
    font-weight: bold;
}

.result-icon {
    font-size: 1.2rem;
}

.question-text {
    color: #1a202c;
    font-style: italic;
    font-weight: 500;
}

.time-used {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.results-actions {
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Quiz Info */
.quiz-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.progress {
    flex: 1;
    margin: 0 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #4caf50, #8bc34a);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container {
        padding: 1rem;
    }

    .question-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .quiz-features {
        grid-template-columns: 1fr;
    }

    .results-actions {
        flex-direction: column;
    }

    .quiz-info {
        flex-direction: column;
        gap: 1rem;
    }

    .progress {
        margin: 0;
    }
}

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: #2d3748;
    margin: 0;
    font-size: 1.5rem;
}

.btn-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Message Container */
#messageContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: rgba(76, 175, 80, 0.9);
    border-left: 4px solid #4caf50;
}

.alert-error {
    background: rgba(244, 67, 54, 0.9);
    border-left: 4px solid #f44336;
}

.alert-info {
    background: rgba(33, 150, 243, 0.9);
    border-left: 4px solid #2196f3;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== EDITOR STYLES ===== */
.editor-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.editor-header {
    text-align: center;
    margin-bottom: 3rem;
}

.editor-header h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.editor-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.app-creation-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    margin-bottom: 2rem;
}

.questions-section {
    margin-top: 2rem;
}

.questions-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.questions-section h3 {
    color: white;
    margin: 0;
}

/* Editor specific labels */
.editor-container label {
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.4);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.question-item label {
    color: white !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 4px !important;
    display: inline-block !important;
    margin-bottom: 0.5rem !important;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(0, 0, 0, 0.8);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Question Editor Styles */
.question-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.question-item .card-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.question-item .card-header h6 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
}

.question-item .card-body {
    padding: 1.5rem;
}

.media-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.answer-letter {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.delete-question-btn {
    background: rgba(244, 67, 54, 0.8) !important;
    color: white !important;
}

/* Media Player Styles */
.media-player-interface {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 1rem;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-title h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.player-title .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0.5rem 0 0 0;
}

.player-main {
    position: relative;
}

.media-container {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.overlay-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.event-overlay {
    text-align: left;
}

.event-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.event-icon {
    font-size: 2rem;
}

.event-header h4 {
    margin: 0;
    color: #333;
}

.event-content {
    line-height: 1.6;
    font-size: 1.1rem;
}

.overlay-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.player-timeline {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.timeline-events-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    min-height: 40px;
    padding: 0.5rem;
}

.timeline-event-marker {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.timeline-event-marker:hover {
    background: rgba(76, 175, 80, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.event-time {
    font-weight: bold;
    font-family: monospace;
}

.media-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.media-player-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.media-player-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.media-player-item .card-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.media-player-item .card-header h5 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.player-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.source-type,
.event-count {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.event-count {
    background: rgba(33, 150, 243, 0.8);
}

.media-player-item .card-body {
    padding: 1.5rem;
}

.player-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.player-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 1rem;
}

.file-preview,
.url-preview,
.embed-preview,
.unknown-preview {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
}

.media-player-item .card-footer {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.8), rgba(76, 175, 80, 0.6));
    border-radius: 20px;
    transition: width 0.1s ease;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.delete-question-btn {
    border: 1px solid rgba(244, 67, 54, 0.9) !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.9rem !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

.delete-question-btn:hover {
    background: rgba(244, 67, 54, 1) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.media-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 0.3rem 0.5rem;
    margin: 0.2rem 0;
    font-size: 0.8rem;
    color: white;
}

.media-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    overflow: hidden;
}

.media-preview img {
    flex-shrink: 0;
}

.media-preview span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-file-item .btn {
    padding: 0.1rem 0.3rem;
    font-size: 0.7rem;
    line-height: 1;
}

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Small labels in form-check */
.form-check-label {
    background: none !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Small text labels */
small.text-muted {
    background: rgba(0, 0, 0, 0.3) !important;
    padding: 0.1rem 0.4rem !important;
    border-radius: 3px !important;
    display: inline-block !important;
}

/* Responsive Editor */
@media (max-width: 768px) {
    .editor-container {
        padding: 1rem;
    }

    .questions-section .section-header {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* ===== KATEGORIEN & NAVIGATION ===== */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.section-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.category-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #333;
    font-size: 1rem;
    min-width: 250px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Kategorien Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--category-color, linear-gradient(45deg, #667eea, #764ba2));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: translateX(0);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.category-card h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.category-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.category-stat {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Kategorie-Details */
.category-detail-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

.back-btn {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.category-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.category-icon-large {
    font-size: 5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.category-text h2 {
    color: #2d3748;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.category-text p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.category-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.category-app-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.category-app-card .app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.category-app-card .app-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
}

.category-app-card h4 {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
}

.category-app-card .app-type {
    background: rgba(118, 75, 162, 0.1);
    color: #764ba2;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: auto;
}

.category-app-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.category-app-card .app-creator {
    color: #999;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-app-card .access-type {
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: auto;
}

.access-type.public {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.access-type.group {
    background: rgba(241, 196, 15, 0.1);
    color: #F1C40F;
}

.access-type.individual {
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
}

/* App-Kategorien in der Hauptansicht */
.app-category {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.access-public {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .category-icon-large {
        font-size: 4rem;
    }

    .category-text h2 {
        font-size: 2rem;
    }

    .back-btn {
        position: static;
        margin-bottom: 1rem;
    }

    .category-actions {
        flex-direction: column;
        align-items: center;
    }

    .search-box input {
        min-width: 200px;
    }

    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Header responsive fixes */
    .auth-section {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 1.5rem;
        display: flex;
        justify-content: center;
        max-width: 100%;
        padding: 0 1rem;
    }

    .header {
        padding: 1.5rem 0 2.5rem 0;
    }

    .header h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    #userSection {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.4rem;
        max-width: 100%;
        white-space: normal;
    }

    #userSection .user-info {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* ===== GRUPPEN-MANAGEMENT ===== */
.large-modal {
    max-width: 90vw;
    width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

.management-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.management-tabs .tab-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.management-tabs .tab-btn.active {
    background: white;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.management-tabs .tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Gruppen-Übersicht */
.groups-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.group-overview-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.group-overview-card:hover {
    transform: translateY(-5px);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.group-header h4 {
    color: #2d3748;
    margin: 0;
}

.member-count {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.group-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.group-meta span {
    background: rgba(118, 75, 162, 0.1);
    color: #764ba2;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

/* Tabellen */
.data-table {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.data-table thead {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.data-table .btn {
    margin-right: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Status-Anzeigen */
.status {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.active {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.status.inactive {
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
}

/* Berechtigungen */
.permission-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.permission-controls select {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    min-width: 200px;
}

.permission-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.permission-section h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.permission-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.permission-form select {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    min-width: 200px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.permission-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.permission-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.permission-icon {
    font-size: 1.5rem;
}

.permission-name {
    font-weight: 600;
    color: #2d3748;
}

.permission-type {
    background: rgba(118, 75, 162, 0.1);
    color: #764ba2;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    margin-left: auto;
}

.permission-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

/* Gruppen-Details */
.group-details-tabs {
    display: flex;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    gap: 0.25rem;
}

.group-details-tabs .tab-btn {
    color: #667eea;
    font-size: 0.9rem;
}

.group-details-tabs .tab-btn.active {
    color: white;
    background: #667eea;
}

.members-list,
.permissions-list {
    max-height: 400px;
    overflow-y: auto;
}

.member-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-info h5 {
    margin: 0 0 0.25rem 0;
    color: #2d3748;
}

.member-info small {
    color: #666;
}

.member-role {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.member-role.group_leader {
    background: rgba(241, 196, 15, 0.1);
    color: #F1C40F;
}

/* Schüler-Liste */
.students-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 1rem 0;
}

.student-item {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.student-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

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

.student-info h6 {
    margin: 0 0 0.25rem 0;
    color: #2d3748;
}

.student-info small {
    color: #666;
}

/* ===== MY APPS OVERVIEW ===== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.my-app-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.my-app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

.app-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.app-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
}

.app-info h3 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
}

.app-description {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.app-type {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.app-date {
    background: rgba(113, 128, 150, 0.1);
    color: #718096;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.app-user {
    background: rgba(56, 178, 172, 0.1);
    color: #38b2ac;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.app-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.app-actions .btn {
    flex: 1;
    min-width: auto;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.no-apps-message {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.no-apps-message h3 {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-apps-message p {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.app-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #2d3748;
    backdrop-filter: blur(8px);
    min-width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.search-box input::placeholder {
    color: #a0aec0;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #718096;
    font-size: 1.1rem;
}

.error {
    text-align: center;
    padding: 3rem;
    color: #e53e3e;
    background: rgba(254, 178, 178, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(254, 178, 178, 0.2);
}

.student-checkbox {
    margin-left: 1rem;
}

/* Formulare */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.search-section {
    margin-bottom: 1rem;
}

.search-section input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .large-modal {
        width: 95vw;
        max-width: none;
    }

    .management-tabs {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .groups-list {
        grid-template-columns: 1fr;
    }

    .permission-controls,
    .permission-form {
        flex-direction: column;
        align-items: stretch;
    }

    .permission-controls select,
    .permission-form select {
        min-width: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 45px 0 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    position: relative;
    min-height: 150px;
}

.header .container {
    position: relative;
    margin-top: -30px;
}

.header h1 {
    color: #4a5568;
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    margin-top: -20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: #666;
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 3.5rem;
    margin-top: -20px;
}

/* Editor-Menü überlagert Haupt-Content */
#editorMenuWrapper {
    position: relative;
    z-index: 10002;
}

#editorMenu {
    position: absolute;
    z-index: 10003;
}

/* ===== LIVE QUIZ STYLES ===== */
.live-quiz-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.live-quiz-tab {
    display: none;
}

.live-quiz-tab.active {
    display: block;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.session-header h4 {
    margin: 0;
    color: #2d3748;
}

.session-status {
    font-size: 0.9rem;
    font-weight: 600;
}

.session-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.session-code {
    font-family: 'Courier New', monospace;
    background: #f7fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
}

.session-actions {
    display: flex;
    gap: 0.5rem;
}

/* Live Quiz Host Interface */
.live-quiz-header {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.live-quiz-header h2 {
    margin: 0 0 1rem 0;
    color: #2d3748;
}

.session-info {
    display: flex;
    gap: 2rem;
    font-size: 1.1rem;
}

.session-info .session-code {
    background: #e6fffa;
    color: #065f46;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
}

.participant-count {
    background: #eff6ff;
    color: #1e40af;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.quiz-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.quiz-status {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.status-waiting {
    color: #f59e0b;
    font-size: 1.2rem;
    font-weight: 600;
}

.status-active {
    color: #10b981;
    font-size: 1.2rem;
    font-weight: 600;
}

.status-finished {
    color: #6b7280;
    font-size: 1.2rem;
    font-weight: 600;
}

.timer {
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    border: 2px solid rgba(102, 126, 234, 0.5);
    font-size: 1.5rem;
    margin: 1rem 0;
}

.timer-warning {
    background: rgba(244, 67, 54, 0.9) !important;
    color: white !important;
    border-color: rgba(244, 67, 54, 0.8) !important;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.live-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.participants-section,
.leaderboard-section,
.stats-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
}

.participants-grid {
    display: grid;
    gap: 0.5rem;
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.participant-name {
    font-weight: 600;
}

.participant-score {
    color: #059669;
    font-weight: bold;
}

/* Leaderboard Styles */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f8fafc;
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    color: #92400e;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #f3f4f6, #9ca3af);
    color: #374151;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #fdf4ff, #d946ef);
    color: #86198f;
}

.leaderboard-item.current-user {
    border: 2px solid #3b82f6;
    font-weight: bold;
}

.leaderboard-item .rank {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 2rem;
}

.leaderboard-item .name {
    flex: 1;
    font-weight: 600;
}

.leaderboard-item .score {
    font-weight: bold;
    color: #059669;
}

/* Participant Interface */
.participant-header {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participant-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.participant-info .score {
    background: #dcfce7;
    color: #166534;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
}

.participant-status {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.question-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1rem;
}

.question-section h3 {
    margin-bottom: 2rem;
    color: #2d3748;
    font-size: 1.3rem;
}

.answer-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.answer-option {
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    text-align: center;
}

.answer-option:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
}

.answer-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.answer-feedback {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.feedback-correct {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #22c55e;
}

.feedback-incorrect {
    background: #fee2e2;
    color: #dc2626;
    border: 2px solid #ef4444;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .live-content {
        grid-template-columns: 1fr;
    }

    .answer-options {
        grid-template-columns: 1fr;
    }

    .session-info {
        flex-direction: column;
        gap: 1rem;
    }

    .participant-info {
        flex-direction: column;
        gap: 1rem;
    }

    .quiz-controls {
        flex-wrap: wrap;
    }
}

/* ===== QR CODE MODAL ===== */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.qr-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.qr-modal-header h3 {
    margin: 0;
    color: #2d3748;
}

.qr-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.qr-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

.qr-modal-body {
    padding: 20px;
    text-align: center;
}

.qr-code-display {
    margin: 20px 0;
}

.qr-code-display img {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Live Question Display */
.live-question-container {
    padding: 20px;
    text-align: center;
}

.live-question-container .question-text {
    font-size: 1.5em;
    margin-bottom: 30px;
}

.answer-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.answer-btn {
    padding: 20px;
    font-size: 1.2em;
    border-radius: 8px;
    border: 2px solid transparent;
}

.answer-btn:nth-child(4n+1) { background-color: #e74c3c; color: white; }
.answer-btn:nth-child(4n+2) { background-color: #3498db; color: white; }
.answer-btn:nth-child(4n+3) { background-color: #f1c40f; color: white; }
.answer-btn:nth-child(4n+4) { background-color: #2ecc71; color: white; }

.answer-btn:hover {
    opacity: 0.9;
    border-color: #2d3748;
}

/* Live Quiz Results Table */
.results-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.results-table th, .results-table td {
    padding: 12px 15px;
    text-align: left;
}

.results-table thead tr {
    background-color: #667eea;
    color: white;
    font-weight: 600;
}

.results-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.results-table tbody tr:nth-of-type(even) {
    background-color: #f8fafc;
}

.results-table tbody tr:last-of-type {
    border-bottom: none;
}

.results-table td strong {
    font-size: 1.1em;
    color: #2d3748;
}

/* Live Quiz Leaderboard */
.leaderboard-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 1.1em;
}

.leaderboard-list .player-name {
    font-weight: 600;
    color: #2d3748;
}

.leaderboard-list .player-score {
    font-weight: bold;
    color: #667eea;
}

.session-code-large {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: #3182ce;
    background: #e6f3ff;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
    margin: 10px 0;
}

.qr-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
}

/* Symbol-Antworten für Anti-AI-Schutz */
.symbol-answer-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.symbol-option {
    padding: 20px;
    border: 3px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.symbol-option .symbol {
    font-size: 2rem;
    margin-right: 10px;
}

.symbol-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.symbol-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.symbol-option.selected {
    border-width: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Presenter Mode */
.presenter-question {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.presenter-question h2 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 2rem;
}

.presenter-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.presenter-answer {
    padding: 20px;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.presenter-answer.correct {
    border: 4px solid #10b981;
    background: #d1fae5;
    color: #065f46;
}

/* Site Footer */
.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px 0 20px 0;
    margin-top: 60px;
    position: relative;
    z-index: 100;
}

.footer-content {
    text-align: center;
    position: relative;
    z-index: 100;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}

.footer-info {
    position: relative;
    z-index: 100;
}

.footer-info p {
    margin: 8px 0;
    color: #95a5a6;
}

.footer-tech {
    font-size: 0.8rem;
    font-style: italic;
}

/* Form Rows for better layout */
.form-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

.form-col {
    flex: 1;
}

.help-text {
    color: #6b7280;
    font-style: italic;
    margin-top: 5px;
}

.exam-settings {
    background: #fef9e7;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

.exam-settings h4 {
    color: #92400e;
    margin: 0 0 15px 0;
}

/* User Management Styles */
.user-mgmt-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.user-mgmt-tab {
    display: none;
}

.user-mgmt-tab.active {
    display: block;
}

.user-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    min-width: 200px;
}

.user-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.users-list {
    display: grid;
    gap: 1rem;
}

.user-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
}

.user-info p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background: #fed7e2;
    color: #97266d;
}

.role-teacher {
    background: #bee3f8;
    color: #2c5282;
}

.role-student {
    background: #c6f6d5;
    color: #22543d;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2d3748;
    margin: 0;
}

.stat-info .stat-label {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

.module-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.chart-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    min-height: 200px;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .user-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        min-width: auto;
        flex: 1;
    }

    .statistics-grid {
        grid-template-columns: 1fr;
    }

    .module-checkboxes {
        grid-template-columns: 1fr;
    }

    .symbol-answer-options {
        grid-template-columns: 1fr;
    }

    .presenter-answers {
        grid-template-columns: 1fr;
    }

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

    .footer-link {
        margin: 0;
    }
}

/* ===== EXAM RESULTS STYLES ===== */
.exam-results-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
}

.results-actions {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.results-table th,
.results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.results-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.results-table tr:hover {
    background: #f8fafc;
}

.grade-passed {
    color: #059669;
    font-weight: bold;
}

.grade-failed {
    color: #dc2626;
    font-weight: bold;
}

.status-passed {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== SIMPLE CHART STYLES ===== */
.simple-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-label {
    min-width: 120px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.chart-bar-container {
    flex: 1;
    position: relative;
    background: #f3f4f6;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.8s ease;
    border-radius: 12px;
}

.chart-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.activity-module {
    font-weight: 600;
    color: #3b82f6;
}

.activity-user {
    color: #374151;
}

.activity-date {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* ===== MODAL ENHANCEMENTS ===== */
.modal-large .modal-content {
    max-width: 800px;
}

/* ===== AUTHENTICATION SECTION ===== */
.auth-section {
    position: absolute;
    top: 120px;
    right: 1.5rem;
    z-index: 10000;
    min-height: 2.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    max-width: calc(100vw - 3rem);
    flex-wrap: wrap;
    padding-top: 20px;
}

#loginSection {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#userSection {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 1rem;
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
    justify-content: flex-end;
    position: relative;
    z-index: 10001;
}

.user-info {
    color: #4a5568;
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
    order: -1;
    margin-right: 0.5rem;
}

#loginSection .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 15px;
}

#userSection .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 12px;
}

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 420px;
    margin: 1rem;
    animation: slideInUp 0.4s ease-out;
}

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.modal-header h3 {
    color: #4a5568;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem 2rem 2rem 2rem;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f7fafc;
    font-size: 1rem;
    color: #4a5568;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.form-actions .btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

/* ===== EDITOR STYLES ===== */
.editor-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem;
    border-radius: 15px;
}

.editor-tabs .tab-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: #667eea;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.editor-tabs .tab-btn.active,
.editor-tabs .tab-btn:hover {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.editor-tab {
    display: none !important;
}

.editor-tab.active {
    display: block !important;
}

/* Spezifische Styles für Editor Form */
#editor .editor-tab.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

#editor .editor-tab.active .form-group {
    display: block !important;
    visibility: visible !important;
}

#editor .editor-tab.active #createAppForm {
    display: block !important;
    visibility: visible !important;
}

/* ===== EXTERNE VIDEO STYLES ===== */
.external-video-section,
.studyflix-video-section {
    background: rgba(255, 255, 255, 0.95);
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
}

.btn-video {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-size: 16px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-studyflix {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    font-size: 16px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-studyflix:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.studyflix-video-section {
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.98);
}

.content-editor {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #e2e8f0;
}

.editor-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1rem;
    display: block !important;
    visibility: visible !important;
    min-height: 400px;
}

.apps-list {
    display: grid;
    gap: 1.5rem;
}

.app-item {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.app-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.app-item h4 {
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.app-item p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.app-type {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 1rem;
}

.app-date {
    color: #999;
    font-size: 0.85rem;
}

.app-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-danger {
    background: #f56565;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.btn-danger:hover {
    background: #e53e3e;
}

/* ===== NEW MODULE STYLES ===== */
.math-problem {
    background: rgba(102, 126, 234, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    margin: 2rem 0;
    text-align: center;
}

.equation {
    font-size: 1.5rem;
    margin: 1.5rem 0;
    color: #4a5568;
}

.math-input {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.math-input label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    font-weight: 600;
}

.math-input input {
    width: 120px;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
}

.math-input input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.presentation-slider {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    overflow: hidden;
    margin: 2rem 0;
}

.slide {
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.slide h3 {
    color: #4a5568;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.slide-image {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.slide p {
    color: #666;
    font-size: 1.1rem;
    max-width: 500px;
    line-height: 1.6;
}

.sortable-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
}

.sortable-list li {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    cursor: move;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sortable-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.sortable-list li:last-child {
    margin-bottom: 0;
}

.sort-placeholder {
    background: rgba(102, 126, 234, 0.2);
    border: 2px dashed #667eea;
    color: transparent;
}

.sortable-list.correct li {
    background: linear-gradient(45deg, #48bb78, #38a169);
    animation: pulse 0.6s ease-in-out;
}

.sort-actions,
.fill-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.filltext-content {
    background: rgba(102, 126, 234, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    margin: 2rem 0;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #4a5568;
}

.fill-blank {
    border: none;
    border-bottom: 2px solid #667eea;
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-size: inherit;
    color: inherit;
    font-family: inherit;
    width: auto;
    min-width: 120px;
    text-align: center;
    transition: all 0.3s ease;
}

.fill-blank:focus {
    outline: none;
    border-bottom-color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px 4px 0 0;
}

.fill-blank.correct {
    border-bottom-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
    color: #22543d;
}

.fill-blank.incorrect {
    border-bottom-color: #f56565;
    background: rgba(245, 101, 101, 0.1);
    color: #742a2a;
}

/* ===== COURSE MANAGEMENT STYLES ===== */
.courses-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem;
    border-radius: 15px;
}

.courses-tab {
    display: none;
}

.courses-tab.active {
    display: block;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.course-card {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.course-header h4 {
    color: #4a5568;
    margin: 0;
    font-size: 1.2rem;
    flex: 1;
}

.course-subject {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.course-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.course-teacher,
.course-students,
.course-privacy {
    font-size: 0.85rem;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.progress-text {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    margin-top: 0.5rem;
    display: block;
}

.course-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 0.5rem;
}

.course-date {
    color: #999;
    font-size: 0.8rem;
}

/* ===== PUBLIC COURSE CARD STYLES ===== */
.public-course-card {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.public-course-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.public-course-card .course-header h3 {
    color: #4a5568;
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.public-course-card .course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.public-course-card .course-subject,
.public-course-card .course-date,
.public-course-card .course-teacher {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.public-course-card .course-content {
    margin-bottom: 1rem;
}

.public-course-card .course-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.public-course-card .course-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

.public-course-card .course-actions {
    display: flex;
    gap: 0.5rem;
}

.no-courses-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    border: 2px dashed rgba(102, 126, 234, 0.3);
}

.no-courses-message h3 {
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
}

/* ===== COURSE DETAIL STYLES ===== */
.course-detail-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.meta-item {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.lessons-container {
    margin: 2rem 0;
}

.lessons-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.lesson-card {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.lesson-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.lesson-card.lesson-locked {
    opacity: 0.6;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.lesson-card.lesson-available {
    border-color: #48bb78;
    cursor: pointer;
}

.lesson-card.lesson-in_progress {
    border-color: #ed8936;
}

.lesson-card.lesson-completed {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.05);
}

.lesson-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lesson-number {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.lesson-header h4 {
    color: #4a5568;
    margin: 0;
    flex: 1;
}

.lesson-status {
    font-size: 1.2rem;
}

.lesson-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.lesson-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lesson-condition,
.lesson-score {
    font-size: 0.85rem;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

/* ===== LESSON MANAGEMENT STYLES ===== */
.lesson-management {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    border-left: 4px solid #667eea;
}

.lesson-management h3 {
    color: #4a5568;
    margin-bottom: 1.5rem;
}

/* ===== ACTIVITY STYLES ===== */
.activities-sequence {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.activity-card {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.activity-card.activity-locked {
    opacity: 0.6;
    border-color: #e2e8f0;
}

.activity-card.activity-available {
    border-color: #48bb78;
}

.activity-card.activity-in_progress {
    border-color: #ed8936;
}

.activity-card.activity-completed {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.05);
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.activity-type {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-header h4 {
    color: #4a5568;
    margin: 0;
    flex: 1;
}

.activity-content {
    margin-bottom: 1rem;
}

.activity-content p {
    color: #666;
    margin-bottom: 0.5rem;
}

.required-badge {
    background: rgba(245, 101, 101, 0.1);
    color: #f56565;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.optional-badge {
    background: rgba(113, 128, 150, 0.1);
    color: #718096;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.activity-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.locked-message,
.completed-message {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.locked-message {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

.completed-message {
    color: #22543d;
    background: rgba(72, 187, 120, 0.1);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== MAIN CONTENT ===== */
.home .main-content {
    padding: 3rem 0;
    margin-top: 15px;
}

/* ===== APP GRID ===== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.app-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.app-card:hover::before {
    left: 100%;
}

.app-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.app-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.app-card h3 {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.app-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.app-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== APP CONTENT ===== */
.app-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.app-header h2 {
    color: #4a5568;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.progress-bar {
    background: rgba(102, 126, 234, 0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress {
    background: linear-gradient(45deg, #667eea, #764ba2);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.score {
    background: rgba(72, 187, 120, 0.1);
    color: #22543d;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.btn-secondary {
    background: #718096;
    box-shadow: 0 4px 15px rgba(113, 128, 150, 0.3);
}

.btn-secondary:hover {
    background: #4a5568;
}

.btn-video {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.btn-video:hover {
    background: linear-gradient(45deg, #f5576c, #f093fb);
}

.back-btn {
    background: #718096;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(113, 128, 150, 0.3);
}

.back-btn:hover {
    background: #4a5568;
}

.btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* ===== VIDEO COMPONENTS ===== */
.video-container {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 15px;
    margin: 2rem 0;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(15px);
}

.video-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    text-align: center;
    position: relative;
}

.video-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
}

.video-player {
    padding: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.video-intro {
    text-align: center;
    padding: 1.5rem;
    background: rgba(240, 147, 251, 0.1);
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid #f093fb;
}

.video-intro .btn-video {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* ===== QUIZ COMPONENTS ===== */
.question-container {
    margin: 2rem 0;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.question-number {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.question {
    background: rgba(72, 187, 120, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid #48bb78;
}

.question h3 {
    color: #22543d;
    font-size: 1.3rem;
    line-height: 1.4;
}

.answers {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.answer-btn {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.answer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.answer-btn:hover::before {
    left: 100%;
}

.answer-btn:hover {
    border-color: #667eea;
    background: #edf2f7;
    transform: translateX(5px);
}

.answer-letter {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.answer-btn.correct {
    border-color: #48bb78;
    background: #f0fff4;
    color: #22543d;
}

.answer-btn.correct .answer-letter {
    background: #48bb78;
}

.answer-btn.incorrect {
    border-color: #f56565;
    background: #fff5f5;
    color: #742a2a;
}

.answer-btn.incorrect .answer-letter {
    background: #f56565;
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* ===== QUIZ RESULT ===== */
.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.final-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.score-number {
    font-size: 3rem;
    font-weight: bold;
    color: #48bb78;
}

.score-total {
    font-size: 1.5rem;
    color: #666;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ===== DRAG & DROP COMPONENTS ===== */
.drag-drop-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.drag-section,
.drop-section {
    background: rgba(102, 126, 234, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.drag-section h3,
.drop-section h3 {
    color: #4a5568;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.2rem;
}

.drag-items,
.drop-zones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drag-item {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    cursor: move;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.drag-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.drag-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
}

.drag-item.used {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(0.95);
}

.tag-symbol {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.tag-name {
    font-weight: 500;
}

.drop-zone {
    min-height: 80px;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 1rem;
    background: #f7fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.drop-zone.active {
    border-color: #48bb78;
    background: #f0fff4;
    border-style: solid;
}

.drop-zone.locked {
    opacity: 0.5;
    background: #f1f1f1;
    border-color: #e2e8f0;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #e6f3ff;
    transform: scale(1.02);
}

.drop-zone.drop-valid {
    border-color: #28a745;
    background: #d4edda;
}

.drop-zone.drop-invalid {
    border-color: #dc3545;
    background: #f8d7da;
}

.drop-zone.filled {
    background: #d4edda;
    border-color: #28a745;
}

.drop-success {
    color: #28a745;
    font-weight: bold;
    margin-top: 10px;
}

.drag-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #edf2f7;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.drop-zone.filled {
    border-color: #48bb78;
    background: #f0fff4;
    border-style: solid;
}

.drop-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.drop-label {
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 0.3rem;
}

.drop-hint {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.drop-success {
    color: #22543d;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* ===== PROGRESS INFO ===== */
.progress-info {
    background: rgba(72, 187, 120, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 2rem 0;
    border-left: 4px solid #48bb78;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.progress-info p {
    color: #22543d;
    font-weight: 500;
    margin: 0;
}

.drag-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ===== MEMORY COMPONENTS ===== */
.memory-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.stat {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.stat-value {
    display: block;
    color: #4a5568;
    font-size: 1.5rem;
    font-weight: bold;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.memory-card {
    aspect-ratio: 1;
    background: #667eea;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    perspective: 1000px;
}

.memory-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.memory-card.flipped {
    background: #fff;
    color: #333;
    border: 2px solid #667eea;
}

.memory-card.matched {
    background: #48bb78;
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transition: transform 0.6s;
    border-radius: 10px;
}

.card-back {
    transform: rotateY(180deg);
    background: inherit;
}

.memory-card.flipped .card-front {
    transform: rotateY(180deg);
}

.memory-card.flipped .card-back {
    transform: rotateY(0deg);
}

.memory-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .auth-section {
        position: static;
        text-align: center;
        margin-top: 1rem;
    }

    #loginSection,
    #userSection {
        justify-content: center;
    }

    #userSection {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .modal-content {
        margin: 0.5rem;
        max-width: none;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        flex: none;
    }

    .editor-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }

    .management-tabs .tab-btn,
    .editor-tabs .tab-btn,
    .group-details-tabs .tab-btn {
        padding: 0.75rem 1rem;
    }

    .math-input {
        flex-direction: column;
        gap: 1rem;
    }

    .math-input label {
        flex-direction: column;
        gap: 0.5rem;
    }

    .math-input input {
        width: 200px;
    }

    .slide {
        padding: 2rem 1rem;
    }

    .slide h3 {
        font-size: 1.5rem;
    }

    .filltext-content {
        padding: 1.5rem;
        font-size: 1rem;
    }

    .fill-blank {
        min-width: 100px;
        display: block;
        margin: 0.25rem 0;
    }

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

    .app-card {
        padding: 2rem;
    }

    .app-content {
        padding: 2rem;
        margin-top: 1rem;
    }

    .drag-drop-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .memory-stats {
        gap: 1rem;
    }

    .question-header {
        flex-direction: column;
        align-items: stretch;
    }

    .video-trigger {
        margin-top: 1rem;
    }

    .result-actions,
    .drag-actions,
    .memory-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .main-content {
        padding: 2rem 0;
    }

    .app-card {
        padding: 1.5rem;
    }

    .app-content {
        padding: 1.5rem;
    }

    .memory-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .memory-card {
        font-size: 1.2rem;
    }

    .drag-section,
    .drop-section {
        padding: 1.5rem;
    }

    .question {
        padding: 1rem;
    }

    .answer-btn {
        padding: 1rem;
    }

    .answer-letter {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.app-card {
    animation: slideInUp 0.6s ease-out;
}

.memory-card.matched {
    animation: pulse 0.6s ease-in-out;
}

.drag-item {
    animation: slideInUp 0.4s ease-out;
}

.message-toast {
    animation: slideInRight 0.3s ease-out;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 1rem;
}

.p-2 {
    padding: 2rem;
}

/* ===== PRINT STYLES ===== */
@media print {

    .btn,
    .video-container,
    .video-intro {
        display: none;
    }

    .app-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
        color: black;
    }

    .header {
        background: white;
        box-shadow: none;
        border-bottom: 2px solid #ddd;
    }
}

/* ===== QUIZ URL DISPLAY STYLES ===== */
.quiz-url-info {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.9rem;
}

.quiz-url-label {
    font-weight: 600;
    color: #6366f1;
    margin-right: 8px;
}

.quiz-url-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #4f46e5;
    font-size: 0.85rem;
    word-break: break-all;
}

.quiz-url-value:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.quiz-url-value:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
}

/* ===== KATEGORIE-AUTOCOMPLETE STYLES ===== */
.category-input-container {
    position: relative;
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.category-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.category-option:hover {
    background-color: #f8fafc;
}

.category-option:last-child {
    border-bottom: none;
}

.category-option:active {
    background-color: #e2e8f0;
}

/* ===== QUIZ VISIBILITY STYLES ===== */
.app-visibility {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 8px;
}

.visibility-public {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.visibility-private {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.visibility-groups {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.form-text {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

/* ===== GROUP MANAGEMENT STYLES ===== */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.group-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.group-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.group-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.2rem;
    flex: 1;
}

.group-actions {
    display: flex;
    gap: 8px;
}

.group-description {
    color: #64748b;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.group-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.meta-item {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.group-footer {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.members-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.member-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.member-card:last-child {
    border-bottom: none;
}

.member-info {
    flex: 1;
}

.member-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.member-role {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.member-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: #64748b;
}

.member-actions {
    display: flex;
    gap: 8px;
}

.students-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.student-card {
    border-bottom: 1px solid #e2e8f0;
}

.student-card:last-child {
    border-bottom: none;
}

.student-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.student-checkbox:hover {
    background: #f1f5f9;
}

.student-checkbox input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.student-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.student-info strong {
    color: #1e293b;
}

.student-info span {
    font-size: 0.85rem;
    color: #64748b;
}

.modal.large .modal-content {
    max-width: 800px;
    width: 90%;
}

.members-section {
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-state p {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .groups-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .group-footer {
        flex-direction: column;
    }

    .member-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .member-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== GROUP SELECTION STYLES ===== */
.groups-selection {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
}

.group-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.group-checkbox:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.group-checkbox input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.group-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.group-info strong {
    color: #1e293b;
    font-size: 0.9rem;
}

.group-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.text-muted {
    color: #64748b;
    font-style: italic;
}

/* ===== IMAGE PAIRS PREVIEW ===== */
.imagepairs-preview {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(260px, 1fr);
    gap: 24px;
    margin-top: 24px;
    align-items: stretch;
}

.imagepairs-preview-image {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(14, 165, 233, 0.08) 100%);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.imagepairs-preview-canvas {
    position: relative;
    width: 100%;
    padding-top: 66%;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.imagepairs-preview-marker {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1d4ed8;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 22px rgba(29, 78, 216, 0.35);
}

.imagepairs-preview-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    color: #0f172a;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.45);
    transform: rotate(-3deg);
}

.imagepairs-preview-card:nth-of-type(2n) {
    transform: rotate(2deg);
}

.imagepairs-preview-info {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.imagepairs-preview-info h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #0f172a;
}

.imagepairs-preview-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.imagepairs-preview-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f2937;
    font-weight: 500;
}

.imagepairs-preview-info li::before {
    content: '✅';
    font-size: 1.1rem;
    color: #1d4ed8;
}

.imagepairs-preview-hint {
    font-size: 0.9rem;
    color: #475569;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 12px;
    margin-top: 4px;
}

@media (max-width: 960px) {
    .imagepairs-preview {
        grid-template-columns: 1fr;
    }

    .imagepairs-preview-image {
        padding: 20px;
    }
}

/* ===== IMAGE PAIRS PLAYER ===== */
.imagepairs-player {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 28px;
    align-items: stretch;
}

.imagepairs-stage {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

.imagepairs-image-wrapper {
    position: relative;
    width: 100%;
    max-height: 620px;
    border-radius: 14px;
    overflow: hidden;
    background: #e2e8f0;
}

.imagepairs-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.imagepairs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.imagepairs-drop-zone {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid rgba(59, 130, 246, 0.85);
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.imagepairs-drop-zone .imagepairs-drop-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1d4ed8;
    font-weight: 700;
}

.imagepairs-drop-zone.drag-over {
    background: #1d4ed8;
    color: white;
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 18px 32px rgba(29, 78, 216, 0.32);
}

.imagepairs-drop-zone.error {
    border-color: #ef4444;
    animation: imagepairsShake 0.35s linear;
}

@keyframes imagepairsShake {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    25% { transform: translate(-50%, -50%) translateX(-6px); }
    50% { transform: translate(-50%, -50%) translateX(6px); }
    75% { transform: translate(-50%, -50%) translateX(-3px); }
}

.imagepairs-drop-zone.solved {
    min-width: 180px;
    height: auto;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.95);
    border-color: transparent;
    color: white;
    box-shadow: 0 18px 38px rgba(59, 130, 246, 0.35);
}

.imagepairs-drop-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.imagepairs-drop-zone.solved .imagepairs-drop-index {
    background: rgba(255, 255, 255, 0.9);
    color: #1d4ed8;
}

.imagepairs-drop-text {
    font-weight: 600;
    font-size: 15px;
    color: inherit;
}

.imagepairs-drop-zone.solved .imagepairs-audio-btn {
    background: rgba(255, 255, 255, 0.18);
    color: white;
}

.imagepairs-drop-zone.solved .imagepairs-audio-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.imagepairs-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.imagepairs-sidebar h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #0f172a;
}

.imagepairs-instruction {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.imagepairs-term-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.imagepairs-term {
    background: white;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.imagepairs-term:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.16);
}

.imagepairs-term.dragging {
    opacity: 0.6;
    transform: scale(0.97);
    box-shadow: none;
}

.imagepairs-term-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.imagepairs-term-label {
    font-weight: 600;
    color: #1f2937;
}

.imagepairs-audio-btn {
    background: #e0f2fe;
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #0369a1;
    transition: background 0.2s ease;
}

.imagepairs-audio-btn:hover {
    background: #bae6fd;
}

.imagepairs-status {
    font-weight: 600;
    color: #1d4ed8;
    margin-top: 14px;
}

.imagepairs-description {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    color: #0f172a;
    font-size: 0.95rem;
}

.imagepairs-sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.imagepairs-empty {
    position: absolute;
    inset: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    color: #475569;
    padding: 24px;
    box-shadow: inset 0 0 0 2px rgba(148, 163, 184, 0.2);
}

@media (max-width: 1024px) {
    .imagepairs-player {
        grid-template-columns: 1fr;
    }

    .imagepairs-sidebar {
        order: -1;
    }

    .imagepairs-stage {
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .imagepairs-term-list {
        max-height: none;
    }

    .imagepairs-stage {
        padding: 16px;
    }
}

/* ===== PUBLIC QUIZZES STYLES ===== */
.public-quizzes-section {
    background: #f8fafc;
    padding: 40px 0;
    margin-top: 40px;
}

.public-quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.public-quiz-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.public-quiz-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.quiz-header h3 {
    margin: 0 0 10px 0;
    color: #1e293b;
    font-size: 1.2rem;
}

.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.quiz-meta span {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.quiz-content {
    margin-bottom: 15px;
}

.quiz-description {
    color: #64748b;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.quiz-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.quiz-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.category-filter {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.category-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.category-filter select {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
}

/* ===== EDITOR KATEGORIE DROPDOWN ===== */
.category-input-container {
    position: relative;
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.category-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.category-option:hover {
    background-color: #f8fafc;
}

.category-option:last-child {
    border-bottom: none;
}

.no-quizzes-message {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.no-quizzes-message h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.no-quizzes-message p {
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .public-quizzes-grid {
        grid-template-columns: 1fr;
    }

    .quiz-actions {
        flex-direction: column;
    }

    .quiz-meta {
        flex-direction: column;
        gap: 5px;
    }
}