:root {
            --sage-light: #e8f5e9;
            --sage-medium: #c8e6c9;
            --sage-dark: #2e7d32;
            --beige: #f5f5dc;
            --beige-dark: #e8e4c9;
            --off-white: #fafafa;
            --purple: #6b4c9a;
            --purple-light: #9c27b0;
            --text-dark: #1a1a1a;
            --text-muted: #666;
            --border: #d0d0d0;
            --shadow: rgba(0,0,0,0.1);
            --error: #e53935;
            --success: #43a047;
            --warning: #fb8c00;
        }

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

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: Georgia, 'Times New Roman', serif;
            background: linear-gradient(135deg, var(--sage-light) 0%, var(--beige) 100%);
            color: var(--text-dark);
            line-height: 1.6;
            min-height: 100vh;
        }

        /* Header Styles */
        header {
            background: var(--off-white);
            border-bottom: 3px solid var(--sage-dark);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 10px var(--shadow);
        }

        .header-container {
            max-width: 900px;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--sage-dark);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .logo::before {
            content: "📚";
        }

        .exercise-indicator {
            background: var(--sage-medium);
            color: var(--sage-dark);
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .progress-container {
            width: 100%;
            height: 6px;
            background: var(--beige-dark);
            border-radius: 3px;
            margin-top: 0.5rem;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            background: var(--sage-dark);
            width: 0%;
            transition: width 0.3s ease;
        }

        /* Navigation */
        .nav-bar {
            background: var(--beige);
            padding: 1rem 0;
            border-bottom: 1px solid var(--border);
        }

        .nav-container {
            max-width: 900px;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .nav-btn {
            background: var(--off-white);
            border: 2px solid var(--sage-dark);
            color: var(--sage-dark);
            padding: 0.6rem 1.2rem;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-btn:hover {
            background: var(--sage-dark);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px var(--shadow);
        }

        .nav-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

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

        /* Section Headers */
        h1 {
            color: var(--sage-dark);
            font-size: 2.2rem;
            margin-bottom: 1.5rem;
            border-bottom: 3px solid var(--purple);
            padding-bottom: 0.5rem;
        }

        h2 {
            color: var(--sage-dark);
            font-size: 1.6rem;
            margin: 2rem 0 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        h3 {
            color: var(--purple);
            font-size: 1.3rem;
            margin: 1.5rem 0 0.8rem;
        }

        h4 {
            color: var(--text-dark);
            font-size: 1.1rem;
            margin: 1.2rem 0 0.6rem;
        }

        /* Theory Sections */
        .theory-section {
            background: var(--off-white);
            border-radius: 12px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 12px var(--shadow);
            border-left: 5px solid var(--sage-dark);
        }

        .theory-section.purple-accent {
            border-left-color: var(--purple);
        }

        .german-term {
            color: var(--purple);
            font-weight: 600;
            font-size: 1.1em;
        }

        .example-box {
            background: var(--sage-light);
            border-left: 4px solid var(--sage-dark);
            padding: 1rem 1.2rem;
            margin: 1rem 0;
            border-radius: 0 8px 8px 0;
        }

        .example-box p {
            margin: 0.5rem 0;
            font-style: italic;
        }

        .translation {
            color: var(--text-muted);
            font-size: 0.95em;
        }

        /* Interactive Components */
        .interactive-box {
            background: linear-gradient(135deg, var(--beige) 0%, var(--off-white) 100%);
            border: 2px solid var(--purple);
            border-radius: 12px;
            padding: 1.5rem;
            margin: 1.5rem 0;
        }

        .toggle-container {
            display: flex;
            gap: 1rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }

        .toggle-btn {
            background: var(--off-white);
            border: 2px solid var(--border);
            padding: 0.8rem 1.5rem;
            border-radius: 25px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            font-size: 1rem;
        }

        .toggle-btn.active {
            background: var(--purple);
            color: white;
            border-color: var(--purple);
        }

        .toggle-btn:hover:not(.active) {
            border-color: var(--purple);
            color: var(--purple);
        }

        /* Word Order Visualizer */
        .sentence-builder {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            margin: 1rem 0;
            box-shadow: 0 2px 8px var(--shadow);
        }

        .position-slots {
            display: flex;
            gap: 1rem;
            margin: 1.5rem 0;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
        }

        .position-slot {
            min-width: 120px;
            min-height: 60px;
            border: 3px dashed var(--border);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            position: relative;
            background: var(--off-white);
            transition: all 0.3s;
        }

        .position-slot.filled {
            border-style: solid;
            border-color: var(--sage-dark);
            background: var(--sage-light);
        }

        .position-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            position: absolute;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            padding: 0 0.5rem;
        }

        .position-content {
            font-weight: 600;
            color: var(--sage-dark);
            padding: 0.5rem;
        }

        /* Question Word Matcher */
        .question-words-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin: 1.5rem 0;
        }

        .question-word-card {
            background: var(--off-white);
            border: 2px solid var(--border);
            border-radius: 10px;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
        }

        .question-word-card:hover {
            border-color: var(--purple);
            transform: translateY(-3px);
            box-shadow: 0 6px 12px var(--shadow);
        }

        .question-word-card.active {
            border-color: var(--purple);
            background: var(--sage-light);
        }

        .q-word {
            font-size: 1.4rem;
            color: var(--purple);
            font-weight: bold;
            margin-bottom: 0.3rem;
        }

        .q-meaning {
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .question-word-detail {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            margin-top: 1rem;
            display: none;
            border: 2px solid var(--purple);
            animation: fadeIn 0.3s ease;
        }

        .question-word-detail.show {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Do Eliminator Demo */
        .eliminator-demo {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            margin: 1.5rem 0;
        }

        @media (max-width: 600px) {
            .eliminator-demo {
                grid-template-columns: 1fr;
            }
        }

        .language-column {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 2px 8px var(--shadow);
        }

        .language-header {
            font-weight: bold;
            font-size: 1.2rem;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid;
        }

        .english-header {
            color: var(--error);
            border-color: var(--error);
        }

        .german-header {
            color: var(--success);
            border-color: var(--success);
        }

        .sentence-comparison {
            margin: 1rem 0;
            padding: 1rem;
            background: var(--sage-light);
            border-radius: 8px;
            position: relative;
        }

        .highlight-do {
            background: #ffcdd2;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            text-decoration: line-through;
            color: var(--error);
        }

        .highlight-verb {
            background: #c8e6c9;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            color: var(--success);
            font-weight: bold;
        }

        /* Exercise Sections */
        .exercise-section {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 12px var(--shadow);
            border-top: 5px solid var(--purple);
        }

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

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

        .formality-switch {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: var(--beige);
            padding: 0.5rem 1rem;
            border-radius: 20px;
        }

        .switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 30px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--sage-medium);
            transition: .4s;
            border-radius: 30px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .slider {
            background-color: var(--purple);
        }

        input:checked + .slider:before {
            transform: translateX(30px);
        }

        .switch-labels {
            font-size: 0.9rem;
            font-weight: 600;
        }

        /* Input Styles */
        .input-group {
            margin: 1rem 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .input-label {
            min-width: 30px;
            font-weight: 600;
            color: var(--sage-dark);
        }

        .german-input {
            border: 2px solid var(--border);
            border-radius: 6px;
            padding: 0.6rem 1rem;
            font-size: 1rem;
            font-family: inherit;
            transition: all 0.3s;
            flex: 1;
            min-width: 200px;
        }

        .german-input:focus {
            outline: none;
            border-color: var(--purple);
            box-shadow: 0 0 0 3px rgba(107, 76, 154, 0.1);
        }

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

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

        select.german-input {
            cursor: pointer;
            min-width: 150px;
            flex: 0;
        }

        .hint-text {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-left: 2.5rem;
            font-style: italic;
        }

        .answer-feedback {
            margin-left: 0.5rem;
            font-size: 1.2rem;
        }

        .correct-answer-display {
            display: none;
            color: var(--success);
            font-size: 0.9rem;
            margin-left: 2.5rem;
            margin-top: 0.3rem;
        }

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

        /* Two Column Layout for Exercise 7.3 */
        .two-column-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }

        @media (max-width: 700px) {
            .two-column-grid {
                grid-template-columns: 1fr;
            }
        }

        .column-header {
            background: var(--sage-medium);
            color: var(--sage-dark);
            padding: 0.5rem 1rem;
            border-radius: 6px;
            font-weight: 600;
            margin-bottom: 1rem;
            text-align: center;
        }

        .column-content {
            background: var(--off-white);
            padding: 1rem;
            border-radius: 8px;
        }

        /* Interview Exercise */
        .interview-item {
            background: var(--off-white);
            border-radius: 10px;
            padding: 1.5rem;
            margin: 1rem 0;
            border-left: 4px solid var(--purple);
        }

        .interview-answer {
            background: var(--sage-light);
            padding: 0.8rem 1rem;
            border-radius: 6px;
            margin-top: 0.8rem;
            font-style: italic;
            color: var(--text-muted);
        }

        .interview-hint {
            font-size: 0.85rem;
            color: var(--purple);
            margin-top: 0.5rem;
            font-weight: 600;
        }

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

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

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

        .btn-primary:hover {
            background: #1b5e20;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
        }

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

        .btn-secondary:hover {
            background: #5a3d8a;
            transform: translateY(-2px);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid var(--text-muted);
            color: var(--text-muted);
        }

        .btn-outline:hover {
            background: var(--text-muted);
            color: white;
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
        }

        /* Question Constructor Tool */
        .constructor-area {
            background: var(--beige);
            border-radius: 12px;
            padding: 1.5rem;
            margin: 1rem 0;
        }

        .constructor-parts {
            display: flex;
            gap: 1rem;
            margin: 1rem 0;
            flex-wrap: wrap;
            align-items: center;
        }

        .part-selector {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }

        .part-label {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-weight: 600;
        }

        .constructor-result {
            background: white;
            border: 2px solid var(--sage-dark);
            border-radius: 8px;
            padding: 1rem;
            margin-top: 1rem;
            min-height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--sage-dark);
        }

        /* Common Mistakes Alert */
        .mistake-alert {
            background: #fff3e0;
            border-left: 4px solid var(--warning);
            padding: 1rem;
            border-radius: 0 8px 8px 0;
            margin: 1rem 0;
            display: none;
        }

        .mistake-alert.show {
            display: block;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from { opacity: 0; transform: translateX(-20px); }
            to { opacity: 1; transform: translateX(0); }
        }

        .mistake-title {
            color: var(--warning);
            font-weight: bold;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        /* Context Selector */
        .context-tabs {
            display: flex;
            gap: 0.5rem;
            margin: 1rem 0;
            overflow-x: auto;
            padding-bottom: 0.5rem;
        }

        .context-tab {
            background: var(--off-white);
            border: 2px solid var(--border);
            padding: 0.6rem 1.2rem;
            border-radius: 20px;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.3s;
            font-size: 0.9rem;
        }

        .context-tab.active {
            background: var(--sage-dark);
            color: white;
            border-color: var(--sage-dark);
        }

        .context-content {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .context-content.active {
            display: block;
        }

        /* Completion Checkbox */
        .completion-box {
            background: var(--sage-light);
            border: 2px solid var(--sage-dark);
            border-radius: 12px;
            padding: 1.5rem;
            margin: 2rem 0;
            display: flex;
            align-items: center;
            gap: 1rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .completion-box:hover {
            background: var(--sage-medium);
        }

        .completion-box.completed {
            background: var(--sage-dark);
            color: white;
        }

        .completion-checkbox {
            width: 24px;
            height: 24px;
            accent-color: var(--sage-dark);
        }

        .completion-box.completed .completion-checkbox {
            accent-color: white;
        }

        /* Footer */
        footer {
            background: var(--beige);
            border-top: 2px solid var(--sage-medium);
            padding: 2rem 0;
            margin-top: 3rem;
        }

        .footer-content {
            max-width: 900px;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .footer-links {
            display: flex;
            gap: 1.5rem;
        }

        .footer-link {
            color: var(--sage-dark);
            text-decoration: none;
            font-weight: 600;
        }

        .footer-link:hover {
            text-decoration: underline;
        }

        /* Utility Classes */
        .hidden {
            display: none !important;
        }

        .text-center {
            text-align: center;
        }

        .mb-2 {
            margin-bottom: 2rem;
        }

        .mt-2 {
            margin-top: 2rem;
        }

        .phonetic {
            color: var(--text-muted);
            font-size: 0.9em;
            font-style: italic;
        }

        /* Scroll to top */
        .scroll-top {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: var(--sage-dark);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.3s;
            box-shadow: 0 4px 12px var(--shadow);
            border: none;
            font-size: 1.5rem;
        }

        .scroll-top.visible {
            opacity: 1;
        }

        .scroll-top:hover {
            background: #1b5e20;
            transform: translateY(-3px);
        }

        /* Responsive adjustments */
        @media (max-width: 600px) {
            h1 {
                font-size: 1.6rem;
            }
            
            h2 {
                font-size: 1.3rem;
            }
            
            .theory-section, .exercise-section {
                padding: 1.2rem;
            }
            
            .position-slots {
                flex-direction: column;
                align-items: stretch;
            }
            
            .position-slot {
                min-width: auto;
            }
        }

        /* Print styles */
        @media print {
            .nav-bar, .btn-group, .interactive-box, .scroll-top {
                display: none;
            }
            
            .theory-section, .exercise-section {
                box-shadow: none;
                break-inside: avoid;
            }
        }

        /* Focus visible for accessibility */
        *:focus-visible {
            outline: 3px solid var(--purple);
            outline-offset: 2px;
        }

        button:focus-visible, a:focus-visible {
            outline: 3px solid var(--purple);
            outline-offset: 2px;
        }
