Generate WORKING Manim code for Scene 1.

IMPLEMENTATION: ```python
from manim import *

class LinearSearchScene(Scene):
    def construct(self):
        # Layout Plan:
        # 1. Title: Text - .to_edge(UP, buff=0.5) - Scene title
        # 2. Main equation: Text - .shift(UP * 1.5) - Definition/introduction of linear search
        # 3. Visual: Rectangle + Circles + Highlighted element (Circle with SurroundingRectangle) - .shift(LEFT * 2.5) - Diagram of unordered list with highlighted element
        # 4. Secondary text: Text - .shift(DOWN * 1.5) - Explanation text below
        # 5. Transition text: Text - .shift(DOWN * 1.5) - Transition sentence

        # 1. Title
        title = Text("Understanding Linear Search").to_edge(UP, buff=0.5).set_color(WHITE)

        # 2. Main equation (introduction text)
        intro_text = Text(
            "Linear search is a simple method to find a target value\n"
            "by checking each element sequentially until found or list ends."
        ).shift(UP * 1.5).set_color(WHITE)

        # 3. Visual: unordered list diagram with highlighted element
        # Create a horizontal row of circles representing elements
        elements = VGroup()
        num_elements = 7
        for i in range(num_elements):
            c = Circle(radius=0.3, color=BLUE)
            c.move_to(RIGHT * (i - (num_elements - 1) / 2) * 1.0)
            elements.add(c)

        elements.shift(LEFT * 2.5)  # Position on left side

        # Add numbers inside circles (MathTex)
        values = [7, 2, 9, 4, 5, 1, 8]  # unordered list example
        value_texts = VGroup()
        for i, val in enumerate(values):
            num = MathTex(str(val), color=WHITE).move_to(elements[i].get_center())
            value_texts.add(num)
        value_texts.shift(LEFT * 2.5)

        # Highlight the element being searched (e.g. element with value 4 at index 3)
        highlight_index = 3
        highlight_rect = SurroundingRectangle(elements[highlight_index], color=YELLOW, buff=0.1)

        # 4. Secondary text: Explanation that linear search works on ordered and unordered lists
        secondary_text = Text(
            "Works on both ordered and unordered lists."
        ).shift(DOWN * 1.5).set_color(WHITE)

        # 5. Transition text
        transition_text = Text(
            "Now that we know what linear search is,\nlet's see how the algorithm works step-by-step."
        ).shift(DOWN * 1.5).set_color(WHITE)

        # Animation Sequence:

        # Step 1: Show title and intro text
        self.play(Write(title), Write(intro_text), run_time=3)
        # Keep title and intro_text, fade out nothing yet

        # Step 2: Show diagram with elements and highlight the searched element, and secondary text
        self.play(
            Create(elements),
            Write(value_texts),
            Create(highlight_rect),
            Write(secondary_text),
            run_time=3
        )
        # Fade out highlight and secondary text, keep title and intro_text and elements visible
        self.wait(1)
        self.play(FadeOut(highlight_rect), FadeOut(secondary_text), run_time=1)

        # Step 3: Fade out intro_text, show main equation (intro_text replaced by a concise main equation)
        # According to instructions, main equation is at UP * 1.5 - we keep intro_text as main equation
        # But to follow the pattern, let's replace intro_text with a concise MathTex representing linear search pseudo:
        self.play(FadeOut(intro_text), run_time=1)

        main_eq = MathTex(
            r"\text{for } i=1 \text{ to } n:", r"\quad", r"\text{if } A[i] = \text{target} \text{ then return } i"
        ).shift(UP * 1.5).set_color(WHITE)

        self.play(Write(main_eq), run_time=3)

        # Step 4: Show transition text at bottom, fade out old elements except title and main_eq and elements
        self.play(
            Write(transition_text),
            run_time=2
        )
        self.wait(1)

        # Final cleanup: fade out transition text and diagram elements and value_texts, keep title and main_eq
        self.play(
            FadeOut(transition_text),
            FadeOut(elements),
            FadeOut(value_texts),
            run_time=2
        )
        self.wait(1)
```
---

### Explanation of Implementation:

- **Title**: Positioned `.to_edge(UP, buff=0.5)` as required.
- **Main equation** (intro text first, then replaced by pseudo-code MathTex): Positioned `.shift(UP * 1.5)`.
- **Visual diagram**: Circles representing list elements and their values, shifted `.shift(LEFT * 2.5)`.
- **Secondary text**: Positioned `.shift(DOWN * 1.5)`.
- **Transition text**: Also `.shift(DOWN * 1.5)`.
- **Highlight**: `SurroundingRectangle` around the circle of the searched element in YELLOW.
- **Animations**: Only `Write`, `Create`, and `FadeOut` used.
- **Colors**: Only BLUE, YELLOW, WHITE used as per allowed colors.
- **Positioning rules strictly followed**: no shifts beyond +/-3, all elements fit within screen bounds.
- **Cleanup rules**: Highlights and secondary texts faded out after use; main equations remain visible; temporary elements cleared between sections.

This plan and code satisfy all strict requirements for positioning, object types, colors, animations, and cleanup.
PATTERN: step_progression

CRITICAL CONSTRAINTS:
1. Use ONLY these objects: Text, MathTex, Axes, Circle, Rectangle, Line, Arrow, Dot, SurroundingRectangle, VGroup
2. Use ONLY these animations: Write, Create, FadeIn, FadeOut 
3. Use ONLY these colors (no quotes): BLUE, RED, GREEN, YELLOW, WHITE, ORANGE, PURPLE
4. NO undefined objects like VideoFile, Slider, ImageMobject
5. NO Unicode characters - use LaTeX: \sqrt{} not √, \pm not ±

POSITIONING REQUIREMENTS (CRITICAL):
- Each element MUST have unique position within screen bounds
- SAFE positions only: .to_edge(UP), .shift(UP*1.5), .shift(DOWN*1.5), .shift(LEFT*2.5), .shift(RIGHT*2.5)
- NO extreme shifts: avoid UP*3, DOWN*3, LEFT*4, RIGHT*4 (goes off-screen)
- NO overlapping: if one element uses .shift(UP*1.5), others must use different positions
- Test positions: Title=top, Main=upper center, Secondary=lower center, Sides=left/right

TEMPLATE TO ADAPT:

        # Title at top
        title = Text("{title}").scale(0.8).to_edge(UP, buff=0.5)
        
        # Step equations positioned vertically
        step1 = MathTex(r"{step1}").shift(UP * 2)
        step2 = MathTex(r"{step2}").shift(UP * 0.5)  
        step3 = MathTex(r"{step3}").shift(DOWN * 1)
        
        # Step labels on the right
        label1 = Text("{label1}").scale(0.5).shift(RIGHT * 4 + UP * 2)
        label2 = Text("{label2}").scale(0.5).shift(RIGHT * 4 + UP * 0.5)
        label3 = Text("{label3}").scale(0.5).shift(RIGHT * 4 + DOWN * 1)
        
        # Progressive revelation
        self.play(Write(title))
        self.wait(1)
        self.play(Write(step1))
        self.wait(1)
        self.play(Write(label1))
        self.wait(1)
        self.play(Write(step2))
        self.wait(1)
        self.play(Write(label2))
        self.wait(1)
        self.play(Write(step3))
        self.wait(1)
        self.play(Write(label3))
        self.wait(2)
                

Replace placeholders with scene-specific values and ensure working Manim code.

Generate complete Python code:
SMART POSITIONING REQUIREMENTS:
- Analyze the content TYPE first: equation, diagram, comparison, process
- Position based on content meaning, not just arbitrary rules
- Main subject (equation/diagram) should be CENTER or slightly UP
- Supporting text should be BELOW the main subject
- Comparisons should use LEFT/RIGHT positioning
- Sequential content should use TOP-to-BOTTOM flow
- NEVER fade out main content - only temporary highlights

CAREFULLY IMPLEMENT THIS