/* KI Kurs Online Plugin Styles - Schülerfreundliches Design */

:root {
    --primary-color: #1c2045;
    --secondary-color: #fc8703;
    --primary-gradient: linear-gradient(135deg, #1c2045 0%, #2a3565 100%);
    --secondary-gradient: linear-gradient(135deg, #fc8703 0%, #ff9f33 100%);
    --success-gradient: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    --warning-gradient: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
    --dark-gradient: linear-gradient(135deg, #1c2045 0%, #2a3565 100%);
    --card-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --hover-shadow: 0 8px 25px rgba(0,0,0,0.15);
    --text-dark: #1c2045;
    --text-light: #6c757d;
    --border-radius: 8px;
}

.ki-kurs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
}

.ki-kurs-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 30px;
    background: var(--primary-color);
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    color: white;
}

.ki-kurs-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.ki-kurs-subtitle {
    font-size: 1.2em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    font-weight: 400;
}

.ki-kurs-progress-overview {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.progress-bar {
    background: rgba(255,255,255,0.3);
    height: 12px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    background: var(--success-gradient);
    height: 100%;
    border-radius: 20px;
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Module Grid */
.ki-kurs-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    margin-top: 50px;
    perspective: 1000px;
}

.ki-kurs-module-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
    position: relative;
}

.ki-kurs-module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-gradient);
    transition: height 0.3s ease;
}

.ki-kurs-module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-left-color: var(--primary-color);
}

.ki-kurs-module-card:hover::before {
    height: 12px;
}

.ki-kurs-module-card:nth-child(even) {
    animation: float 6s ease-in-out infinite;
}

.ki-kurs-module-card:nth-child(odd) {
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.module-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.module-number {
    background: var(--secondary-gradient);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-right: 20px;
    font-size: 1.4em;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border: 3px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.module-number::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.module-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.5em;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.module-description {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 1.05em;
    font-weight: 500;
}

.module-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 1em;
    padding: 15px;
    background: rgba(255,255,255,0.4);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.duration {
    color: var(--text-dark);
    display: flex;
    align-items: center;
    font-weight: 600;
    padding: 8px 12px;
    background: var(--warning-gradient);
    border-radius: 20px;
    font-size: 0.9em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.duration .icon-clock::before {
    content: "⏱️";
    margin-right: 8px;
    font-size: 1.2em;
}

.progress-indicator {
    color: white;
    font-weight: 700;
    padding: 8px 15px;
    background: var(--success-gradient);
    border-radius: 20px;
    font-size: 0.9em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.start-module-btn {
    background: var(--secondary-gradient);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.start-module-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.start-module-btn:hover {
    background: var(--primary-gradient);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

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

.start-module-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Modal Styles - Futuristisch */
.ki-kurs-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.95) 100%);
    backdrop-filter: blur(10px);
    animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
    z-index: 999999;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    z-index: 1001;
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999999;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.close-modal:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 20px rgba(0,0,0,0.25);
}

.close-modal::before {
    content: '✕';
}

/* Module Content Styles */
.ki-kurs-module-content {
    padding: 30px;
    max-height: calc(85vh - 60px);
    overflow-y: auto;
    position: relative;
    z-index: 999999;
}

/* Sicherstellung dass Modal über alles liegt */
.ki-kurs-modal * {
    position: relative;
    z-index: 999999;
}

.ki-kurs-module-content .module-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.ki-kurs-module-content .module-header h2 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 2em;
}

.module-objectives {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.module-objectives h3 {
    color: #667eea;
    margin-top: 0;
}

.module-main-content {
    line-height: 1.7;
    margin-bottom: 30px;
}

.module-main-content h3 {
    color: #333;
    margin-top: 30px;
    font-size: 1.4em;
}

.module-main-content h4 {
    color: #555;
    margin-top: 25px;
}

.module-main-content ul, 
.module-main-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.module-main-content li {
    margin-bottom: 8px;
}

.module-activities {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #4CAF50;
}

.module-activities h3 {
    color: #4CAF50;
    margin-top: 0;
}

.module-actions {
    border-top: 2px solid #f0f0f0;
    padding-top: 30px;
    text-align: center;
}

.complete-module-btn {
    background: #4CAF50;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.complete-module-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.module-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.prev-module-btn,
.next-module-btn {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
}

.prev-module-btn:hover,
.next-module-btn:hover {
    background: #5a67d8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ki-kurs-modules-grid {
        grid-template-columns: 1fr;
    }
    
    .ki-kurs-header h1 {
        font-size: 2em;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .ki-kurs-module-content {
        padding: 20px;
    }
    
    .module-navigation {
        flex-direction: column;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Completion States */
.completed {
    background: #e8f5e8 !important;
}

.completed .module-number {
    background: #4CAF50 !important;
}

.completed .start-module-btn {
    background: #4CAF50;
}

.completed .start-module-btn:hover {
    background: #45a049;
}

/* Admin Styles */
.ki-kurs-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

/* Ausblenden der Aktivitäten-Sektion für Schüler */
.module-activities {
    display: none !important;
}