:root {
            --nom: #3b82f6;
            --acc: #ef4444;
            --dat: #10b981;
            --gen: #8b5cf6;
            --masc: #06b6d4;
            --fem: #ec4899;
            --neut: #f59e0b;
            --bg: #f8fafc;
            --card: #ffffff;
            --text: #1e293b;
            --text-light: #64748b;
            --border: #e2e8f0;
            --success: #22c55e;
            --error: #ef4444;
            --warning: #f59e0b;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            padding-bottom: 2rem;
        }
        
        /* Header */
        .chapter-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 2rem 1rem;
            text-align: center;
        }
        
        .chapter-badge {
            display: inline-block;
            background: rgba(255,255,255,0.2);
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }
        
        .chapter-header h1 {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }
        
        .chapter-header p {
            opacity: 0.9;
            max-width: 600px;
            margin: 0 auto;
        }
        
        /* Navigation */
        .chapter-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            background: var(--card);
            border-bottom: 1px solid var(--border);
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .chapter-nav a {
            color: var(--nom);
            text-decoration: none;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            transition: background 0.2s;
        }
        
        .chapter-nav a:hover {
            background: #eff6ff;
        }
        
        .progress-bar {
            font-size: 0.9rem;
            color: var(--text-light);
        }
        
        /* Streak Counter */
        .streak-counter {
            position: fixed;
            top: 20px;
            right: 20px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
            padding: 0.75rem 1rem;
            border-radius: 12px;
            font-weight: bold;
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .streak-counter::before {
            content: "🔥";
        }
        
        /* Main Container */
        .container {
            max-width: 900px;
            margin: 0 auto;
            padding: 1rem;
        }
        
        /* Section Cards */
        .section-card {
            background: var(--card);
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .section-card h2 {
            color: var(--text);
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--border);
        }
        
        .section-card h3 {
            color: var(--text);
            margin: 1.5rem 0 0.75rem;
        }
        
        /* Theory Cards */
        .theory-card {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border-left: 4px solid var(--nom);
            padding: 1rem 1.25rem;
            border-radius: 8px;
            margin: 1rem 0;
        }
        
        .theory-card.dat {
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
            border-left-color: var(--dat);
        }
        
        .theory-card.acc {
            background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
            border-left-color: var(--acc);
        }
        
        /* Example Box */
        .example-box {
            background: #f8fafc;
            border-radius: 8px;
            padding: 1rem;
            margin: 0.75rem 0;
        }
        
        .example-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 0;
            border-bottom: 1px dashed var(--border);
        }
        
        .example-item:last-child {
            border-bottom: none;
        }
        
        .german-text {
            font-weight: 600;
            color: var(--text);
        }
        
        .english-text {
            color: var(--text-light);
            font-style: italic;
        }
        
        /* Audio Button */
        .audio-btn {
            background: var(--nom);
            color: white;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s, background 0.2s;
            font-size: 0.9rem;
        }
        
        .audio-btn:hover {
            transform: scale(1.1);
            background: #2563eb;
        }
        
        .audio-btn.playing {
            animation: pulse 1s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        
        /* Tables */
        .pronoun-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            font-size: 0.95rem;
        }
        
        .pronoun-table th,
        .pronoun-table td {
            padding: 0.75rem;
            text-align: left;
            border: 1px solid var(--border);
        }
        
        .pronoun-table th {
            background: #f1f5f9;
            font-weight: 600;
        }
        
        .pronoun-table tr:nth-child(even) {
            background: #f8fafc;
        }
        
        .acc-case { color: var(--acc); font-weight: 600; }
        .dat-case { color: var(--dat); font-weight: 600; }
        
        /* Verb List */
        .verb-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 0.75rem;
            margin: 1rem 0;
        }
        
        .verb-item {
            background: #f8fafc;
            border-radius: 8px;
            padding: 0.75rem 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            border: 1px solid var(--border);
        }
        
        .verb-german {
            font-weight: 600;
            color: var(--nom);
        }
        
        /* Exercise Styles */
        .exercise-container {
            background: var(--card);
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .exercise-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .exercise-title {
            font-size: 1.25rem;
            color: var(--text);
        }
        
        .exercise-score {
            background: #f1f5f9;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 600;
        }
        
        /* Exercise 17.1 - Tick verbs */
        .tick-exercise {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 1rem;
            margin: 1rem 0;
        }
        
        .tick-item {
            background: #f8fafc;
            border: 2px solid var(--border);
            border-radius: 12px;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .tick-item:hover {
            border-color: var(--nom);
            background: #f0f9ff;
        }
        
        .tick-item.selected {
            border-color: var(--nom);
            background: #eff6ff;
        }
        
        .tick-item.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }
        
        .tick-item.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }
        
        .tick-box {
            width: 24px;
            height: 24px;
            border: 2px solid var(--border);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        
        .tick-item.selected .tick-box {
            background: var(--nom);
            border-color: var(--nom);
            color: white;
        }
        
        .tick-item.correct .tick-box {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }
        
        .tick-item.incorrect .tick-box {
            background: var(--error);
            border-color: var(--error);
            color: white;
        }
        
        /* Exercise 17.2 - Complete sentences */
        .sentence-builder {
            margin: 1rem 0;
        }
        
        .sentence-item {
            background: #f8fafc;
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
            border: 1px solid var(--border);
        }
        
        .sentence-prompt {
            font-family: monospace;
            background: #e2e8f0;
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            margin-bottom: 0.75rem;
            font-size: 0.95rem;
        }
        
        .sentence-input-row {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            align-items: center;
        }
        
        .sentence-input {
            flex: 1;
            min-width: 250px;
            padding: 0.75rem 1rem;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
            transition: border-color 0.2s;
        }
        
        .sentence-input:focus {
            outline: none;
            border-color: var(--nom);
        }
        
        .sentence-input.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }
        
        .sentence-input.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }
        
        .feedback-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
        }
        
        .feedback-icon.correct {
            background: var(--success);
            color: white;
        }
        
        .feedback-icon.incorrect {
            background: var(--error);
            color: white;
        }
        
        .answer-reveal {
            margin-top: 0.5rem;
            padding: 0.5rem;
            background: #fef3c7;
            border-radius: 6px;
            font-size: 0.9rem;
            display: none;
        }
        
        .answer-reveal.show {
            display: block;
        }
        
        /* Exercise 17.3 - Dative pronouns */
        .dative-exercise {
            margin: 1rem 0;
        }
        
        .dative-item {
            background: #f8fafc;
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
            border: 1px solid var(--border);
        }
        
        .dative-original {
            margin-bottom: 0.75rem;
            padding: 0.5rem;
            background: #ecfdf5;
            border-radius: 6px;
            border-left: 3px solid var(--dat);
        }
        
        .dative-input-row {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            align-items: center;
        }
        
        .dative-input {
            flex: 1;
            min-width: 300px;
            padding: 0.75rem 1rem;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
        }
        
        .dative-input:focus {
            outline: none;
            border-color: var(--dat);
        }
        
        .dative-input.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }
        
        .dative-input.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }
        
        /* Exercise 17.4 - Translations */
        .translation-exercise {
            margin: 1rem 0;
        }
        
        .translation-item {
            background: #f8fafc;
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
            border: 1px solid var(--border);
        }
        
        .translation-prompt {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--text);
        }
        
        .translation-input-row {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            align-items: center;
        }
        
        .translation-input {
            flex: 1;
            min-width: 280px;
            padding: 0.75rem 1rem;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
        }
        
        .translation-input:focus {
            outline: none;
            border-color: var(--nom);
        }
        
        .translation-input.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }
        
        .translation-input.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }
        
        /* Buttons */
        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 600;
        }
        
        .btn-primary {
            background: var(--nom);
            color: white;
        }
        
        .btn-primary:hover {
            background: #2563eb;
        }
        
        .btn-success {
            background: var(--success);
            color: white;
        }
        
        .btn-success:hover {
            background: #16a34a;
        }
        
        .btn-secondary {
            background: #f1f5f9;
            color: var(--text);
        }
        
        .btn-secondary:hover {
            background: #e2e8f0;
        }
        
        .btn-row {
            display: flex;
            gap: 0.75rem;
            margin-top: 1rem;
            flex-wrap: wrap;
        }
        
        /* Checklist */
        .checklist {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-radius: 12px;
            padding: 1.5rem;
        }
        
        .checklist h3 {
            margin-bottom: 1rem;
            color: #92400e;
        }
        
        .checklist-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.75rem 0;
            border-bottom: 1px dashed #d4d4d8;
        }
        
        .checklist-item:last-child {
            border-bottom: none;
        }
        
        .checklist-checkbox {
            width: 20px;
            height: 20px;
            margin-top: 2px;
            cursor: pointer;
        }
        
        .checklist-text {
            flex: 1;
        }
        
        .checklist-answer {
            display: none;
            margin-top: 0.5rem;
            padding: 0.5rem;
            background: white;
            border-radius: 6px;
            font-size: 0.9rem;
        }
        
        .checklist-answer.show {
            display: block;
        }
        
        /* Connectivity Section */
        .connectivity {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-top: 2rem;
        }
        
        .from-prev, .to-next {
            background: var(--card);
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .from-prev {
            border-left: 4px solid var(--nom);
        }
        
        .to-next {
            border-left: 4px solid var(--dat);
        }
        
        .connectivity h4 {
            margin-bottom: 0.5rem;
            color: var(--text);
        }
        
        .connectivity p {
            color: var(--text-light);
            font-size: 0.95rem;
        }
        
        /* Progress indicator */
        .progress-indicator {
            position: fixed;
            top: 0;
            left: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--nom), var(--dat));
            transition: width 0.3s;
            z-index: 1001;
        }
        
        /* Separable verb highlight */
        .prefix-highlight {
            color: var(--warning);
            font-weight: 600;
        }
        
        .verb-root {
            color: var(--nom);
            font-weight: 600;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .chapter-header h1 {
                font-size: 1.5rem;
            }
            
            .chapter-nav {
                flex-direction: column;
                text-align: center;
            }
            
            .streak-counter {
                position: relative;
                top: auto;
                right: auto;
                margin: 1rem;
                justify-content: center;
            }
            
            .connectivity {
                grid-template-columns: 1fr;
            }
            
            .tick-exercise {
                grid-template-columns: 1fr;
            }
            
            .verb-list {
                grid-template-columns: 1fr;
            }
            
            .pronoun-table {
                font-size: 0.85rem;
            }
            
            .pronoun-table th,
            .pronoun-table td {
                padding: 0.5rem;
            }
        }
        
        /* Success animation */
        @keyframes successPop {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        
        .success-animation {
            animation: successPop 0.3s ease;
        }
