:root {
            --nom: #3b82f6;
            --acc: #ef4444;
            --dat: #10b981;
            --gen: #8b5cf6;
            --masc: #06b6d4;
            --fem: #ec4899;
            --neut: #f59e0b;
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --success: #22c55e;
            --error: #ef4444;
            --warning: #f59e0b;
            --bg: #f8fafc;
            --card: #ffffff;
            --text: #1e293b;
            --text-light: #64748b;
            --border: #e2e8f0;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            padding-bottom: 2rem;
        }

        /* Navigation */
        .chapter-nav {
            background: var(--card);
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: var(--shadow);
        }

        .chapter-nav a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            transition: all 0.2s;
        }

        .chapter-nav a:hover {
            background: rgba(99, 102, 241, 0.1);
        }

        .progress-bar {
            background: var(--border);
            padding: 0.5rem 1.5rem;
            border-radius: 2rem;
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-light);
        }

        /* Header */
        .chapter-header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            padding: 3rem 2rem;
            text-align: center;
        }

        .chapter-badge {
            display: inline-block;
            background: rgba(255,255,255,0.2);
            padding: 0.5rem 1.5rem;
            border-radius: 2rem;
            font-size: 0.875rem;
            font-weight: 600;
            margin-bottom: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

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

        .chapter-header p {
            opacity: 0.9;
            font-size: 1.125rem;
        }

        /* Stats Bar */
        .stats-bar {
            display: flex;
            justify-content: center;
            gap: 2rem;
            padding: 1rem;
            background: var(--card);
            border-bottom: 1px solid var(--border);
        }

        .stat {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.875rem;
        }

        .stat-icon {
            font-size: 1.25rem;
        }

        .streak-count {
            color: var(--warning);
            font-weight: 700;
        }

        /* Main Content */
        .container {
            max-width: 900px;
            margin: 0 auto;
            padding: 2rem;
        }

        /* Theory Cards */
        .theory-card {
            background: var(--card);
            border-radius: 1rem;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow);
            border-left: 4px solid var(--primary);
        }

        .theory-card h2 {
            color: var(--primary);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .theory-card h3 {
            color: var(--text);
            margin: 1.5rem 0 0.75rem;
            font-size: 1.125rem;
        }

        .theory-card p {
            margin-bottom: 1rem;
            color: var(--text);
        }

        /* Example Box */
        .example-box {
            background: #f1f5f9;
            border-radius: 0.75rem;
            padding: 1.25rem;
            margin: 1rem 0;
            position: relative;
        }

        .example-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px dashed var(--border);
        }

        .example-item:last-child {
            border-bottom: none;
        }

        .german-text {
            font-weight: 500;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .english-text {
            color: var(--text-light);
            font-style: italic;
        }

        .audio-btn {
            background: var(--primary);
            color: white;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            font-size: 0.875rem;
        }

        .audio-btn:hover {
            background: var(--primary-dark);
            transform: scale(1.1);
        }

        /* Expression List */
        .expression-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin: 1rem 0;
        }

        .expression-item {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            padding: 1rem;
            border-radius: 0.75rem;
            display: flex;
            flex-direction: column;
        }

        .expression-german {
            font-weight: 600;
            color: #92400e;
            font-size: 1.125rem;
        }

        .expression-english {
            color: #a16207;
            font-size: 0.875rem;
        }

        /* Conjugation Table */
        .conj-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
            background: var(--card);
            border-radius: 0.75rem;
            overflow: hidden;
            box-shadow: var(--shadow);
        }

        .conj-table th {
            background: var(--primary);
            color: white;
            padding: 1rem;
            text-align: left;
            font-weight: 600;
        }

        .conj-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--border);
        }

        .conj-table tr:last-child td {
            border-bottom: none;
        }

        .conj-table tr:hover {
            background: #f8fafc;
        }

        .irregular {
            background: #fef3c7;
            color: #92400e;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            font-weight: 600;
        }

        .highlight-box {
            background: #fef3c7;
            border-left: 4px solid var(--warning);
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0 0.5rem 0.5rem 0;
        }

        .highlight-box h4 {
            color: #92400e;
            margin-bottom: 0.5rem;
        }

        .highlight-box ul {
            margin-left: 1.5rem;
            color: #78350f;
        }

        .highlight-box li {
            margin: 0.25rem 0;
        }

        /* Tips Box */
        .tips-box {
            background: #dbeafe;
            border-left: 4px solid var(--nom);
            padding: 1.5rem;
            margin: 1.5rem 0;
            border-radius: 0 0.5rem 0.5rem 0;
        }

        .tips-box h4 {
            color: #1e40af;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .tips-box p {
            color: #1e3a8a;
            margin-bottom: 0.5rem;
        }

        .warning-box {
            background: #fee2e2;
            border-left: 4px solid var(--error);
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0 0.5rem 0.5rem 0;
        }

        .warning-box h4 {
            color: #991b1b;
            margin-bottom: 0.5rem;
        }

        .warning-box p {
            color: #7f1d1d;
        }

        /* Exercise Section */
        .exercise-section {
            background: var(--card);
            border-radius: 1rem;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow);
        }

        .exercise-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid var(--border);
        }

        .exercise-header h2 {
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .exercise-badge {
            background: var(--primary);
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 0.5rem;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .exercise-instruction {
            background: #f1f5f9;
            padding: 1rem 1.5rem;
            border-radius: 0.5rem;
            margin-bottom: 1.5rem;
            color: var(--text);
        }

        /* Exercise 23.1 - Underline */
        .underline-exercise {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .underline-item {
            background: #f8fafc;
            padding: 1rem 1.5rem;
            border-radius: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
            user-select: none;
        }

        .underline-item:hover {
            background: #f1f5f9;
        }

        .underline-item .sentence {
            font-size: 1.125rem;
            line-height: 1.8;
        }

        .underline-item .word {
            display: inline-block;
            padding: 0.125rem 0.25rem;
            margin: 0 0.125rem;
            border-radius: 0.25rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .underline-item .word:hover {
            background: rgba(99, 102, 241, 0.1);
        }

        .underline-item .word.selected {
            background: #fef3c7;
            border-bottom: 3px solid var(--warning);
        }

        .underline-item .word.correct {
            background: #dcfce7;
            border-bottom: 3px solid var(--success);
        }

        .underline-item .word.incorrect {
            background: #fee2e2;
            border-bottom: 3px solid var(--error);
        }

        .underline-item .number {
            display: inline-block;
            background: var(--primary);
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            text-align: center;
            line-height: 28px;
            font-size: 0.875rem;
            font-weight: 600;
            margin-right: 0.75rem;
        }

        /* Exercise 23.2 - Sentence Building */
        .sentence-builder {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .builder-item {
            background: #f8fafc;
            padding: 1.5rem;
            border-radius: 0.75rem;
        }

        .builder-prompt {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .builder-prompt .subject {
            background: var(--primary);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            font-weight: 600;
        }

        .builder-prompt .arrow {
            color: var(--text-light);
            font-size: 1.25rem;
        }

        .builder-prompt .activity {
            background: #e0e7ff;
            color: var(--primary-dark);
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            font-weight: 500;
        }

        .builder-input-row {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            flex-wrap: wrap;
        }

        .builder-input {
            padding: 0.75rem 1rem;
            border: 2px solid var(--border);
            border-radius: 0.5rem;
            font-size: 1rem;
            min-width: 200px;
            transition: all 0.2s;
        }

        .builder-input:focus {
            outline: none;
            border-color: var(--primary);
        }

        .builder-input.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }

        .builder-input.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }

        .static-text {
            color: var(--text-light);
            font-weight: 500;
        }

        /* Exercise 23.3 - Translation */
        .translation-exercise {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .translation-item {
            background: #f8fafc;
            padding: 1.5rem;
            border-radius: 0.75rem;
        }

        .translation-prompt {
            font-size: 1.125rem;
            color: var(--text);
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px dashed var(--border);
        }

        .translation-forms {
            display: grid;
            gap: 1rem;
        }

        @media (min-width: 768px) {
            .translation-forms {
                grid-template-columns: 1fr 1fr;
            }
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .form-group label {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-light);
        }

        .form-group label.present {
            color: var(--success);
        }

        .form-group label.future {
            color: var(--primary);
        }

        .translation-input {
            padding: 0.75rem 1rem;
            border: 2px solid var(--border);
            border-radius: 0.5rem;
            font-size: 1rem;
            transition: all 0.2s;
        }

        .translation-input:focus {
            outline: none;
            border-color: var(--primary);
        }

        .translation-input.correct {
            border-color: var(--success);
            background: #f0fdf4;
        }

        .translation-input.incorrect {
            border-color: var(--error);
            background: #fef2f2;
        }

        /* Buttons */
        .btn-group {
            display: flex;
            gap: 1rem;
            margin-top: 1.5rem;
            flex-wrap: wrap;
        }

        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 0.5rem;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: var(--border);
            color: var(--text);
        }

        .btn-secondary:hover {
            background: #cbd5e1;
        }

        .btn-success {
            background: var(--success);
            color: white;
        }

        .btn-success:hover {
            background: #16a34a;
        }

        /* Feedback */
        .feedback {
            margin-top: 1rem;
            padding: 1rem;
            border-radius: 0.5rem;
            display: none;
        }

        .feedback.show {
            display: block;
        }

        .feedback.correct {
            background: #dcfce7;
            color: #166534;
        }

        .feedback.incorrect {
            background: #fee2e2;
            color: #991b1b;
        }

        /* Checklist */
        .checklist-section {
            background: var(--card);
            border-radius: 1rem;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow);
        }

        .checklist-section h2 {
            color: var(--text);
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .checklist-item {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            padding: 1rem;
            background: #f8fafc;
            border-radius: 0.75rem;
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .checklist-item:hover {
            background: #f1f5f9;
        }

        .checklist-item input[type="checkbox"] {
            width: 24px;
            height: 24px;
            margin-top: 2px;
            accent-color: var(--primary);
            cursor: pointer;
        }

        .checklist-item label {
            cursor: pointer;
            flex: 1;
        }

        .checklist-item.checked {
            background: #dcfce7;
        }

        /* Bridge Section */
        .connectivity {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            margin: 2rem 0;
        }

        @media (max-width: 768px) {
            .connectivity {
                grid-template-columns: 1fr;
            }
        }

        .connectivity > div {
            background: var(--card);
            padding: 1.5rem;
            border-radius: 0.75rem;
            box-shadow: var(--shadow);
        }

        .from-prev {
            border-left: 4px solid var(--success);
        }

        .to-next {
            border-left: 4px solid var(--primary);
        }

        .connectivity h4 {
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .from-prev h4 {
            color: var(--success);
        }

        .to-next h4 {
            color: var(--primary);
        }

        /* Footer */
        footer {
            text-align: center;
            padding: 2rem;
            color: var(--text-light);
            font-size: 0.875rem;
        }

        /* Animations */
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .pulse {
            animation: pulse 0.3s ease;
        }

        /* Score Display */
        .score-display {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            padding: 1rem 2rem;
            border-radius: 1rem;
            text-align: center;
            margin: 1rem 0;
        }

        .score-display .score {
            font-size: 2rem;
            font-weight: 700;
            color: #92400e;
        }

        .score-display .label {
            color: #a16207;
            font-size: 0.875rem;
        }
