/* CSS Variables */
        :root {
            --nom: #3b82f6;
            --acc: #ef4444;
            --dat: #10b981;
            --gen: #8b5cf6;
            --masc: #06b6d4;
            --fem: #ec4899;
            --neut: #f59e0b;
            --primary: #6366f1;
            --secondary: #8b5cf6;
            --success: #22c55e;
            --error: #ef4444;
            --warning: #f59e0b;
            --bg: #f8fafc;
            --card-bg: #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);
            --radius: 12px;
            --radius-sm: 8px;
        }

        * {
            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;
            min-height: 100vh;
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            padding: 2rem 1rem;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
            opacity: 0.5;
        }

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

        .header h1 {
            font-size: clamp(1.5rem, 5vw, 2.5rem);
            font-weight: 700;
            position: relative;
            z-index: 1;
        }

        .header-subtitle {
            opacity: 0.9;
            margin-top: 0.5rem;
            font-size: 1.1rem;
        }

        /* Streak Counter */
        .streak-counter {
            position: fixed;
            top: 1rem;
            right: 1rem;
            background: var(--card-bg);
            padding: 0.5rem 1rem;
            border-radius: 50px;
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            z-index: 100;
        }

        .streak-counter .fire {
            font-size: 1.25rem;
        }

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

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

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

        .progress-bar {
            font-size: 0.875rem;
            color: var(--text-light);
            font-weight: 500;
        }

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

        /* Section */
        .section {
            margin-bottom: 3rem;
        }

        .section-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .section-title .icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.25rem;
        }

        /* Cards */
        .card {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: var(--shadow);
            border: 1px solid var(--border);
        }

        .card-title {
            font-size: 1.125rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary);
        }

        /* Theory Cards */
        .theory-card {
            background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
            border-left: 4px solid var(--nom);
        }

        .theory-card.comparative {
            border-left-color: var(--masc);
            background: linear-gradient(135deg, #ecfeff, #cffafe);
        }

        .theory-card.superlative {
            border-left-color: var(--fem);
            background: linear-gradient(135deg, #fdf4ff, #fae8ff);
        }

        .theory-card.special {
            border-left-color: var(--warning);
            background: linear-gradient(135deg, #fffbeb, #fef3c7);
        }

        /* Tables */
        .table-container {
            overflow-x: auto;
            margin: 1rem 0;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.95rem;
        }

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

        th {
            background: var(--bg);
            font-weight: 600;
            color: var(--text-light);
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.5px;
        }

        tr:hover {
            background: var(--bg);
        }

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

        .highlight-form {
            background: rgba(99, 102, 241, 0.1);
            padding: 0.125rem 0.375rem;
            border-radius: 4px;
            font-weight: 500;
        }

        /* Example Box */
        .example-box {
            background: var(--bg);
            padding: 1rem;
            border-radius: var(--radius-sm);
            margin: 1rem 0;
            position: relative;
        }

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

        .example-box .english {
            color: var(--text-light);
            font-size: 0.9rem;
            margin-top: 0.25rem;
        }

        /* Audio Button */
        .audio-btn {
            background: var(--primary);
            color: white;
            border: none;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            transition: all 0.2s;
            flex-shrink: 0;
        }

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

        .audio-btn:active {
            transform: scale(0.95);
        }

        /* Exercise Styles */
        .exercise-container {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow);
            border: 1px solid var(--border);
        }

        .exercise-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .exercise-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary);
        }

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

        /* Form Elements */
        .input-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .input-row label {
            font-weight: 500;
            min-width: 80px;
        }

        input[type="text"], select {
            padding: 0.5rem 0.75rem;
            border: 2px solid var(--border);
            border-radius: var(--radius-sm);
            font-size: 1rem;
            transition: all 0.2s;
            min-width: 150px;
        }

        input[type="text"]:focus, select:focus {
            outline: none;
            border-color: var(--primary);
        }

        input[type="text"].correct {
            border-color: var(--success);
            background: rgba(34, 197, 94, 0.1);
        }

        input[type="text"].incorrect {
            border-color: var(--error);
            background: rgba(239, 68, 68, 0.1);
        }

        /* Buttons */
        .btn {
            padding: 0.625rem 1.25rem;
            border-radius: var(--radius-sm);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            font-size: 0.95rem;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

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

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

        .btn-secondary {
            background: var(--bg);
            color: var(--text);
            border: 1px solid var(--border);
        }

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

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

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

        /* Feedback */
        .feedback {
            padding: 0.75rem 1rem;
            border-radius: var(--radius-sm);
            margin-top: 0.5rem;
            font-size: 0.9rem;
            display: none;
        }

        .feedback.show {
            display: block;
        }

        .feedback.correct {
            background: rgba(34, 197, 94, 0.1);
            color: #166534;
            border: 1px solid rgba(34, 197, 94, 0.3);
        }

        .feedback.incorrect {
            background: rgba(239, 68, 68, 0.1);
            color: #991b1b;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        /* Exercise Items */
        .exercise-item {
            padding: 1rem;
            border-bottom: 1px solid var(--border);
        }

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

        .exercise-item .prompt {
            margin-bottom: 0.75rem;
            font-weight: 500;
        }

        .exercise-item .answer-area {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            align-items: center;
        }

        /* Translation Exercise */
        .translation-item {
            display: grid;
            gap: 0.75rem;
            padding: 1rem;
            border-bottom: 1px solid var(--border);
        }

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

        .translation-item .english-prompt {
            color: var(--text-light);
        }

        /* Comparison Exercise */
        .comparison-row {
            display: grid;
            grid-template-columns: auto 1fr 1fr 1fr;
            gap: 1rem;
            align-items: center;
            padding: 0.75rem;
            border-bottom: 1px solid var(--border);
        }

        .comparison-row:last-child {
            border-bottom: none;
        }

        .comparison-row.header {
            font-weight: 600;
            color: var(--text-light);
            font-size: 0.875rem;
            text-transform: uppercase;
        }

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

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

        .checklist li: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;
            transition: all 0.2s;
            flex-shrink: 0;
        }

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

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

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

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

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

        .connectivity .to-next {
            border-left: 4px solid var(--gen);
            text-align: right;
        }

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

        .connectivity p {
            font-size: 0.95rem;
        }

        /* Progress Indicator */
        .progress-indicator {
            position: fixed;
            bottom: 1rem;
            left: 50%;
            transform: translateX(-50%);
            background: var(--card-bg);
            padding: 0.75rem 1.5rem;
            border-radius: 50px;
            box-shadow: var(--shadow-lg);
            display: flex;
            align-items: center;
            gap: 1rem;
            z-index: 100;
        }

        .progress-dots {
            display: flex;
            gap: 0.5rem;
        }

        .progress-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--border);
            transition: all 0.2s;
        }

        .progress-dot.completed {
            background: var(--success);
        }

        .progress-dot.current {
            background: var(--primary);
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.2); }
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .comparison-row {
                grid-template-columns: 1fr;
                gap: 0.5rem;
            }

            .comparison-row.header {
                display: none;
            }

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

            .connectivity .to-next {
                text-align: left;
            }

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

            .streak-counter {
                position: relative;
                top: auto;
                right: auto;
                margin: 1rem auto;
                width: fit-content;
            }

            .progress-indicator {
                bottom: 0.5rem;
                padding: 0.5rem 1rem;
            }
        }

        /* Utility Classes */
        .text-center { text-align: center; }
        .mb-1 { margin-bottom: 0.5rem; }
        .mb-2 { margin-bottom: 1rem; }
        .mb-3 { margin-bottom: 1.5rem; }
        .mt-2 { margin-top: 1rem; }
        .font-bold { font-weight: 700; }

        /* Special Forms Highlight */
        .special-form {
            background: linear-gradient(135deg, #fef3c7, #fde68a);
            padding: 0.125rem 0.375rem;
            border-radius: 4px;
            font-weight: 600;
        }

        .irregular-form {
            background: linear-gradient(135deg, #fee2e2, #fecaca);
            padding: 0.125rem 0.375rem;
            border-radius: 4px;
            font-weight: 600;
        }
