/* CSS Variables */
        :root {
            --nom: #3b82f6;
            --acc: #ef4444;
            --dat: #10b981;
            --gen: #8b5cf6;
            --masc: #06b6d4;
            --fem: #ec4899;
            --neut: #f59e0b;
            --coord: #f97316;
            --subord: #6366f1;
            --bg: #f8fafc;
            --card-bg: #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;
        }

        /* 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;
            font-size: 1.1rem;
        }

        /* Navigation */
        .chapter-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            background: var(--card-bg);
            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: all 0.3s;
        }

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

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

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

        /* Cards */
        .card {
            background: var(--card-bg);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

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

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

        /* Type badges */
        .type-badge {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-right: 0.5rem;
        }

        .badge-coord {
            background: #fff7ed;
            color: var(--coord);
        }

        .badge-subord {
            background: #eef2ff;
            color: var(--subord);
        }

        /* Example boxes */
        .example-box {
            background: #f8fafc;
            border-left: 4px solid var(--nom);
            padding: 1rem;
            margin: 1rem 0;
            border-radius: 0 8px 8px 0;
        }

        .example-box.coord {
            border-left-color: var(--coord);
        }

        .example-box.subord {
            border-left-color: var(--subord);
        }

        .german {
            font-size: 1.1rem;
            color: var(--text);
            margin-bottom: 0.25rem;
        }

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

        .audio-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.2rem;
            margin-left: 0.5rem;
            opacity: 0.7;
            transition: opacity 0.2s;
        }

        .audio-btn:hover {
            opacity: 1;
        }

        /* Word order diagram */
        .word-order {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            align-items: center;
            margin: 1rem 0;
            padding: 1rem;
            background: #f1f5f9;
            border-radius: 8px;
        }

        .word-box {
            padding: 0.5rem 1rem;
            border-radius: 6px;
            font-weight: 500;
        }

        .wb-subject { background: #dbeafe; color: #1e40af; }
        .wb-verb { background: #fee2e2; color: #991b1b; }
        .wb-conj { background: #fef3c7; color: #92400e; }
        .wb-other { background: #f3f4f6; color: #374151; }
        .wb-end { background: #d1fae5; color: #065f46; }

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

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

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

        .conj-table th {
            background: #f8fafc;
            font-weight: 600;
        }

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

        /* Exercise styles */
        .exercise-section {
            background: var(--card-bg);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

        .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.3rem;
            color: var(--text);
        }

        .streak-counter {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
            padding: 0.4rem 0.8rem;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .exercise-item {
            margin-bottom: 1.5rem;
            padding: 1rem;
            background: #f8fafc;
            border-radius: 8px;
        }

        .exercise-number {
            display: inline-block;
            background: var(--nom);
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            text-align: center;
            line-height: 28px;
            font-weight: 600;
            margin-right: 0.5rem;
        }

        .sentence-pair {
            margin: 0.5rem 0;
            padding: 0.5rem;
            background: white;
            border-radius: 6px;
        }

        /* Input styles */
        .input-inline {
            display: inline-block;
            padding: 0.4rem 0.8rem;
            border: 2px solid var(--border);
            border-radius: 6px;
            font-size: 1rem;
            min-width: 100px;
            transition: all 0.3s;
        }

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

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

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

        .input-full {
            width: 100%;
            padding: 0.75rem;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
            margin-top: 0.5rem;
        }

        /* Select dropdown */
        .select-conj {
            padding: 0.4rem 0.8rem;
            border: 2px solid var(--border);
            border-radius: 6px;
            font-size: 1rem;
            background: white;
            cursor: pointer;
        }

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

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

        /* Buttons */
        .btn {
            padding: 0.6rem 1.2rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 500;
        }

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

        .btn-primary:hover {
            background: #2563eb;
        }

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

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

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

        .btn-group {
            display: flex;
            gap: 0.5rem;
            margin-top: 1rem;
            flex-wrap: wrap;
        }

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

        .feedback.show {
            display: block;
        }

        .feedback.correct {
            background: #f0fdf4;
            color: #166534;
            border: 1px solid #bbf7d0;
        }

        .feedback.incorrect {
            background: #fef2f2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }

        /* Checklist */
        .checklist {
            list-style: none;
        }

        .checklist li {
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
        }

        .checklist li:last-child {
            border-bottom: none;
        }

        .check-icon {
            color: var(--success);
            font-weight: bold;
        }

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

        .from-prev, .to-next {
            padding: 1.5rem;
            border-radius: 12px;
        }

        .from-prev {
            background: linear-gradient(135deg, #ecfdf5, #d1fae5);
            border-left: 4px solid var(--dat);
        }

        .to-next {
            background: linear-gradient(135deg, #eff6ff, #dbeafe);
            border-left: 4px solid var(--nom);
        }

        .connectivity h4 {
            margin-bottom: 0.5rem;
            color: var(--text);
        }

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

        .tip-box strong {
            color: #92400e;
        }

        /* Key points */
        .key-point {
            background: #ede9fe;
            border-left: 4px solid var(--gen);
            padding: 1rem;
            margin: 1rem 0;
            border-radius: 0 8px 8px 0;
        }

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

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

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

            .word-order {
                font-size: 0.9rem;
            }

            .exercise-header {
                flex-direction: column;
                align-items: flex-start;
            }
        }

        /* 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: 1000;
        }

        /* Highlight conjunctions */
        .highlight-conj {
            color: var(--coord);
            font-weight: 600;
        }

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

        .highlight-verb {
            color: var(--error);
            font-weight: 600;
            text-decoration: underline;
        }

        /* Answer reveal */
        .answer-reveal {
            background: #f0fdf4;
            padding: 0.75rem;
            border-radius: 6px;
            margin-top: 0.5rem;
            display: none;
        }

        .answer-reveal.show {
            display: block;
        }

        /* Translation hint */
        .translation-hint {
            font-size: 0.9rem;
            color: var(--text-light);
            margin-top: 0.25rem;
        }
