/* ===== CSS VARIABLES ===== */
        :root {
            /* Case Colors */
            --nom: #3b82f6;
            --acc: #ef4444;
            --dat: #10b981;
            --gen: #8b5cf6;
            
            /* Gender Colors */
            --masc: #06b6d4;
            --fem: #ec4899;
            --neut: #f59e0b;
            --plural: #6366f1;
            
            /* UI Colors */
            --bg-primary: #f8fafc;
            --bg-card: #ffffff;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --border: #e2e8f0;
            --success: #22c55e;
            --error: #ef4444;
            --warning: #f59e0b;
            
            /* Shadows */
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
            
            /* Spacing */
            --space-xs: 0.25rem;
            --space-sm: 0.5rem;
            --space-md: 1rem;
            --space-lg: 1.5rem;
            --space-xl: 2rem;
            --space-2xl: 3rem;
            
            /* Border Radius */
            --radius-sm: 0.375rem;
            --radius: 0.5rem;
            --radius-lg: 0.75rem;
            --radius-xl: 1rem;
        }
        
        /* ===== RESET & BASE ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            min-height: 100vh;
        }
        
        /* ===== HEADER ===== */
        .main-header {
            background: linear-gradient(135deg, var(--dat) 0%, #059669 100%);
            color: white;
            padding: var(--space-lg) var(--space-xl);
            box-shadow: var(--shadow-lg);
        }
        
        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: var(--space-md);
        }
        
        .chapter-badge {
            background: rgba(255,255,255,0.2);
            padding: var(--space-xs) var(--space-md);
            border-radius: var(--radius-lg);
            font-size: 0.875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .streak-counter {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            background: rgba(255,255,255,0.15);
            padding: var(--space-sm) var(--space-md);
            border-radius: var(--radius-lg);
        }
        
        .streak-counter .flame {
            font-size: 1.25rem;
        }
        
        /* ===== NAVIGATION ===== */
        .chapter-nav {
            background: white;
            padding: var(--space-md) var(--space-xl);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .nav-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: var(--space-md);
        }
        
        .chapter-nav a {
            color: var(--dat);
            text-decoration: none;
            font-weight: 500;
            padding: var(--space-sm) var(--space-md);
            border-radius: var(--radius);
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }
        
        .chapter-nav a:hover {
            background: rgba(16, 185, 129, 0.1);
        }
        
        .chapter-nav .prev::before {
            content: "←";
        }
        
        .chapter-nav .next::after {
            content: "→";
        }
        
        .progress-bar {
            background: var(--border);
            height: 8px;
            width: 200px;
            border-radius: var(--radius-lg);
            overflow: hidden;
        }
        
        .progress-fill {
            background: var(--dat);
            height: 100%;
            width: 46%;
            border-radius: var(--radius-lg);
            transition: width 0.3s ease;
        }
        
        .progress-text {
            font-size: 0.75rem;
            color: var(--text-secondary);
            text-align: center;
            margin-top: var(--space-xs);
        }
        
        /* ===== MAIN CONTENT ===== */
        .container {
            max-width: 900px;
            margin: 0 auto;
            padding: var(--space-xl);
        }
        
        h1 {
            font-size: 2.5rem;
            margin-bottom: var(--space-lg);
            color: var(--dat);
        }
        
        h2 {
            font-size: 1.75rem;
            margin: var(--space-2xl) 0 var(--space-lg);
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: var(--space-md);
        }
        
        h2::before {
            content: "";
            width: 4px;
            height: 1.5rem;
            background: var(--dat);
            border-radius: var(--radius-sm);
        }
        
        h3 {
            font-size: 1.25rem;
            margin: var(--space-xl) 0 var(--space-md);
            color: var(--text-primary);
        }
        
        h4 {
            font-size: 1rem;
            margin: var(--space-lg) 0 var(--space-sm);
            color: var(--text-secondary);
        }
        
        p {
            margin-bottom: var(--space-md);
        }
        
        /* ===== THEORY CARDS ===== */
        .theory-card {
            background: white;
            border-radius: var(--radius-lg);
            padding: var(--space-xl);
            margin: var(--space-lg) 0;
            box-shadow: var(--shadow);
            border-left: 4px solid var(--dat);
        }
        
        .theory-card.highlight {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, white 100%);
            border: 2px solid var(--dat);
            border-left: 4px solid var(--dat);
        }
        
        .theory-card .card-header {
            display: flex;
            align-items: center;
            gap: var(--space-md);
            margin-bottom: var(--space-md);
        }
        
        .theory-card .card-icon {
            width: 40px;
            height: 40px;
            background: var(--dat);
            color: white;
            border-radius: var(--radius);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
        }
        
        .example-box {
            background: #f0fdf4;
            border-radius: var(--radius);
            padding: var(--space-md);
            margin: var(--space-md) 0;
            display: flex;
            align-items: center;
            gap: var(--space-md);
            flex-wrap: wrap;
        }
        
        .example-box .german {
            font-size: 1.125rem;
            font-weight: 500;
        }
        
        .example-box .english {
            color: var(--text-secondary);
        }
        
        /* ===== AUDIO BUTTON ===== */
        .audio-btn {
            background: var(--dat);
            color: white;
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            font-size: 1rem;
        }
        
        .audio-btn:hover {
            background: #059669;
            transform: scale(1.05);
        }
        
        .audio-btn.playing {
            animation: pulse 1s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        
        /* ===== TABLES ===== */
        .table-container {
            overflow-x: auto;
            margin: var(--space-lg) 0;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow);
        }
        
        th, td {
            padding: var(--space-md);
            text-align: left;
            border-bottom: 1px solid var(--border);
        }
        
        th {
            background: var(--dat);
            color: white;
            font-weight: 600;
        }
        
        tr:hover {
            background: #f0fdf4;
        }
        
        .gender-masc { color: var(--masc); font-weight: 600; }
        .gender-fem { color: var(--fem); font-weight: 600; }
        .gender-neut { color: var(--neut); font-weight: 600; }
        .gender-plural { color: var(--plural); font-weight: 600; }
        
        /* ===== VERB & PREP CARDS ===== */
        .verb-grid, .prep-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: var(--space-md);
            margin: var(--space-lg) 0;
        }
        
        .verb-card, .prep-card {
            background: white;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            box-shadow: var(--shadow);
            border-top: 3px solid var(--dat);
            transition: transform 0.2s, box-shadow 0.2s;
        }
        
        .verb-card:hover, .prep-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }
        
        .verb-card .verb {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--dat);
            margin-bottom: var(--space-xs);
        }
        
        .verb-card .meaning {
            color: var(--text-secondary);
            font-size: 0.875rem;
        }
        
        .prep-card .prep {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--dat);
            margin-bottom: var(--space-xs);
        }
        
        .prep-card .meaning {
            color: var(--text-secondary);
        }
        
        .prep-card .example {
            margin-top: var(--space-md);
            padding-top: var(--space-md);
            border-top: 1px dashed var(--border);
            font-size: 0.875rem;
        }
        
        /* ===== CONTRACTIONS ===== */
        .contraction-box {
            background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
            border: 2px solid var(--neut);
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            margin: var(--space-lg) 0;
        }
        
        .contraction-box h4 {
            color: var(--neut);
            margin-top: 0;
        }
        
        .contraction-list {
            display: flex;
            flex-wrap: wrap;
            gap: var(--space-md);
        }
        
        .contraction-item {
            background: white;
            padding: var(--space-sm) var(--space-md);
            border-radius: var(--radius);
            font-family: monospace;
            font-size: 1rem;
        }
        
        .contraction-item .arrow {
            color: var(--text-secondary);
            margin: 0 var(--space-sm);
        }
        
        /* ===== EXERCISES ===== */
        .exercise-section {
            background: white;
            border-radius: var(--radius-xl);
            padding: var(--space-2xl);
            margin: var(--space-2xl) 0;
            box-shadow: var(--shadow);
        }
        
        .exercise-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--space-xl);
            flex-wrap: wrap;
            gap: var(--space-md);
        }
        
        .exercise-title {
            font-size: 1.5rem;
            color: var(--dat);
            margin: 0;
        }
        
        .exercise-progress {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }
        
        .progress-dots {
            display: flex;
            gap: var(--space-xs);
        }
        
        .progress-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--border);
            transition: all 0.3s;
        }
        
        .progress-dot.correct {
            background: var(--success);
        }
        
        .progress-dot.incorrect {
            background: var(--error);
        }
        
        /* ===== EXERCISE ITEMS ===== */
        .exercise-item {
            padding: var(--space-lg);
            border-bottom: 1px solid var(--border);
        }
        
        .exercise-item:last-child {
            border-bottom: none;
        }
        
        .question-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            background: var(--dat);
            color: white;
            border-radius: 50%;
            font-size: 0.875rem;
            font-weight: 600;
            margin-right: var(--space-sm);
        }
        
        .question-text {
            font-size: 1.125rem;
            margin-bottom: var(--space-md);
        }
        
        /* ===== INPUT STYLES ===== */
        .input-group {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            flex-wrap: wrap;
            margin: var(--space-md) 0;
        }
        
        .blank-input {
            border: 2px solid var(--border);
            border-radius: var(--radius);
            padding: var(--space-sm) var(--space-md);
            font-size: 1rem;
            min-width: 120px;
            transition: all 0.2s;
        }
        
        .blank-input:focus {
            outline: none;
            border-color: var(--dat);
        }
        
        .blank-input.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }
        
        .blank-input.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }
        
        .blank-input:disabled {
            cursor: not-allowed;
            opacity: 0.7;
        }
        
        /* ===== SELECT STYLES ===== */
        .select-blank {
            border: 2px solid var(--border);
            border-radius: var(--radius);
            padding: var(--space-sm) var(--space-md);
            font-size: 1rem;
            background: white;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .select-blank:focus {
            outline: none;
            border-color: var(--dat);
        }
        
        .select-blank.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }
        
        .select-blank.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }
        
        /* ===== BUTTONS ===== */
        .btn {
            padding: var(--space-sm) var(--space-lg);
            border-radius: var(--radius);
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            display: inline-flex;
            align-items: center;
            gap: var(--space-sm);
        }
        
        .btn-primary {
            background: var(--dat);
            color: white;
        }
        
        .btn-primary:hover {
            background: #059669;
        }
        
        .btn-secondary {
            background: var(--border);
            color: var(--text-primary);
        }
        
        .btn-secondary:hover {
            background: #cbd5e1;
        }
        
        .btn-success {
            background: var(--success);
            color: white;
        }
        
        /* ===== FEEDBACK ===== */
        .feedback {
            margin-top: var(--space-md);
            padding: var(--space-md);
            border-radius: var(--radius);
            display: none;
        }
        
        .feedback.show {
            display: block;
            animation: slideIn 0.3s ease;
        }
        
        .feedback.correct {
            background: #f0fdf4;
            color: #166534;
            border: 1px solid #86efac;
        }
        
        .feedback.incorrect {
            background: #fef2f2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* ===== CHECKLIST ===== */
        .checklist {
            background: white;
            border-radius: var(--radius-xl);
            padding: var(--space-2xl);
            margin: var(--space-2xl) 0;
            box-shadow: var(--shadow);
        }
        
        .checklist-item {
            display: flex;
            align-items: flex-start;
            gap: var(--space-md);
            padding: var(--space-md) 0;
            border-bottom: 1px solid var(--border);
        }
        
        .checklist-item:last-child {
            border-bottom: none;
        }
        
        .checklist-checkbox {
            width: 24px;
            height: 24px;
            border: 2px solid var(--border);
            border-radius: var(--radius-sm);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        
        .checklist-checkbox:hover {
            border-color: var(--dat);
        }
        
        .checklist-checkbox.checked {
            background: var(--dat);
            border-color: var(--dat);
        }
        
        .checklist-checkbox.checked::after {
            content: "✓";
            color: white;
            font-weight: bold;
        }
        
        .checklist-text {
            flex: 1;
        }
        
        .checklist-answer {
            display: none;
            margin-top: var(--space-sm);
            padding: var(--space-sm);
            background: #f0fdf4;
            border-radius: var(--radius);
            font-size: 0.875rem;
            color: #166534;
        }
        
        .checklist-answer.show {
            display: block;
        }
        
        /* ===== BRIDGE SECTION ===== */
        .connectivity {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--space-lg);
            margin: var(--space-2xl) 0;
        }
        
        @media (max-width: 768px) {
            .connectivity {
                grid-template-columns: 1fr;
            }
        }
        
        .from-prev, .to-next {
            background: white;
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            box-shadow: var(--shadow);
        }
        
        .from-prev {
            border-left: 4px solid var(--acc);
        }
        
        .to-next {
            border-left: 4px solid var(--gen);
        }
        
        .from-prev h4 {
            color: var(--acc);
            margin-top: 0;
        }
        
        .to-next h4 {
            color: var(--gen);
            margin-top: 0;
        }
        
        /* ===== FOOTER ===== */
        .main-footer {
            background: var(--text-primary);
            color: white;
            padding: var(--space-xl);
            text-align: center;
            margin-top: var(--space-2xl);
        }
        
        /* ===== MOBILE RESPONSIVE ===== */
        @media (max-width: 768px) {
            .container {
                padding: var(--space-md);
            }
            
            h1 {
                font-size: 1.75rem;
            }
            
            h2 {
                font-size: 1.375rem;
            }
            
            .exercise-section {
                padding: var(--space-lg);
            }
            
            .verb-grid, .prep-grid {
                grid-template-columns: 1fr;
            }
            
            .nav-content {
                flex-direction: column;
            }
            
            .progress-bar {
                width: 150px;
            }
        }
        
        /* ===== UTILITIES ===== */
        .text-center { text-align: center; }
        .mb-0 { margin-bottom: 0; }
        .mt-lg { margin-top: var(--space-lg); }
        
        .highlight-box {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            margin: var(--space-lg) 0;
        }
        
        .key-point {
            display: flex;
            align-items: flex-start;
            gap: var(--space-sm);
            margin: var(--space-sm) 0;
        }
        
        .key-point::before {
            content: "•";
            color: var(--dat);
            font-weight: bold;
        }
        
        /* ===== MULTIPLE CHOICE ===== */
        .mc-options {
            display: flex;
            flex-direction: column;
            gap: var(--space-sm);
            margin: var(--space-md) 0;
        }
        
        .mc-option {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            padding: var(--space-md);
            border: 2px solid var(--border);
            border-radius: var(--radius);
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .mc-option:hover {
            border-color: var(--dat);
            background: #f0fdf4;
        }
        
        .mc-option.selected {
            border-color: var(--dat);
            background: #f0fdf4;
        }
        
        .mc-option.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }
        
        .mc-option.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }
        
        .mc-radio {
            width: 20px;
            height: 20px;
            border: 2px solid var(--border);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        
        .mc-option.selected .mc-radio {
            border-color: var(--dat);
        }
        
        .mc-option.selected .mc-radio::after {
            content: "";
            width: 10px;
            height: 10px;
            background: var(--dat);
            border-radius: 50%;
        }
