/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 2rem;
    color: #6366f1;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: #4f46e5;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #f0f0f0, #e8e8e8);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Main content */
.main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.main > h1 {
    padding: 0 2rem;
}

.main > p {
    padding: 0 2rem;
}

.main > .chapters-grid {
    padding: 0;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #4f46e5;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #6366f1;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4f46e5;
}

/* Feature cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    border-radius: 20px;
    color: white;
}

.big-button {
    display: inline-block;
    background: white;
    color: #4f46e5;
    padding: 1rem 2rem;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.big-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #f8fafc;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    color: #6366f1;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .main > h1 {
        padding: 0 1rem;
    }
    
    .main > p {
        padding: 0 1rem;
    }
    
    .chapters-grid {
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .chapter-card {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

/* Exercise-specific styles */
.chapters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.chapter-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chapter-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    color: white;
}

.chapter-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.chapter-card.coming-soon:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chapter-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.chapter-card h3 {
    color: white;
    margin: 2rem 0 1rem 0;
    font-size: 1.3rem;
}

.chapter-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.difficulty {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    display: inline-block;
}

.chapter-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
}

/* Exercise container styles */
.exercise-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.exercise-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    border-radius: 20px;
}

.exercise-header h1 {
    color: white;
    margin-bottom: 1rem;
}

.exercise-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.exercise-section {
    background: white;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.exercise-section h2 {
    color: #4f46e5;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.instruction {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #0ea5e9;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Interactive elements */
button {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.3rem;
    font-family: inherit;
}

button:hover {
    background: #3730a3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

button.correct {
    background: #16a34a !important;
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.5);
}

button.wrong {
    background: #dc2626 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Feedback styles */
.feedback, [class*="feedback"] {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.correct, [class*="feedback"].correct {
    background: #dcfce7;
    color: #16a34a;
    border: 2px solid #16a34a;
}

.feedback.wrong, [class*="feedback"].wrong {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #dc2626;
}

/* Specific exercise styles */
.matching-exercise {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.numbers-column, .words-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.number-card, .word-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 1.1rem;
}

.number-card:hover, .word-card:hover {
    border-color: #4f46e5;
    background: #f0f9ff;
    transform: translateY(-2px);
}

.number-card.selected {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.number-card.correct, .word-card.correct {
    background: #16a34a !important;
    color: white;
    border-color: #16a34a;
}

/* Quiz styles */
.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.question {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid #e5e7eb;
}

.question p {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

.options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Progress indicator */
.progress-indicator {
    margin-top: 3rem;
    text-align: center;
}

.progress-text {
    margin-bottom: 1rem;
    font-weight: bold;
    color: #4f46e5;
}

.progress-bar {
    background: #e5e7eb;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Navigation */
.exercise-navigation {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    gap: 1rem;
}

.nav-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: white;
}

.back-btn {
    background: linear-gradient(45deg, #94a3b8, #64748b);
}

/* Grid layouts for various exercises */
.animal-counting, .plural-choice, .command-matching,
.location-questions, .true-false-section, .is-are-completion {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.count-question, .choice-question, .command-item,
.location-item, .tf-question, .completion-item {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    text-align: center;
}

.count-options, .choice-options, .command-options,
.location-options, .tf-options, .completion-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Special elements */
.animal-display {
    font-size: 2rem;
    margin: 1rem 0;
}

.image-placeholder {
    font-size: 3rem;
    margin: 1rem 0;
}

.scene-description, .picture-desc {
    font-size: 2rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 10px;
}

.german-hint {
    font-style: italic;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Responsive design for exercises */
@media (max-width: 768px) {
    .exercise-container {
        padding: 1rem;
    }
    
    .matching-exercise {
        grid-template-columns: 1fr;
    }
    
    .exercise-navigation {
        flex-direction: column;
        text-align: center;
    }
    
    .options, .count-options, .choice-options {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Modal Styles */
.modal {
    display: none !important;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 2rem;
    border: none;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    color: white;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-btn {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-content h2 {
    margin: 0.5rem 0;
    font-size: 2rem;
}

.modal-content p {
    margin: 1rem 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

.modal-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.modal-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

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

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