:root {
            --nom: #3b82f6;
            --acc: #ef4444;
            --dat: #10b981;
            --gen: #8b5cf6;
            --masc: #06b6d4;
            --fem: #ec4899;
            --neut: #f59e0b;
            --regular: #10b981;
            --irregular: #ef4444;
            --mixed: #8b5cf6;
            --haben: #f59e0b;
            --sein: #3b82f6;
            --modal: #ec4899;
            --bg: #f8fafc;
            --card: #ffffff;
            --text: #1e293b;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --success: #22c55e;
            --error: #ef4444;
            --warning: #f59e0b;
        }

        * {
            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;
        }

        /* Header & Navigation */
        .chapter-header {
            background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
            color: white;
            padding: 2rem 1rem;
            text-align: center;
        }

        .chapter-badge {
            display: inline-block;
            background: var(--regular);
            color: white;
            padding: 0.25rem 1rem;
            border-radius: 20px;
            font-size: 0.875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
        }

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

        .chapter-header .subtitle {
            color: #94a3b8;
            font-size: 1.1rem;
        }

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

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

        .chapter-nav a:hover {
            background: #eff6ff;
        }

        .progress-bar {
            background: var(--border);
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.875rem;
            color: var(--text-muted);
            font-weight: 500;
        }

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

        /* Section Styling */
        section {
            margin-bottom: 2rem;
        }

        h2 {
            color: var(--text);
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--border);
        }

        h3 {
            color: var(--text);
            margin: 1.5rem 0 0.75rem;
        }

        h4 {
            color: var(--text-muted);
            margin: 1rem 0 0.5rem;
        }

        /* Theory Cards */
        .theory-card {
            background: var(--card);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            border-left: 4px solid var(--regular);
        }

        .theory-card.irregular {
            border-left-color: var(--irregular);
        }

        .theory-card.mixed {
            border-left-color: var(--mixed);
        }

        .theory-card.haben {
            border-left-color: var(--haben);
        }

        .theory-card.sein {
            border-left-color: var(--sein);
        }

        .theory-card.modal {
            border-left-color: var(--modal);
        }

        .theory-card h3 {
            margin-top: 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .badge {
            display: inline-block;
            padding: 0.15rem 0.5rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
        }

        .badge-regular { background: #d1fae5; color: #065f46; }
        .badge-irregular { background: #fee2e2; color: #991b1b; }
        .badge-mixed { background: #ede9fe; color: #5b21b6; }
        .badge-haben { background: #fef3c7; color: #92400e; }
        .badge-sein { background: #dbeafe; color: #1e40af; }
        .badge-modal { background: #fce7f3; color: #9d174d; }

        /* Tables */
        .verb-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            background: var(--card);
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .verb-table th,
        .verb-table td {
            padding: 0.75rem 1rem;
            text-align: left;
            border-bottom: 1px solid var(--border);
        }

        .verb-table th {
            background: #f1f5f9;
            font-weight: 600;
            color: var(--text-muted);
        }

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

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

        .verb-highlight {
            font-weight: 600;
            color: var(--regular);
        }

        .verb-highlight.irregular {
            color: var(--irregular);
        }

        .verb-highlight.mixed {
            color: var(--mixed);
        }

        /* Example Box */
        .example-box {
            background: #f8fafc;
            border-radius: 8px;
            padding: 1rem;
            margin: 1rem 0;
        }

        .example {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            margin-bottom: 0.75rem;
        }

        .example:last-child {
            margin-bottom: 0;
        }

        .example-german {
            font-weight: 500;
            color: var(--text);
        }

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

        .audio-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.25rem;
            padding: 0.25rem;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .audio-btn:hover {
            background: #e2e8f0;
            transform: scale(1.1);
        }

        /* Exercise Styling */
        .exercise {
            background: var(--card);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .exercise-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }

        .exercise-number {
            background: var(--nom);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
        }

        .exercise h3 {
            margin: 0;
        }

        .exercise-instruction {
            background: #eff6ff;
            border-left: 3px solid var(--nom);
            padding: 0.75rem 1rem;
            margin-bottom: 1rem;
            border-radius: 0 8px 8px 0;
        }

        /* Snow White Text */
        .snow-white-text {
            background: #fefce8;
            border: 2px dashed #fbbf24;
            border-radius: 12px;
            padding: 1.5rem;
            line-height: 2;
            font-size: 1.05rem;
            margin: 1rem 0;
        }

        .snow-white-text .verb {
            background: #fef3c7;
            padding: 0.1rem 0.3rem;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .snow-white-text .verb:hover {
            background: #fde68a;
        }

        .snow-white-text .verb.classified {
            font-weight: 600;
        }

        .snow-white-text .verb.regular { background: #d1fae5; color: #065f46; }
        .snow-white-text .verb.irregular { background: #fee2e2; color: #991b1b; }
        .snow-white-text .verb.mixed { background: #ede9fe; color: #5b21b6; }

        /* Classification Grid */
        .classification-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin: 1rem 0;
        }

        .classification-column {
            background: #f8fafc;
            border-radius: 8px;
            padding: 1rem;
            min-height: 200px;
        }

        .classification-column h4 {
            text-align: center;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid;
            margin-bottom: 0.75rem;
        }

        .classification-column.regular h4 { border-color: var(--regular); color: var(--regular); }
        .classification-column.irregular h4 { border-color: var(--irregular); color: var(--irregular); }
        .classification-column.mixed h4 { border-color: var(--mixed); color: var(--mixed); }

        .classified-item {
            background: white;
            padding: 0.5rem;
            margin-bottom: 0.5rem;
            border-radius: 4px;
            font-size: 0.9rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .classified-item .infinitive {
            color: var(--text-muted);
            font-size: 0.8rem;
        }

        /* Input Styling */
        .input-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
            flex-wrap: wrap;
        }

        .input-row .number {
            background: var(--border);
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.875rem;
            font-weight: 600;
        }

        .input-row input {
            border: 2px solid var(--border);
            border-radius: 6px;
            padding: 0.5rem 0.75rem;
            font-size: 1rem;
            min-width: 150px;
            transition: border-color 0.2s;
        }

        .input-row input:focus {
            outline: none;
            border-color: var(--nom);
        }

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

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

        .input-row .feedback {
            font-size: 0.875rem;
            color: var(--text-muted);
        }

        /* Conjugation Table Input */
        .conj-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
        }

        .conj-table th,
        .conj-table td {
            padding: 0.5rem;
            border: 1px solid var(--border);
            text-align: center;
        }

        .conj-table th {
            background: #f1f5f9;
        }

        .conj-table input {
            width: 100%;
            border: 2px solid var(--border);
            border-radius: 4px;
            padding: 0.4rem;
            text-align: center;
            font-size: 0.95rem;
        }

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

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

        /* Translation Exercise */
        .translation-item {
            background: #f8fafc;
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
        }

        .translation-item .english {
            font-weight: 500;
            margin-bottom: 0.5rem;
        }

        .translation-item input {
            width: 100%;
            border: 2px solid var(--border);
            border-radius: 6px;
            padding: 0.75rem;
            font-size: 1rem;
        }

        /* Buttons */
        .btn {
            background: var(--nom);
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            margin-top: 1rem;
        }

        .btn:hover {
            background: #2563eb;
            transform: translateY(-1px);
        }

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

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

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

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

        /* Checklist */
        .checklist {
            background: var(--card);
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .checklist-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.75rem 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: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            transition: all 0.2s;
        }

        .checklist-checkbox:hover {
            border-color: var(--nom);
        }

        .checklist-checkbox.checked {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }

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

        .connectivity > div {
            background: var(--card);
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .connectivity h4 {
            margin-top: 0;
            color: var(--nom);
        }

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

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

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

        .stat {
            text-align: center;
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--nom);
        }

        .stat-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        /* Modal Verbs Grid */
        .modal-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 1rem;
            margin: 1rem 0;
        }

        .modal-card {
            background: #fdf2f8;
            border-radius: 8px;
            padding: 1rem;
            text-align: center;
        }

        .modal-card h5 {
            color: var(--modal);
            margin-bottom: 0.5rem;
        }

        .modal-card .forms {
            font-size: 0.875rem;
            color: var(--text-muted);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .chapter-header h1 {
                font-size: 1.5rem;
            }

            .chapter-nav {
                flex-direction: column;
                text-align: center;
            }

            .classification-grid {
                grid-template-columns: 1fr;
            }

            .connectivity {
                grid-template-columns: 1fr;
            }

            .verb-table {
                font-size: 0.875rem;
            }

            .verb-table th,
            .verb-table td {
                padding: 0.5rem;
            }
        }

        /* Utility */
        .highlight-box {
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            border-radius: 8px;
            padding: 1rem;
            margin: 1rem 0;
        }

        .tip-box {
            background: #fef3c7;
            border-left: 4px solid #f59e0b;
            padding: 1rem;
            border-radius: 0 8px 8px 0;
            margin: 1rem 0;
        }

        .tip-box::before {
            content: "💡 ";
        }

        .ending-highlight {
            font-weight: 700;
            color: var(--regular);
        }

        .vowel-change {
            font-weight: 700;
            color: var(--irregular);
        }

        /* Hidden content for progressive disclosure */
        .hidden-content {
            display: none;
        }

        .hidden-content.visible {
            display: block;
        }

        .toggle-btn {
            background: #f1f5f9;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.875rem;
            margin-top: 0.5rem;
        }

        .toggle-btn:hover {
            background: #e2e8f0;
        }
