// styles.css

* {
    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, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

nav {
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-btn {
    background: #f0f0f0;
    border: 2px solid #ddd;
    padding: 0.7rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #e0e0e0;
    border-color: #667eea;
}

.nav-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

h3 {
    color: #764ba2;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

.mnemonic {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 5px;
    font-weight: 500;
    line-height: 1.8;
}

.example-box {
    background: #f8f9fa;
    border-left: 5px solid #28a745;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
}

.dativ {
    background: #d4edda;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-weight: bold;
    color: #155724;
}

.akkusativ {
    background: #ffe5cc;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-weight: bold;
    color: #cc5200;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

th {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

tr:hover {
    background: #f0f0f0;
}

/* Section Exercices */
.score-board {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.score-board h3 {
    color: white;
    margin-top: 0;
    font-size: 1.2rem;
}

.score-number {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0;
}

.score-board p {
    margin-bottom: 0;
    opacity: 0.95;
}

.exercise {
    background: #f9f9f9;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid #667eea;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.exercise-number {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.exercise-text {
    margin: 0.8rem 0;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
    padding: 0.8rem;
}

.exercise-text.de {
    border-left: 3px solid #667eea;
    font-style: italic;
    color: #667eea;
}

.exercise-text.fr {
    border-left: 3px solid #764ba2;
    color: #555;
}

.exercise-input {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

select, input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

select:focus, input[type="text"]:focus {
    outline: none;
    border: 2px solid #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
    font-weight: 500;
}

.feedback.show {
    display: block;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #f5222d;
}

.feedback.explanation {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-btn {
        width: 100%;
        text-align: center;
    }

    section {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .exercise-input {
        flex-direction: column;
    }

    select, input[type="text"], .btn {
        width: 100%;
    }

    table {
        font-size: 0.9rem;
    }

    td, th {
        padding: 0.6rem;
    }
}