/* Reset und Grundstile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    text-align: center;
    color: white;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
.main {
    padding: 2rem 0;
    flex: 1;
}

/* Loading State */
.loading {
    text-align: center;
    color: white;
    padding: 3rem 0;
}

.loading-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 1.5s ease-in-out infinite;
}

.loading p {
    font-size: 1.2rem;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    color: white;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-item i {
    font-size: 1.3rem;
}

/* Categories - Accordion Style */
.categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Category Accordion Cards */
.category-accordion {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.category-accordion:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.category-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.category-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.category-header.active {
    background-color: rgba(103, 126, 234, 0.05);
    border-bottom: 1px solid rgba(103, 126, 234, 0.1);
}

.category-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.category-info h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.category-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.category-count {
    color: #666;
    font-size: 0.9rem;
}

.category-toggle {
    padding: 0.5rem;
    color: #667eea;
    transition: transform 0.3s ease, color 0.3s ease;
}

.category-toggle:hover {
    color: #764ba2;
}

.category-header.active .category-toggle {
    transform: rotate(180deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.category-content.expanded {
    max-height: 2000px;
    padding: 0 1.5rem 1.5rem;
}

/* Quiz Grid */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Quiz Cards */
.quiz-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.quiz-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.quiz-banner {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.quiz-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quiz-content {
    padding: 1rem;
}

.quiz-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.quiz-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.quiz-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.quiz-version {
    background: #e7f3ff;
    color: #0066cc;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Error State */
.error {
    text-align: center;
    color: white;
    padding: 3rem 0;
}

.error i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.error h2 {
    margin-bottom: 1rem;
}

.retry-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #ff5252;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .categories {
        grid-template-columns: 1fr;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
    }
    
    .quiz-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main {
        padding: 1rem 0;
    }
    
    .category {
        padding: 1rem;
    }
}

/* Animationen */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-overview {
    animation: fadeIn 0.5s ease-out;
}

.category-accordion {
    animation: fadeIn 0.5s ease-out;
}

.quiz-card {
    animation: fadeIn 0.3s ease-out;
}

/* Mobile Optimizations für Akkordeon */
@media (max-width: 768px) {
    .category-header {
        padding: 1rem;
    }
    
    .category-main {
        gap: 0.75rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .category-info h2 {
        font-size: 1.3rem;
    }
    
    .category-description {
        font-size: 0.9rem;
    }
    
    .category-content.expanded {
        padding: 0 1rem 1rem;
    }
    
    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}