import type { LessonMetadata, QuizData } from "../types/lesson";

export const EBRW_LESSONS: LessonMetadata[] = [
  // --- INFORMATION AND IDEAS ---
  {
    id: "ebrw-main-idea",
    title: "Main Idea Across Text Types",
    description:
      "Identifying the author's central claim or purpose in nonfiction, literary fiction, drama, and poetry passages.",
    iconName: "Target",
    color: "teal",
    category: "Information and Ideas",
  },
  {
    id: "ebrw-explicit-meaning",
    title: "Explicit Meaning & Key Details",
    description:
      "Locating directly stated information in nonfiction, literary fiction, and poetry — no inference required.",
    iconName: "BookOpen",
    color: "teal",
    category: "Information and Ideas",
  },
  {
    id: "ebrw-inferences",
    title: "Inferences & Text Completion",
    description:
      "Drawing logical conclusions and selecting sentences that most logically complete a passage's argument.",
    iconName: "BookOpen",
    color: "teal",
    category: "Information and Ideas",
  },
  {
    id: "ebrw-graphic-displays",
    title: "Reading Graphic Displays",
    description:
      "Accurately reading bar graphs, line graphs, and tables — identifying trends, comparing data, and evaluating claims.",
    iconName: "BarChart3",
    color: "teal",
    category: "Information and Ideas",
  },

  // --- CRAFT AND STRUCTURE ---
  {
    id: "ebrw-craft-structure",
    title: "Craft & Structure: Author's Purpose",
    description:
      "Analyzing why an author includes specific details, quotes, or examples — understanding structural choices and rhetorical evaluation.",
    iconName: "Layers",
    color: "fuchsia",
    category: "Craft and Structure",
  },
  {
    id: "ebrw-vocab-precise",
    title: "Vocabulary: Logical & Precise Word Choice",
    description:
      "Selecting the most precise or logically appropriate word to complete a sentence — matching logic, tone, and strength.",
    iconName: "Calculator",
    color: "fuchsia",
    category: "Craft and Structure",
  },
  {
    id: "ebrw-vocab-meaning",
    title: "Vocabulary: Most Nearly Means",
    description:
      "Interpreting words and phrases as used in context — not their dictionary definition. Context always overrides the textbook.",
    iconName: "BookOpen",
    color: "fuchsia",
    category: "Craft and Structure",
  },

  // --- EXPRESSION OF IDEAS ---
  {
    id: "ebrw-expression-ideas",
    title: "Expression of Ideas: Synthesis",
    description:
      "Revising and combining information from notes or two texts, and incorporating evidence to support a specific claim.",
    iconName: "TrendingUp",
    color: "rose",
    category: "Expression of Ideas",
  },
  {
    id: "ebrw-transitions",
    title: "Transitions: Conjunctive Adverbs",
    description:
      "Choosing the right logical connector (however, therefore, furthermore) to improve the effectiveness of written expression.",
    iconName: "Grid",
    color: "rose",
    category: "Expression of Ideas",
  },

  // --- STANDARD ENGLISH CONVENTIONS ---
  {
    id: "ebrw-commas",
    title: "Punctuation: Commas",
    description:
      "Comma rules for FANBOYS, introductory elements, nonessential information, and lists — the most-tested punctuation on the SAT.",
    iconName: "BookOpen",
    color: "purple",
    category: "Standard English Conventions",
  },
  {
    id: "ebrw-semicolons-colons",
    title: "Punctuation: Semicolons & Colons",
    description:
      "Using semicolons to join independent clauses and colons to introduce lists or explanations after a complete sentence.",
    iconName: "BookOpen",
    color: "purple",
    category: "Standard English Conventions",
  },
  {
    id: "ebrw-dashes-apostrophes",
    title: "Punctuation: Dashes, Apostrophes & More",
    description:
      "Em dashes for emphasis, apostrophes for possession and contractions, end marks, and avoiding unnecessary punctuation.",
    iconName: "BookOpen",
    color: "purple",
    category: "Standard English Conventions",
  },
  {
    id: "ebrw-subject-verb",
    title: "Agreement: Subject–Verb",
    description:
      "Finding the true subject and matching the verb — not misled by prepositional phrases, interrupting clauses, or inverted order.",
    iconName: "Scale",
    color: "purple",
    category: "Standard English Conventions",
  },
  {
    id: "ebrw-pronouns",
    title: "Agreement: Pronouns & Confused Words",
    description:
      "Pronoun-antecedent agreement, who vs. whom, and frequently confused pairs: its/it's, their/there/they're, whose/who's.",
    iconName: "BookOpen",
    color: "purple",
    category: "Standard English Conventions",
  },
  {
    id: "ebrw-verbs",
    title: "Parts of Speech: Verbs & Verb Forms",
    description:
      "Tense consistency, past perfect, present perfect, finite vs. nonfinite verbs, irregular forms, and subjunctive mood.",
    iconName: "BookOpen",
    color: "purple",
    category: "Standard English Conventions",
  },
  {
    id: "ebrw-sentence-structure",
    title: "Sentence Structure: Parallelism & Modifiers",
    description:
      "Parallel construction in series and comparisons, and fixing misplaced or dangling modifiers — two of the SAT's top traps.",
    iconName: "Layers",
    color: "purple",
    category: "Standard English Conventions",
  },
];

export const MATH_LESSONS: LessonMetadata[] = [
  // ── ALGEBRA (5 lessons, blue) ──
  {
    id: "alg-linear-eq-1var",
    title: "Linear Equations in One Variable",
    description:
      "Multi-step equations, number of solutions (one, none, infinite), and literal equations.",
    iconName: "Scale",
    color: "blue",
    category: "Algebra",
  },
  {
    id: "alg-linear-eq-2var",
    title: "Linear Equations in Two Variables",
    description:
      "Slope-intercept, point-slope, and standard form. Parallel and perpendicular line relationships.",
    iconName: "Grid",
    color: "blue",
    category: "Algebra",
  },
  {
    id: "alg-linear-functions",
    title: "Linear Functions",
    description:
      "Function notation, interpreting slope and intercepts in context, domain, range, and transformations.",
    iconName: "TrendingUp",
    color: "blue",
    category: "Algebra",
  },
  {
    id: "alg-systems",
    title: "Systems of Linear Equations",
    description:
      "Solving by substitution and elimination. Graphical interpretation and number of solutions.",
    iconName: "Layers",
    color: "blue",
    category: "Algebra",
  },
  {
    id: "alg-linear-inequalities",
    title: "Linear Inequalities",
    description:
      "Solving and graphing inequalities, compound inequalities, and systems of inequalities.",
    iconName: "Target",
    color: "blue",
    category: "Algebra",
  },

  // ── ADVANCED MATH (4 lessons, violet) ──
  {
    id: "adv-equivalent-expr",
    title: "Equivalent Expressions",
    description:
      "Factoring, expanding, combining like terms, rational exponents, and radical simplification.",
    iconName: "Calculator",
    color: "violet",
    category: "Advanced Math",
  },
  {
    id: "adv-nonlinear-eq",
    title: "Nonlinear Equations in One Variable",
    description:
      "Quadratics, completing the square, the discriminant, polynomial and radical equations.",
    iconName: "TrendingUp",
    color: "violet",
    category: "Advanced Math",
  },
  {
    id: "adv-systems-2var",
    title: "Systems of Equations in Two Variables",
    description:
      "Linear-quadratic systems, substitution with nonlinear equations, and graphical solutions.",
    iconName: "Grid",
    color: "violet",
    category: "Advanced Math",
  },
  {
    id: "adv-nonlinear-func",
    title: "Nonlinear Functions",
    description:
      "Quadratic, polynomial, exponential, radical, and rational functions — graphs and behavior.",
    iconName: "Chart",
    color: "violet",
    category: "Advanced Math",
  },

  // ── PROBLEM SOLVING & DATA ANALYSIS (7 lessons, amber) ──
  {
    id: "data-ratios-rates",
    title: "Ratios, Rates & Proportional Relationships",
    description:
      "Ratios, unit rates, proportions, unit conversions, and direct/inverse variation.",
    iconName: "Scale",
    color: "amber",
    category: "Problem Solving & Data Analysis",
  },
  {
    id: "data-percentages",
    title: "Percentages",
    description:
      "Percent change, multi-step percent problems, markup/discount, and compound interest.",
    iconName: "Percent",
    color: "amber",
    category: "Problem Solving & Data Analysis",
  },
  {
    id: "data-one-var",
    title: "One-Variable Data: Distributions & Measures",
    description:
      "Histograms, box plots, mean, median, IQR, standard deviation, and outlier effects.",
    iconName: "BarChart3",
    color: "amber",
    category: "Problem Solving & Data Analysis",
  },
  {
    id: "data-two-var",
    title: "Two-Variable Data: Models & Scatterplots",
    description:
      "Line of best fit, correlation, linear vs. exponential models, and residuals.",
    iconName: "TrendingUp",
    color: "amber",
    category: "Problem Solving & Data Analysis",
  },
  {
    id: "data-probability",
    title: "Probability & Conditional Probability",
    description:
      "Basic probability, two-way tables, conditional probability, and independent events.",
    iconName: "Chart",
    color: "amber",
    category: "Problem Solving & Data Analysis",
  },
  {
    id: "data-sample-stats",
    title: "Inference from Sample Statistics & MOE",
    description:
      "Random sampling, confidence intervals, margin of error, and sample size effects.",
    iconName: "BookOpen",
    color: "amber",
    category: "Problem Solving & Data Analysis",
  },
  {
    id: "data-eval-claims",
    title: "Evaluating Statistical Claims",
    description:
      "Observational vs. experimental studies, causation vs. correlation, confounding, and bias.",
    iconName: "Target",
    color: "amber",
    category: "Problem Solving & Data Analysis",
  },

  // ── GEOMETRY & TRIGONOMETRY (4 lessons, emerald) ──
  {
    id: "geom-area-volume",
    title: "Area & Volume",
    description:
      "Perimeter, area, composite shapes, arc length, sector area, and 3D solid volumes.",
    iconName: "Square",
    color: "emerald",
    category: "Geometry & Trigonometry",
  },
  {
    id: "geom-lines-angles",
    title: "Lines, Angles & Triangles",
    description:
      "Angle relationships, parallel lines, transversals, congruence, similarity, and the Pythagorean theorem.",
    iconName: "Triangle",
    color: "emerald",
    category: "Geometry & Trigonometry",
  },
  {
    id: "geom-right-tri-trig",
    title: "Right Triangles & Trigonometry",
    description:
      "SOH-CAH-TOA, special right triangles (30-60-90, 45-45-90), and complementary angle identities.",
    iconName: "Triangle",
    color: "emerald",
    category: "Geometry & Trigonometry",
  },
  {
    id: "geom-circles",
    title: "Circles",
    description:
      "Standard form equation, completing the square, central and inscribed angles, tangent lines, and chords.",
    iconName: "Circle",
    color: "emerald",
    category: "Geometry & Trigonometry",
  },
];

export const LINEAR_EQ_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "For what value of k does the equation 3(x + 2) = kx + 6 have infinitely many solutions?",
    options: [
      {
        id: "A",
        text: "k = 0",
        isCorrect: false,
        feedback: "Check the coefficient of x.",
      },
      {
        id: "B",
        text: "k = 3",
        isCorrect: true,
        feedback:
          "Correct! Distribute: 3x + 6 = kx + 6. For identity, k must be 3.",
      },
      {
        id: "C",
        text: "k = 6",
        isCorrect: false,
        feedback: "6 is the constant term.",
      },
      {
        id: "D",
        text: "No value",
        isCorrect: false,
        feedback:
          "Infinitely many solutions occur when both sides are identical.",
      },
    ],
    explanation:
      "Distribute left side: 3x + 6. Compare to kx + 6. For equations to be identical (0=0), coefficients must match. k = 3.",
  },
  {
    id: 2,
    question: "Solve for x: 4x - 5 = 2x + 9",
    options: [
      {
        id: "A",
        text: "2",
        isCorrect: false,
        feedback: "Check your subtraction.",
      },
      {
        id: "B",
        text: "7",
        isCorrect: true,
        feedback: "Correct! 2x = 14 => x = 7.",
      },
      {
        id: "C",
        text: "14",
        isCorrect: false,
        feedback: "You forgot to divide by 2.",
      },
      { id: "D", text: "-2", isCorrect: false, feedback: "Sign error." },
    ],
    explanation: "Subtract 2x: 2x - 5 = 9. Add 5: 2x = 14. Divide by 2: x = 7.",
  },
];

export const LINEAR_FUNC_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A gym charges a $50 signup fee plus $30 per month. Which equation represents total cost C after m months?",
    options: [
      {
        id: "A",
        text: "C = 50m + 30",
        isCorrect: false,
        feedback: "You swapped the rate and the fee.",
      },
      {
        id: "B",
        text: "C = 30m + 50",
        isCorrect: true,
        feedback:
          "Correct! Rate (slope) is 30, starting value (intercept) is 50.",
      },
      {
        id: "C",
        text: "C = 30m - 50",
        isCorrect: false,
        feedback: "Fees are added, not subtracted.",
      },
      {
        id: "D",
        text: "C = 80m",
        isCorrect: false,
        feedback: "The fee is one-time, not per month.",
      },
    ],
    explanation:
      "Slope (rate) = $30/month. Y-intercept (start) = $50. Equation: C = 30m + 50.",
  },
  {
    id: 2,
    question: "Find the x-intercept of the line 2x + 5y = 20.",
    options: [
      {
        id: "A",
        text: "10",
        isCorrect: true,
        feedback: "Correct! Set y=0: 2x = 20 => x = 10.",
      },
      {
        id: "B",
        text: "4",
        isCorrect: false,
        feedback: "That's the y-intercept (set x=0).",
      },
      {
        id: "C",
        text: "2",
        isCorrect: false,
        feedback: "Check your division.",
      },
      { id: "D", text: "5", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "To find x-intercept, set y = 0. 2x + 5(0) = 20 => 2x = 20 => x = 10.",
  },
];

export const LINEAR_PARALLEL_PERP_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "The line L has equation 2x - 5y = 10. Which equation represents a line perpendicular to L?",
    options: [
      {
        id: "A",
        text: "y = (2/5)x + 3",
        isCorrect: false,
        feedback: "This is parallel (same slope).",
      },
      {
        id: "B",
        text: "y = (5/2)x - 3",
        isCorrect: false,
        feedback: "Missing negative sign for perpendicular.",
      },
      {
        id: "C",
        text: "y = (-5/2)x + 3",
        isCorrect: true,
        feedback: "Correct! Slope L = 2/5. Perpendicular slope = -5/2.",
      },
      {
        id: "D",
        text: "y = (-2/5)x - 3",
        isCorrect: false,
        feedback: "This is just negative slope, not reciprocal.",
      },
    ],
    explanation:
      "Rewrite L: -5y = -2x + 10 => y = (2/5)x - 2. Slope m = 2/5. Perpendicular slope is negative reciprocal: -5/2.",
  },
  {
    id: 2,
    question:
      "Line A passes through (1, 4) and (5, 2). Line B is perpendicular to Line A. What is the slope of Line B?",
    options: [
      {
        id: "A",
        text: "-1/2",
        isCorrect: false,
        feedback: "This is the slope of Line A.",
      },
      {
        id: "B",
        text: "2",
        isCorrect: true,
        feedback:
          "Correct! Slope A = (2-4)/(5-1) = -2/4 = -1/2. Perp slope = 2.",
      },
      { id: "C", text: "-2", isCorrect: false, feedback: "Check the sign." },
      {
        id: "D",
        text: "1/2",
        isCorrect: false,
        feedback: "Perpendicular slope must be negative reciprocal.",
      },
    ],
    explanation:
      "Slope of A = (2-4)/(5-1) = -2/4 = -1/2. Negative reciprocal of -1/2 is +2.",
  },
];

export const SYSTEMS_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "For what value of k does the system have infinitely many solutions? \n 4x + 6y = 18 \n 2x + 3y = k",
    options: [
      {
        id: "A",
        text: "6",
        isCorrect: false,
        feedback: "This would make the lines parallel but distinct.",
      },
      {
        id: "B",
        text: "9",
        isCorrect: true,
        feedback:
          "Correct! Top equation is exactly 2x the bottom one. 18/2 = 9.",
      },
      { id: "C", text: "12", isCorrect: false, feedback: "Incorrect." },
      { id: "D", text: "36", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "Divide the top equation by 2: 2x + 3y = 9. For the system to be identical to 2x + 3y = k, k must be 9.",
  },
  {
    id: 2,
    question: "Solve the system: 4x - 3y = 1 and 2x + 5y = 29.",
    options: [
      {
        id: "A",
        text: "x=2",
        isCorrect: false,
        feedback: "Try substituting back.",
      },
      { id: "B", text: "x=3", isCorrect: false, feedback: "Incorrect." },
      {
        id: "C",
        text: "x=46/13",
        isCorrect: true,
        feedback: "Correct! (See derivation).",
      },
      { id: "D", text: "x=5", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "Multiplying eq2 by 2: 4x + 10y = 58. Subtract eq1: 13y = 57 -> y = 57/13. Solve x: 4x = 1 + 3(57/13) = 184/13 -> x = 46/13.",
  },
];

export const INEQUALITIES_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "Which point lies in the solution set of: \n 2x + y ≤ 10 \n x - y ≥ 1 \n x,y ≥ 0",
    options: [
      {
        id: "A",
        text: "(3, 6)",
        isCorrect: false,
        feedback: "2(3)+6 = 12, which is NOT ≤ 10.",
      },
      {
        id: "B",
        text: "(4, 2)",
        isCorrect: true,
        feedback: "Correct! 8+2≤10 (True), 4-2≥1 (True).",
      },
      {
        id: "C",
        text: "(5, 5)",
        isCorrect: false,
        feedback: "2(5)+5 = 15 > 10.",
      },
      {
        id: "D",
        text: "(0, 2)",
        isCorrect: false,
        feedback: "0-2 = -2, which is NOT ≥ 1.",
      },
    ],
    explanation:
      "Check point (4,2): 2(4)+2=10 (ok), 4-2=2 (ok). It satisfies all conditions.",
  },
  {
    id: 2,
    question: "Solve |x - 4| ≥ 3",
    options: [
      {
        id: "A",
        text: "[1, 7]",
        isCorrect: false,
        feedback: "This is for |x-4| ≤ 3.",
      },
      {
        id: "B",
        text: "(-∞, 1] U [7, ∞)",
        isCorrect: true,
        feedback: "Correct! x-4 ≥ 3 OR x-4 ≤ -3.",
      },
      {
        id: "C",
        text: "(1, 7)",
        isCorrect: false,
        feedback: "Incorrect bounds.",
      },
      {
        id: "D",
        text: "(-∞, 7] U [1, ∞)",
        isCorrect: false,
        feedback: "Notation doesn't make sense.",
      },
    ],
    explanation:
      "|x - 4| ≥ 3 means x - 4 ≥ 3 (x ≥ 7) OR x - 4 ≤ -3 (x ≤ 1). The union is (-∞, 1] U [7, ∞).",
  },
];

export const LINEAR_TRANSFORMATIONS_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "Let f(x) = -2x + 7. The function g(x) = f(x - 3). Which statement is true?",
    options: [
      {
        id: "A",
        text: "Shifted left 3 units",
        isCorrect: false,
        feedback: "f(x - h) shifts right when h > 0.",
      },
      {
        id: "B",
        text: "Shifted right 3 units",
        isCorrect: true,
        feedback: "Correct! Subtraction inside the input shifts right.",
      },
      {
        id: "C",
        text: "Shifted down 3 units",
        isCorrect: false,
        feedback: "That would be f(x) - 3.",
      },
      {
        id: "D",
        text: "Reflected across y-axis",
        isCorrect: false,
        feedback: "That would be f(-x).",
      },
    ],
    explanation:
      "The transformation f(x - h) shifts the graph horizontally. If h is positive (x - 3), it shifts RIGHT 3 units.",
  },
  {
    id: 2,
    question: "If f(x) = (1/2)x - 4 and g(x) = -2f(x) + 6, what is g(8)?",
    options: [
      {
        id: "A",
        text: "-2",
        isCorrect: false,
        feedback: "Check your evaluation of f(8).",
      },
      {
        id: "B",
        text: "6",
        isCorrect: true,
        feedback: "Correct! f(8) = 4 - 4 = 0. g(8) = -2(0) + 6 = 6.",
      },
      { id: "C", text: "2", isCorrect: false, feedback: "Arithmetic error." },
      { id: "D", text: "10", isCorrect: false, feedback: "Arithmetic error." },
    ],
    explanation:
      "First evaluate f(8): (1/2)(8) - 4 = 4 - 4 = 0. Then plug into g: -2(0) + 6 = 6.",
  },
];

export const CIRCLE_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A circle is given by x² + y² - 4x + 10y + 13 = 0. What are the center and radius?",
    options: [
      {
        id: "A",
        text: "Center (2, -5), radius 4",
        isCorrect: true,
        feedback: "Correct! You completed the square perfectly.",
      },
      {
        id: "B",
        text: "Center (2, -5), radius 2",
        isCorrect: false,
        feedback: "Check your radius calculation. √16 is 4, not 2.",
      },
      {
        id: "C",
        text: "Center (-2, 5), radius 4",
        isCorrect: false,
        feedback: "Watch your signs! (x - h) means h has the opposite sign.",
      },
      {
        id: "D",
        text: "Center (-2, 5), radius 2",
        isCorrect: false,
        feedback: "Incorrect center signs and radius.",
      },
    ],
    explanation:
      "Group terms: (x² - 4x) + (y² + 10y) = -13. Complete squares: (x-2)² + (y+5)² = -13 + 4 + 25 = 16. Center (2, -5), r=4.",
  },
  {
    id: 2,
    question: "For circle (x - 1)² + (y + 2)² = 25, which point lies INSIDE?",
    options: [
      {
        id: "A",
        text: "(6, -2)",
        isCorrect: false,
        feedback: "Distance squared is 25. This point is ON the circle.",
      },
      {
        id: "B",
        text: "(3, 0)",
        isCorrect: true,
        feedback: "Correct! Distance squared is 8, which is < 25.",
      },
      {
        id: "C",
        text: "(1, 4)",
        isCorrect: false,
        feedback: "Distance squared is 36. This point is OUTSIDE (36 > 25).",
      },
      {
        id: "D",
        text: "(-4, -2)",
        isCorrect: false,
        feedback: "Distance squared is 25. This point is ON the circle.",
      },
    ],
    explanation:
      "Calculate D² = (x-1)² + (y+2)². If D² < 25, it is inside. For (3,0), D² = (2)² + (2)² = 8 < 25.",
  },
];

export const CIRCLE_PROP_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "In a circle, an inscribed angle intercepts an arc that measures 148°. What is the measure of the inscribed angle?",
    options: [
      { id: "A", text: "37°", isCorrect: false, feedback: "Too small." },
      {
        id: "B",
        text: "74°",
        isCorrect: true,
        feedback: "Correct! Inscribed angle = 1/2 * Arc.",
      },
      {
        id: "C",
        text: "148°",
        isCorrect: false,
        feedback: "That would be the central angle.",
      },
      {
        id: "D",
        text: "296°",
        isCorrect: false,
        feedback: "Inscribed angles are smaller than the arc.",
      },
    ],
    explanation: "m∠ = 1/2 * m(arc) = 1/2 * 148° = 74°.",
  },
  {
    id: 2,
    question:
      "From point P outside a circle, tangent PT = 12. Secant PAB has PA = 9 (external part). Find length PB (whole secant).",
    options: [
      {
        id: "A",
        text: "16",
        isCorrect: true,
        feedback: "Correct! 12² = 9 * PB.",
      },
      {
        id: "B",
        text: "20",
        isCorrect: false,
        feedback: "Check your algebra.",
      },
      {
        id: "C",
        text: "25",
        isCorrect: false,
        feedback: "Recall PT² = PA * PB.",
      },
      { id: "D", text: "27", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "Tangent-Secant theorem: PT² = PA * PB. 144 = 9 * PB => PB = 16.",
  },
];

export const ANGLES_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "Two parallel lines are cut by a transversal. One angle is (3x + 10)° and the corresponding angle is (5x - 30)°. What is x?",
    options: [
      {
        id: "A",
        text: "10",
        isCorrect: false,
        feedback:
          "Check your algebra: 3(10)+10 = 40, 5(10)-30 = 20. Not equal.",
      },
      {
        id: "B",
        text: "20",
        isCorrect: true,
        feedback: "Correct! 3x + 10 = 5x - 30 → 40 = 2x → x = 20.",
      },
      {
        id: "C",
        text: "15",
        isCorrect: false,
        feedback: "Try setting the equations equal to each other.",
      },
      {
        id: "D",
        text: "12",
        isCorrect: false,
        feedback: "Close, but check the arithmetic steps.",
      },
    ],
    explanation:
      "Corresponding angles are equal. 3x + 10 = 5x - 30. Subtract 3x: 10 = 2x - 30. Add 30: 40 = 2x. x = 20.",
  },
  {
    id: 2,
    question:
      "A regular polygon has each interior angle equal to 156°. How many sides does it have?",
    options: [
      {
        id: "A",
        text: "10",
        isCorrect: false,
        feedback: "Interior angle for n=10 is 144°.",
      },
      {
        id: "B",
        text: "12",
        isCorrect: false,
        feedback: "Interior angle for n=12 is 150°.",
      },
      {
        id: "C",
        text: "15",
        isCorrect: true,
        feedback: "Correct! Exterior = 180-156=24. 360/24 = 15.",
      },
      {
        id: "D",
        text: "18",
        isCorrect: false,
        feedback: "Interior angle for n=18 is 160°.",
      },
    ],
    explanation:
      "Method 1: Exterior angle = 180 - 156 = 24°. Sum of exterior angles is 360°. Number of sides = 360/24 = 15.",
  },
];

export const TRIG_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "In right triangle ABC, C=90° and A=60°. If AC=10 (adjacent to A), what is BC?",
    options: [
      {
        id: "A",
        text: "5",
        isCorrect: false,
        feedback: "Recall tan(60) = √3.",
      },
      { id: "B", text: "5√3", isCorrect: false, feedback: "Check your ratio." },
      {
        id: "C",
        text: "10√3",
        isCorrect: true,
        feedback: "Correct! tan(60) = BC/10 => √3 = BC/10.",
      },
      {
        id: "D",
        text: "20",
        isCorrect: false,
        feedback: "That would be the hypotenuse.",
      },
    ],
    explanation:
      "tan(60°) = opposite/adjacent = BC/10. Since tan(60°) = √3, BC = 10√3.",
  },
  {
    id: 2,
    question: "A sector has radius 8 and central angle 3π/4. What is the area?",
    options: [
      {
        id: "A",
        text: "24π",
        isCorrect: true,
        feedback: "Correct! Area = 1/2 * r² * θ.",
      },
      {
        id: "B",
        text: "48π",
        isCorrect: false,
        feedback: "Check the formula: 1/2 r² θ.",
      },
      { id: "C", text: "64π", isCorrect: false, feedback: "Too high." },
      { id: "D", text: "96π", isCorrect: false, feedback: "Way too high." },
    ],
    explanation:
      "Area = 1/2 * (8)² * (3π/4) = 1/2 * 64 * 3π/4 = 32 * 3π/4 = 8 * 3π = 24π.",
  },
];

export const AREA_VOL_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A square is enlarged so its perimeter is multiplied by 3. By what factor is the area multiplied?",
    options: [
      { id: "A", text: "3", isCorrect: false, feedback: "Area scales by k²." },
      { id: "B", text: "6", isCorrect: false, feedback: "Not 2k." },
      {
        id: "C",
        text: "9",
        isCorrect: true,
        feedback: "Correct! k=3, so Area factor = 3² = 9.",
      },
      {
        id: "D",
        text: "27",
        isCorrect: false,
        feedback: "That would be volume (k³).",
      },
    ],
    explanation:
      "If length scales by k, Area scales by k². Here k=3, so area scales by 9.",
  },
  {
    id: 2,
    question:
      "A solid sphere is scaled so its volume becomes 64 times original. What is the scale factor for the radius?",
    options: [
      { id: "A", text: "2", isCorrect: false, feedback: "2³ = 8, not 64." },
      { id: "B", text: "4", isCorrect: true, feedback: "Correct! 4³ = 64." },
      { id: "C", text: "8", isCorrect: false, feedback: "8³ is much larger." },
      { id: "D", text: "16", isCorrect: false, feedback: "Too big." },
    ],
    explanation: "Volume scales by k³. k³ = 64, so k = ∛64 = 4.",
  },
];

export const SIMILARITY_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "Two right triangles have equal hypotenuses and one pair of equal legs. Are they congruent?",
    options: [
      {
        id: "A",
        text: "No, SSA is invalid.",
        isCorrect: false,
        feedback: "Usually true, but Right Triangles are special.",
      },
      {
        id: "B",
        text: "Yes, by HL Theorem.",
        isCorrect: true,
        feedback:
          "Correct! Hypotenuse-Leg is a valid test for right triangles.",
      },
      {
        id: "C",
        text: "Yes, by SAS.",
        isCorrect: false,
        feedback: "We don't know the angle between them.",
      },
      {
        id: "D",
        text: "No, not enough info.",
        isCorrect: false,
        feedback: "Right angle + Hyp + Leg is sufficient.",
      },
    ],
    explanation:
      "For right triangles, if the Hypotenuse and a Leg match (HL), the triangles are congruent.",
  },
  {
    id: 2,
    question:
      "Two triangles are similar with scale factor 5/2 (larger to smaller). If the smaller area is 24, what is the larger area?",
    options: [
      { id: "A", text: "60", isCorrect: false, feedback: "Area scales by k²." },
      { id: "B", text: "96", isCorrect: false, feedback: "Check your math." },
      {
        id: "C",
        text: "150",
        isCorrect: true,
        feedback: "Correct! 24 * (5/2)² = 24 * 25/4 = 6 * 25 = 150.",
      },
      {
        id: "D",
        text: "150π",
        isCorrect: false,
        feedback: "No pi involved here.",
      },
    ],
    explanation:
      "Area ratio = k² = (5/2)² = 25/4. Large Area = 24 * (25/4) = 150.",
  },
];

// --- DATA ANALYSIS & PROBABILITY QUIZZES ---

export const DATA_REP_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A histogram shows bins [60,70), [70,80), [80,90), [90,100) with frequencies 4, 9, 6, 1. What percent scored at least 80?",
    options: [
      {
        id: "A",
        text: "30%",
        isCorrect: false,
        feedback: "Check your total count.",
      },
      {
        id: "B",
        text: "35%",
        isCorrect: true,
        feedback: "Correct! (6+1)/20 = 7/20 = 35%.",
      },
      {
        id: "C",
        text: "40%",
        isCorrect: false,
        feedback: "That would be 8 students.",
      },
      { id: "D", text: "45%", isCorrect: false, feedback: "Too high." },
    ],
    explanation:
      "Total students = 20. Students ≥ 80 = 6 + 1 = 7. 7/20 = 0.35 = 35%.",
  },
  {
    id: 2,
    question:
      "Box Plot A has a larger Range than B. Does A definitely have a larger Standard Deviation?",
    options: [
      {
        id: "A",
        text: "Yes, Range and SD are proportional.",
        isCorrect: false,
        feedback: "Not necessarily.",
      },
      {
        id: "B",
        text: "No, Range only uses extremes.",
        isCorrect: true,
        feedback:
          "Correct! A could have widely spaced extremes but clustered center.",
      },
      {
        id: "C",
        text: "Yes, because A is wider.",
        isCorrect: false,
        feedback: "Width of extremes doesn't determine clustering.",
      },
      {
        id: "D",
        text: "Only if the medians are equal.",
        isCorrect: false,
        feedback: "Median position doesn't affect spread.",
      },
    ],
    explanation:
      "Range depends only on Max/Min. SD depends on all values. A box plot with outliers could have a huge range but low SD.",
  },
];

export const COLLECTING_DATA_QUIZ: QuizData[] = [
  {
    id: 1,
    question:
      "A student surveys 80 students sitting at one cafeteria table. Which conclusion is best?",
    options: [
      {
        id: "A",
        text: "Results can be generalized to the school.",
        isCorrect: false,
        feedback: "This is a convenience sample.",
      },
      {
        id: "B",
        text: "Results prove lunch extension improves satisfaction.",
        isCorrect: false,
        feedback: "Surveys cannot prove causation.",
      },
      {
        id: "C",
        text: "Results may be biased and should not be generalized.",
        isCorrect: true,
        feedback: "Correct! Convenience samples are not representative.",
      },
      {
        id: "D",
        text: "Results are valid because 80 is a large sample.",
        isCorrect: false,
        feedback: "Sample method matters more than size.",
      },
    ],
    explanation:
      "The sample is a convenience sample (one table), so it may not represent the whole school population. Bias is likely.",
  },
  {
    id: 2,
    question:
      "A researcher randomly assigns 120 students to listen to music or sit in silence while studying. The music group scores higher.",
    options: [
      {
        id: "A",
        text: "Music always improves scores.",
        isCorrect: false,
        feedback: "Too absolute ('always').",
      },
      {
        id: "B",
        text: "Music caused the improvement in this study.",
        isCorrect: true,
        feedback: "Correct! Random assignment supports causal inference.",
      },
      {
        id: "C",
        text: "Results apply to all students everywhere.",
        isCorrect: false,
        feedback:
          "We don't know if the 120 were a random sample of 'everyone'.",
      },
      {
        id: "D",
        text: "No conclusion can be made.",
        isCorrect: false,
        feedback:
          "We can conclude cause-and-effect for the study participants.",
      },
    ],
    explanation:
      "Random assignment creates comparable groups, allowing us to attribute the difference in results to the treatment (music).",
  },
];

export const PROBABILITY_CONTEXT_QUIZ: QuizData[] = [
  {
    id: 1,
    question:
      "A box contains 7 cards: 3 red, 4 blue. Two are drawn WITHOUT replacement. Probability both are red?",
    options: [
      {
        id: "A",
        text: "3/7",
        isCorrect: false,
        feedback: "That's P(Red) for one draw.",
      },
      {
        id: "B",
        text: "9/49",
        isCorrect: false,
        feedback: "That assumes replacement.",
      },
      {
        id: "C",
        text: "1/7",
        isCorrect: true,
        feedback: "Correct! 3/7 * 2/6 = 6/42 = 1/7.",
      },
      { id: "D", text: "5/14", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "P(Red then Red) = P(R1) * P(R2 | R1) = 3/7 * 2/6 = 6/42 = 1/7.",
  },
  {
    id: 2,
    question:
      "Using a table: Bus Riders = 60, Club Members = 66, Bus AND Club = 36. Total = 120. Find P(Club | Bus).",
    options: [
      {
        id: "A",
        text: "36/120",
        isCorrect: false,
        feedback: "That is P(Club AND Bus).",
      },
      {
        id: "B",
        text: "36/60",
        isCorrect: true,
        feedback: "Correct! Restrict denominator to Bus riders.",
      },
      {
        id: "C",
        text: "36/66",
        isCorrect: false,
        feedback: "That is P(Bus | Club).",
      },
      {
        id: "D",
        text: "60/120",
        isCorrect: false,
        feedback: "That is P(Bus).",
      },
    ],
    explanation:
      "Given 'Bus', look only at the 60 bus riders. 36 of them are in a club. 36/60 = 0.6.",
  },
];

export const PERCENTAGES_ADV_QUIZ: QuizData[] = [
  {
    id: 1,
    question:
      "A stock increases from $40 to $52. What is the percent increase?",
    options: [
      { id: "A", text: "20%", isCorrect: false, feedback: "Too low." },
      { id: "B", text: "25%", isCorrect: false, feedback: "Check your math." },
      {
        id: "C",
        text: "30%",
        isCorrect: true,
        feedback: "Correct! (52-40)/40 = 12/40 = 0.30.",
      },
      { id: "D", text: "35%", isCorrect: false, feedback: "Too high." },
    ],
    explanation: "Change = 12. 12 / Original (40) = 0.30 = 30%.",
  },
  {
    id: 2,
    question:
      "An item is marked up 40%, then discounted 25%. What is the overall change?",
    options: [
      {
        id: "A",
        text: "5% increase",
        isCorrect: true,
        feedback: "Correct! 1.40 * 0.75 = 1.05.",
      },
      {
        id: "B",
        text: "5% decrease",
        isCorrect: false,
        feedback: "Increases don't just add.",
      },
      {
        id: "C",
        text: "15% increase",
        isCorrect: false,
        feedback: "Do not subtract the percents directly.",
      },
      {
        id: "D",
        text: "No change",
        isCorrect: false,
        feedback: "1.4 * 0.75 is not 1.",
      },
    ],
    explanation:
      "Multiplier = (1 + 0.40) * (1 - 0.25) = 1.40 * 0.75 = 1.05. This represents a 5% increase.",
  },
];

export const PROPORTIONAL_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A recipe uses flour and sugar in ratio 5:2. If 750g of flour is used, how much sugar is needed?",
    options: [
      {
        id: "A",
        text: "240g",
        isCorrect: false,
        feedback: "Check your multiplier.",
      },
      {
        id: "B",
        text: "300g",
        isCorrect: true,
        feedback: "Correct! 5k=750 => k=150. Sugar = 2k = 300.",
      },
      { id: "C", text: "360g", isCorrect: false, feedback: "Too high." },
      {
        id: "D",
        text: "450g",
        isCorrect: false,
        feedback: "That would be 3:5 roughly.",
      },
    ],
    explanation:
      "Ratio is 5:2. Flour=5k, Sugar=2k. 5k=750 => k=150. Sugar = 2(150) = 300.",
  },
  {
    id: 2,
    question:
      "Convert 54 km/hr to meters/second. (1 km = 1000 m, 1 hr = 3600 s)",
    options: [
      { id: "A", text: "12 m/s", isCorrect: false, feedback: "Too low." },
      {
        id: "B",
        text: "15 m/s",
        isCorrect: true,
        feedback: "Correct! 54 * 1000 / 3600 = 15.",
      },
      {
        id: "C",
        text: "18 m/s",
        isCorrect: false,
        feedback: "Check arithmetic.",
      },
      { id: "D", text: "20 m/s", isCorrect: false, feedback: "Too high." },
    ],
    explanation: "54 * (1000m / 1km) * (1hr / 3600s) = 54000 / 3600 = 15 m/s.",
  },
];

export const TWO_VAR_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "Table: t=0, Q=80; t=1, Q=92; t=2, Q=105.8. Which model fits best?",
    options: [
      {
        id: "A",
        text: "Linear",
        isCorrect: false,
        feedback: "Differences are 12, 13.8 (not constant).",
      },
      {
        id: "B",
        text: "Exponential (1.15)",
        isCorrect: true,
        feedback: "Correct! 92/80 = 1.15, 105.8/92 = 1.15.",
      },
      {
        id: "C",
        text: "Exponential (1.12)",
        isCorrect: false,
        feedback: "Check the ratio.",
      },
      {
        id: "D",
        text: "Exponential (0.85)",
        isCorrect: false,
        feedback: "It's growing, not decaying.",
      },
    ],
    explanation:
      "The ratio of consecutive terms is constant (1.15), so it is Exponential Growth.",
  },
  {
    id: 2,
    question:
      "Line of best fit: y = 1.5x + 4. Point (6, 15). What is the residual?",
    options: [
      { id: "A", text: "-2", isCorrect: false, feedback: "Sign error." },
      {
        id: "B",
        text: "2",
        isCorrect: true,
        feedback: "Correct! Predicted = 1.5(6)+4 = 13. Residual = 15 - 13 = 2.",
      },
      {
        id: "C",
        text: "13",
        isCorrect: false,
        feedback: "That's the predicted value.",
      },
      { id: "D", text: "1", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "Residual = Observed - Predicted. Pred = 9+4=13. Res = 15-13 = 2.",
  },
];

export const CENTER_SPREAD_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A dataset of 12 values has mean 50. One value of 38 is removed and replaced with 62. New mean?",
    options: [
      { id: "A", text: "50", isCorrect: false, feedback: "The sum changed." },
      {
        id: "B",
        text: "52",
        isCorrect: true,
        feedback: "Correct! Sum increased by 24. Mean increases by 24/12 = 2.",
      },
      { id: "C", text: "51", isCorrect: false, feedback: "Close." },
      { id: "D", text: "54", isCorrect: false, feedback: "Too high." },
    ],
    explanation:
      "Original Sum = 600. New Sum = 600 - 38 + 62 = 624. New Mean = 624/12 = 52.",
  },
  {
    id: 2,
    question:
      "Median 20, Range 18. Add constant 7 to all values. What changes?",
    options: [
      {
        id: "A",
        text: "Median +7, Range +7",
        isCorrect: false,
        feedback: "Range (spread) does not change with addition.",
      },
      {
        id: "B",
        text: "Median +7, Range same",
        isCorrect: true,
        feedback: "Correct! Center shifts, spread stays constant.",
      },
      {
        id: "C",
        text: "Median same, Range +7",
        isCorrect: false,
        feedback: "Incorrect.",
      },
      {
        id: "D",
        text: "Both same",
        isCorrect: false,
        feedback: "Median shifts.",
      },
    ],
    explanation:
      "Adding a constant shifts the data values (Median + 7) but does not affect the spread (Range stays same).",
  },
];

export const RATIOS_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A map scale is 1 cm : 5 km. If two towns are 8 cm apart on the map, what is the actual distance?",
    options: [
      {
        id: "A",
        text: "13 km",
        isCorrect: false,
        feedback: "Check your operation.",
      },
      {
        id: "B",
        text: "40 km",
        isCorrect: true,
        feedback: "Correct! 8 * 5 = 40.",
      },
      { id: "C", text: "400 km", isCorrect: false, feedback: "Too high." },
      { id: "D", text: "1.6 km", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation: "8 cm * 5 km/cm = 40 km.",
  },
  {
    id: 2,
    question:
      "In a concrete mix, the ratio of sand to cement is 3:1. If 12 kg of cement are used, how much sand is needed?",
    options: [
      {
        id: "A",
        text: "4 kg",
        isCorrect: false,
        feedback: "Sand is the larger part (3 parts).",
      },
      { id: "B", text: "12 kg", isCorrect: false, feedback: "That's 1:1." },
      {
        id: "C",
        text: "36 kg",
        isCorrect: true,
        feedback: "Correct! Sand = 3 * 12 = 36.",
      },
      {
        id: "D",
        text: "48 kg",
        isCorrect: false,
        feedback: "That's the total weight.",
      },
    ],
    explanation: "Ratio 3:1 means Sand = 3 * Cement. 3 * 12 = 36 kg.",
  },
];

export const DISTRIBUTIONS_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question: "Which statistic is most resistant to outliers?",
    options: [
      {
        id: "A",
        text: "Mean",
        isCorrect: false,
        feedback: "Mean is easily pulled by outliers.",
      },
      {
        id: "B",
        text: "Median",
        isCorrect: true,
        feedback:
          "Correct! The middle value doesn't change much with extremes.",
      },
      {
        id: "C",
        text: "Range",
        isCorrect: false,
        feedback: "Range depends entirely on the extremes.",
      },
      {
        id: "D",
        text: "Standard Deviation",
        isCorrect: false,
        feedback: "SD depends on distance from mean, so it is affected.",
      },
    ],
    explanation:
      "The median is the middle value and is not affected by the magnitude of extreme values (outliers).",
  },
  {
    id: 2,
    question:
      "In a left-skewed distribution (tail to the left), how do mean and median compare?",
    options: [
      {
        id: "A",
        text: "Mean < Median",
        isCorrect: true,
        feedback: "Correct! Low outliers pull the mean down.",
      },
      {
        id: "B",
        text: "Mean > Median",
        isCorrect: false,
        feedback: "That's right-skewed.",
      },
      {
        id: "C",
        text: "Mean = Median",
        isCorrect: false,
        feedback: "That's symmetric.",
      },
      {
        id: "D",
        text: "No relationship",
        isCorrect: false,
        feedback: "Skewness defines the relationship.",
      },
    ],
    explanation:
      "Left skew means there are low outliers/values. These pull the average (mean) down below the median.",
  },
];

export const INFERENCES_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A poll shows a candidate at 52% with a margin of error of ±3%. Does this confirm they are winning (>50%)?",
    options: [
      {
        id: "A",
        text: "Yes, 52 > 50.",
        isCorrect: false,
        feedback: "Consider the lower bound.",
      },
      {
        id: "B",
        text: "No, the interval includes 50% or less.",
        isCorrect: true,
        feedback: "Correct! Interval is 49% to 55%.",
      },
      {
        id: "C",
        text: "Yes, majority rules.",
        isCorrect: false,
        feedback: "Not statistically significant yet.",
      },
      {
        id: "D",
        text: "No, margin of error is too small.",
        isCorrect: false,
        feedback: "Irrelevant logic.",
      },
    ],
    explanation:
      "Interval is 49% to 55%. Since 50% or less is possible (49%), we cannot be confident they are winning.",
  },
  {
    id: 2,
    question:
      "Group A mean = 20 (CI: 18-22). Group B mean = 25 (CI: 23-27). Are they significantly different?",
    options: [
      {
        id: "A",
        text: "No, they are close.",
        isCorrect: false,
        feedback: "Look at the intervals.",
      },
      {
        id: "B",
        text: "Yes, intervals do not overlap.",
        isCorrect: true,
        feedback: "Correct! Max of A (22) < Min of B (23).",
      },
      {
        id: "C",
        text: "No, standard deviations are unknown.",
        isCorrect: false,
        feedback: "CI accounts for variation.",
      },
      {
        id: "D",
        text: "Yes, because means are different.",
        isCorrect: false,
        feedback: "Difference must be greater than error.",
      },
    ],
    explanation:
      "The confidence intervals (18-22 and 23-27) do not overlap, suggesting a significant difference.",
  },
];

export const PERCENTAGES_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question: "What is 15% of 60?",
    options: [
      { id: "A", text: "6", isCorrect: false, feedback: "That's 10%." },
      {
        id: "B",
        text: "9",
        isCorrect: true,
        feedback: "Correct! 0.15 * 60 = 9.",
      },
      { id: "C", text: "12", isCorrect: false, feedback: "That's 20%." },
      { id: "D", text: "90", isCorrect: false, feedback: "Decimal error." },
    ],
    explanation: "10% is 6, 5% is 3. 15% is 6 + 3 = 9.",
  },
  {
    id: 2,
    question: "25 is what percent of 125?",
    options: [
      {
        id: "A",
        text: "20%",
        isCorrect: true,
        feedback: "Correct! 25/125 = 1/5 = 0.20.",
      },
      {
        id: "B",
        text: "25%",
        isCorrect: false,
        feedback: "Check the denominator.",
      },
      { id: "C", text: "5%", isCorrect: false, feedback: "Too low." },
      { id: "D", text: "12.5%", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation: "25 / 125 = 1 / 5 = 0.20 = 20%.",
  },
];

export const PROBABILITY_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question: "A bag has 3 red and 2 blue marbles. Probability of picking red?",
    options: [
      { id: "A", text: "2/5", isCorrect: false, feedback: "That's blue." },
      {
        id: "B",
        text: "3/5",
        isCorrect: true,
        feedback: "Correct! 3 red out of 5 total.",
      },
      {
        id: "C",
        text: "3/2",
        isCorrect: false,
        feedback: "Probabilities cannot exceed 1.",
      },
      { id: "D", text: "1/5", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation: "Total marbles = 5. Red = 3. P(Red) = 3/5.",
  },
  {
    id: 2,
    question: "Flip a coin twice. Probability of two Heads?",
    options: [
      {
        id: "A",
        text: "1/2",
        isCorrect: false,
        feedback: "That's for one flip.",
      },
      {
        id: "B",
        text: "1/4",
        isCorrect: true,
        feedback: "Correct! 1/2 * 1/2 = 1/4.",
      },
      {
        id: "C",
        text: "1/3",
        isCorrect: false,
        feedback: "Outcomes are HH, HT, TH, TT.",
      },
      {
        id: "D",
        text: "1/8",
        isCorrect: false,
        feedback: "That's for three flips.",
      },
    ],
    explanation: "Independent events: P(H) * P(H) = 0.5 * 0.5 = 0.25.",
  },
];
export const TRIG_ADVANCED_QUIZ_DATA: QuizData[] = [
  {
    id: 3,
    question:
      "In right triangle PQR, angle R = 90°, angle P = 38°. Which expression gives the length of PQ if PR = 12?",
    options: [
      {
        id: "A",
        text: "12 / cos(38°)",
        isCorrect: true,
        feedback:
          "Correct! cos(38°) = adjacent/hypotenuse = PR/PQ, so PQ = PR/cos(38°).",
      },
      {
        id: "B",
        text: "12 × cos(38°)",
        isCorrect: false,
        feedback: "This gives the adjacent side, not the hypotenuse.",
      },
      {
        id: "C",
        text: "12 / sin(38°)",
        isCorrect: false,
        feedback: "sin(38°) uses the opposite side, not PR.",
      },
      {
        id: "D",
        text: "12 × tan(38°)",
        isCorrect: false,
        feedback: "Tangent uses opposite/adjacent, not hypotenuse.",
      },
    ],
    explanation:
      "cos(P) = adjacent/hypotenuse = PR/PQ. So PQ = PR/cos(38°) = 12/cos(38°).",
  },
  {
    id: 4,
    question: "sin(x) = cos(52°). What is the value of x?",
    options: [
      {
        id: "A",
        text: "52°",
        isCorrect: false,
        feedback: "sin(52°) = cos(38°), not cos(52°).",
      },
      {
        id: "B",
        text: "38°",
        isCorrect: true,
        feedback: "Correct! sin(x) = cos(90° − x), so x = 90° − 52° = 38°.",
      },
      { id: "C", text: "128°", isCorrect: false, feedback: "Incorrect." },
      { id: "D", text: "48°", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "Co-function identity: sin(x) = cos(90° − x). Setting 90° − x = 52° gives x = 38°.",
  },
];

export const SYSTEMS_ADVANCED_QUIZ_DATA: QuizData[] = [
  {
    id: 3,
    question:
      "The system kx + 2y = 6 and 3x + ky = 9 has no solution. What is the value of k?",
    options: [
      { id: "A", text: "−√6", isCorrect: false, feedback: "Incorrect." },
      {
        id: "B",
        text: "√6",
        isCorrect: true,
        feedback:
          "Correct! For no solution: k/3 = 2/k but k²/6 ≠ 1. k/3 = 2/k → k² = 6 → k = √6.",
      },
      {
        id: "C",
        text: "3",
        isCorrect: false,
        feedback:
          "k=3 gives k/3=1 and 2/k=2/3. Those aren't equal, so check again.",
      },
      { id: "D", text: "6", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "For no solution (parallel lines), ratios of coefficients must be equal: k/3 = 2/k. Cross multiply: k² = 6, so k = √6.",
  },
  {
    id: 4,
    question: "What is the value of 3x − y if 2x + y = 14 and x − 2y = −2?",
    options: [
      { id: "A", text: "8", isCorrect: false, feedback: "Incorrect." },
      {
        id: "B",
        text: "10",
        isCorrect: false,
        feedback: "Correct! Adding the equations: 3x − y = 12.",
      },
      {
        id: "C",
        text: "12",
        isCorrect: true,
        feedback: "Correct! Adding the equations: 3x − y = 12.",
      },
      { id: "D", text: "16", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "Adding the two equations: (2x+y) + (x−2y) = 14+(−2) → 3x−y = 12.",
  },
];

export const GEOMETRY_MIXED_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A cylinder has radius 3 and height 8. A cone has the same radius and height. What is the ratio of the cone's volume to the cylinder's volume?",
    options: [
      { id: "A", text: "1/4", isCorrect: false, feedback: "Not 1/4." },
      {
        id: "B",
        text: "1/3",
        isCorrect: true,
        feedback:
          "Correct! V_cone = (1/3)πr²h. Ratio = (1/3)πr²h / πr²h = 1/3.",
      },
      { id: "C", text: "2/3", isCorrect: false, feedback: "Incorrect." },
      { id: "D", text: "3/4", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation: "V_cylinder = πr²h. V_cone = (1/3)πr²h. Ratio = 1/3.",
  },
  {
    id: 2,
    question:
      "Two similar triangles have areas 16 cm² and 100 cm². What is the ratio of their corresponding side lengths?",
    options: [
      {
        id: "A",
        text: "4:10",
        isCorrect: true,
        feedback: "Correct! Area ratio = k². 16:100 → k = √(16/100) = 4/10.",
      },
      {
        id: "B",
        text: "16:100",
        isCorrect: false,
        feedback: "That's the area ratio, not the side ratio.",
      },
      {
        id: "C",
        text: "2:5",
        isCorrect: false,
        feedback: "Close — 4:10 simplifies to 2:5. Both are correct.",
      },
      { id: "D", text: "4:25", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "Area scales as k². k² = 16/100, so k = 4/10 = 2/5. Side ratio is 2:5 (or 4:10).",
  },
];

export const ADV_EXPONENTIAL_QUIZ: QuizData[] = [
  {
    id: 1,
    question:
      "A bacteria culture starts with 500 cells and increases by 18% every hour. Which function models the number of cells N(t)?",
    options: [
      {
        id: "A",
        text: "N(t) = 500(1.18)^t",
        isCorrect: true,
        feedback: "Correct! Growth factor is 1 + 0.18.",
      },
      {
        id: "B",
        text: "N(t) = 500(0.82)^t",
        isCorrect: false,
        feedback: "That represents 18% decay.",
      },
      {
        id: "C",
        text: "N(t) = 500 + 0.18t",
        isCorrect: false,
        feedback: "This is linear growth.",
      },
      {
        id: "D",
        text: "N(t) = 500(18)^t",
        isCorrect: false,
        feedback: "18 would mean 1700% growth.",
      },
    ],
    explanation:
      "Initial value a = 500. Growth rate r = 0.18. Multiplier b = 1 + r = 1.18. Function: 500(1.18)^t.",
  },
  {
    id: 2,
    question:
      "The graph of f(x) = a(b)^x passes through (0, 5) and (2, 20). What is the value of b?",
    options: [
      {
        id: "A",
        text: "2",
        isCorrect: true,
        feedback: "Correct! 5 * b² = 20 -> b² = 4 -> b = 2.",
      },
      {
        id: "B",
        text: "4",
        isCorrect: false,
        feedback: "b² = 4, so b must be 2.",
      },
      { id: "C", text: "√2", isCorrect: false, feedback: "Too small." },
      { id: "D", text: "1.5", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "f(0) = a = 5. f(2) = 5(b)² = 20. b² = 4. Since b > 0 for exponentials, b = 2.",
  },
];

export const ADV_POLYNOMIAL_QUIZ: QuizData[] = [
  {
    id: 1,
    question:
      "Which function could represent a polynomial whose graph falls to the left and rises to the right?",
    options: [
      {
        id: "A",
        text: "f(x) = x⁴ - 3x²",
        isCorrect: false,
        feedback: "Even degree: ends go same direction.",
      },
      {
        id: "B",
        text: "f(x) = -x³ + 2x",
        isCorrect: false,
        feedback: "Negative odd: rises left, falls right.",
      },
      {
        id: "C",
        text: "f(x) = 2x³ - x",
        isCorrect: true,
        feedback: "Correct! Odd degree, positive coefficient.",
      },
      {
        id: "D",
        text: "f(x) = -3x² + 5",
        isCorrect: false,
        feedback: "Even degree.",
      },
    ],
    explanation:
      "Falls left, Rises right => Odd Degree and Positive Leading Coefficient. Only 2x³ fits.",
  },
  {
    id: 2,
    question: "Let P(x) = (x - 1)²(x + 2). What does the graph do at x = 1?",
    options: [
      {
        id: "A",
        text: "Crosses the x-axis",
        isCorrect: false,
        feedback: "Odd multiplicity crosses.",
      },
      {
        id: "B",
        text: "Touches the x-axis",
        isCorrect: true,
        feedback: "Correct! Even multiplicity (2) touches and turns.",
      },
      {
        id: "C",
        text: "Has a vertical asymptote",
        isCorrect: false,
        feedback: "Polynomials don't have asymptotes.",
      },
      {
        id: "D",
        text: "Has a hole",
        isCorrect: false,
        feedback: "No division involved.",
      },
    ],
    explanation:
      "The factor (x-1) has an exponent of 2 (even multiplicity). Graphs touch the axis at roots with even multiplicity.",
  },
];

export const ADV_RATIONAL_QUIZ: QuizData[] = [
  {
    id: 1,
    question: "Solve: √(2x - 1) = x - 2",
    options: [
      { id: "A", text: "1", isCorrect: false, feedback: "Extraneous." },
      {
        id: "B",
        text: "5",
        isCorrect: true,
        feedback: "Correct! √(9) = 3, 5-2 = 3.",
      },
      {
        id: "C",
        text: "1 and 5",
        isCorrect: false,
        feedback: "1 is extraneous.",
      },
      { id: "D", text: "No solution", isCorrect: false, feedback: "5 works." },
    ],
    explanation:
      "Square both sides: 2x-1 = (x-2)². 2x-1 = x²-4x+4. x²-6x+5=0. (x-5)(x-1)=0. Check x=1: √1 = 1, but 1-2 = -1. Fail. Check x=5: √9=3, 5-2=3. Success.",
  },
  {
    id: 2,
    question:
      "f(x) = (x² - 1) / (x² - 2x + 1). Describe the discontinuity at x = 1.",
    options: [
      {
        id: "A",
        text: "Hole",
        isCorrect: false,
        feedback: "Check remaining factors.",
      },
      {
        id: "B",
        text: "Vertical Asymptote",
        isCorrect: true,
        feedback:
          "Correct! One factor cancels, but one remains in denominator.",
      },
      {
        id: "C",
        text: "Horizontal Asymptote",
        isCorrect: false,
        feedback: "That's end behavior.",
      },
      {
        id: "D",
        text: "Continuous",
        isCorrect: false,
        feedback: "Denominator is 0.",
      },
    ],
    explanation:
      "Numerator: (x-1)(x+1). Denominator: (x-1)(x-1). One (x-1) cancels, but one remains in the bottom. Remaining denominator zero = Vertical Asymptote.",
  },
];

export const EQUIVALENT_EXPR_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "The expression 6x² + 11x + 3 can be factored as (3x + 1)(2x + 3). What is the value of 6x² + 11x + 3 when x = -1/3?",
    options: [
      {
        id: "A",
        text: "0",
        isCorrect: true,
        feedback: "Correct! If a factor is zero, the product is zero.",
      },
      {
        id: "B",
        text: "1",
        isCorrect: false,
        feedback: "Plug x = -1/3 into (3x+1).",
      },
      {
        id: "C",
        text: "-1",
        isCorrect: false,
        feedback: "Check your substitution.",
      },
      { id: "D", text: "3", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "Substitute x = -1/3 into the factor (3x + 1): 3(-1/3) + 1 = -1 + 1 = 0. Since one factor is 0, the entire expression is 0.",
  },
  {
    id: 2,
    question:
      "Factor x⁴ - 13x² + 36 completely. Which is the fully factored form?",
    options: [
      {
        id: "A",
        text: "(x² - 4)(x² - 9)",
        isCorrect: false,
        feedback: "Not fully factored. You can go further.",
      },
      {
        id: "B",
        text: "(x - 4)(x - 9)",
        isCorrect: false,
        feedback: "Incorrect structure.",
      },
      {
        id: "C",
        text: "(x² - 6)(x² - 7)",
        isCorrect: false,
        feedback: "Does not multiply to 36.",
      },
      {
        id: "D",
        text: "(x - 2)(x + 2)(x - 3)(x + 3)",
        isCorrect: true,
        feedback: "Correct! Difference of squares applied twice.",
      },
    ],
    explanation:
      "Let u = x². u² - 13u + 36 factors to (u-4)(u-9). Substitute x² back: (x²-4)(x²-9). Factor further: (x-2)(x+2)(x-3)(x+3).",
  },
  {
    id: 3,
    question: "If k is a constant and (3x - 2)/5 = k, what is x in terms of k?",
    options: [
      {
        id: "A",
        text: "(5k - 2)/3",
        isCorrect: false,
        feedback: "Sign error on the 2.",
      },
      {
        id: "B",
        text: "(5k + 2)/3",
        isCorrect: true,
        feedback: "Correct! Multiply by 5, then add 2, then divide by 3.",
      },
      {
        id: "C",
        text: "(3k + 2)/5",
        isCorrect: false,
        feedback: "Incorrect operations.",
      },
      {
        id: "D",
        text: "(3k - 2)/5",
        isCorrect: false,
        feedback: "Incorrect operations.",
      },
    ],
    explanation:
      "Multiply by 5: 3x - 2 = 5k. Add 2: 3x = 5k + 2. Divide by 3: x = (5k + 2)/3.",
  },
  {
    id: 4,
    question:
      "For constants a and b, y = a/x + b. What is x in terms of y, a, b?",
    options: [
      {
        id: "A",
        text: "x = a / (y - b)",
        isCorrect: true,
        feedback: "Correct! Isolate the term with x first.",
      },
      {
        id: "B",
        text: "x = a / (y + b)",
        isCorrect: false,
        feedback: "Sign error.",
      },
      {
        id: "C",
        text: "x = (y - b) / a",
        isCorrect: false,
        feedback: "Reciprocal error.",
      },
      {
        id: "D",
        text: "x = (y + b) / a",
        isCorrect: false,
        feedback: "Incorrect.",
      },
    ],
    explanation:
      "y - b = a/x. Multiply by x: x(y - b) = a. Divide by (y - b): x = a / (y - b).",
  },
  {
    id: 5,
    question:
      "The expression (x - 3)(x + k) is equivalent to x² + 2x - 15. What is k?",
    options: [
      {
        id: "A",
        text: "-5",
        isCorrect: false,
        feedback: "Check the linear term.",
      },
      {
        id: "B",
        text: "-3",
        isCorrect: false,
        feedback: "Check the constant term.",
      },
      { id: "C", text: "2", isCorrect: false, feedback: "Incorrect." },
      {
        id: "D",
        text: "5",
        isCorrect: true,
        feedback: "Correct! -3 + k = 2 -> k = 5.",
      },
    ],
    explanation:
      "Expand: x² + kx - 3x - 3k = x² + (k-3)x - 3k. Match x coefficient: k - 3 = 2 => k = 5. Check constant: -3(5) = -15.",
  },
  {
    id: 6,
    question:
      "Let P(x) = x³ + ax² + bx + 4. When P(x) is divided by x - 1, the remainder is 6. What is a + b?",
    options: [
      {
        id: "A",
        text: "-1",
        isCorrect: false,
        feedback: "Check your systems.",
      },
      { id: "B", text: "0", isCorrect: false, feedback: "Incorrect." },
      {
        id: "C",
        text: "1",
        isCorrect: true,
        feedback: "Correct! P(1)=6 leads to a+b=1.",
      },
      { id: "D", text: "2", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation: "P(1) = 1+a+b+4 = 6 => a+b=1.",
  },
  {
    id: 7,
    question: "Simplify: √50 - √8 + √18",
    options: [
      {
        id: "A",
        text: "3√2",
        isCorrect: false,
        feedback: "Check your simplification of √50.",
      },
      { id: "B", text: "4√2", isCorrect: false, feedback: "Incorrect." },
      {
        id: "C",
        text: "5√2",
        isCorrect: false,
        feedback: "Close, but check arithmetic.",
      },
      {
        id: "D",
        text: "6√2",
        isCorrect: true,
        feedback: "Correct! 5√2 - 2√2 + 3√2 = 6√2.",
      },
    ],
    explanation: "√50 = 5√2. √8 = 2√2. √18 = 3√2. 5√2 - 2√2 + 3√2 = 6√2.",
  },
];

export const QUADRATIC_EQ_QUIZ_DATA: QuizData[] = [
  {
    id: 1,
    question:
      "A quadratic function has vertex (3, 1) and passes through (1, 9). Which equation represents it?",
    options: [
      {
        id: "A",
        text: "y = 4(x - 3)² + 1",
        isCorrect: false,
        feedback: "Check the 'a' value.",
      },
      {
        id: "B",
        text: "y = 2(x + 3)² + 1",
        isCorrect: false,
        feedback: "Vertex x is positive.",
      },
      {
        id: "C",
        text: "y = 2(x - 3)² + 1",
        isCorrect: true,
        feedback: "Correct! 9 = a(1-3)² + 1 => 8=4a => a=2.",
      },
      {
        id: "D",
        text: "y = -2(x - 3)² + 1",
        isCorrect: false,
        feedback: "Parabola must open up to hit (1,9) from (3,1).",
      },
    ],
    explanation:
      "Vertex form: y = a(x-3)² + 1. Plug in (1,9): 9 = a(-2)² + 1 => 8 = 4a => a = 2.",
  },
  {
    id: 2,
    question:
      "A quadratic has zeros at x = 2 and x = 10. What is the x-coordinate of the vertex?",
    options: [
      {
        id: "A",
        text: "6",
        isCorrect: true,
        feedback: "Correct! Axis of symmetry is the midpoint of zeros.",
      },
      { id: "B", text: "4", isCorrect: false, feedback: "Incorrect." },
      { id: "C", text: "8", isCorrect: false, feedback: "Incorrect." },
      { id: "D", text: "12", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "The axis of symmetry is halfway between roots: (2 + 10) / 2 = 6.",
  },
  {
    id: 3,
    question:
      "For what value of k does x² - 6x + k = 0 have exactly one real solution?",
    options: [
      {
        id: "A",
        text: "8",
        isCorrect: false,
        feedback: "Discriminant would be positive.",
      },
      {
        id: "B",
        text: "9",
        isCorrect: true,
        feedback: "Correct! Discriminant b²-4ac must be 0.",
      },
      {
        id: "C",
        text: "10",
        isCorrect: false,
        feedback: "Discriminant would be negative.",
      },
      {
        id: "D",
        text: "12",
        isCorrect: false,
        feedback: "Discriminant would be negative.",
      },
    ],
    explanation: "b² - 4ac = 0 => (-6)² - 4(1)(k) = 0 => 36 - 4k = 0 => k = 9.",
  },
  {
    id: 4,
    question: "If x² + 4x - 12 = 0, what is the value of x² + 4x?",
    options: [
      { id: "A", text: "-12", isCorrect: false, feedback: "Incorrect sign." },
      { id: "B", text: "0", isCorrect: false, feedback: "Incorrect." },
      { id: "C", text: "4", isCorrect: false, feedback: "Incorrect." },
      {
        id: "D",
        text: "12",
        isCorrect: true,
        feedback: "Correct! Just add 12 to both sides.",
      },
    ],
    explanation:
      "Structure: The equation is (x² + 4x) - 12 = 0. So x² + 4x = 12.",
  },
  {
    id: 5,
    question:
      "What is the sum of the x-coordinates of the solutions to the system: y = x² - 4x + 1 and y = 3x - 5?",
    options: [
      { id: "A", text: "1", isCorrect: false, feedback: "Incorrect." },
      {
        id: "B",
        text: "4",
        isCorrect: false,
        feedback: "That's -b/a of the first quadratic.",
      },
      {
        id: "C",
        text: "7",
        isCorrect: true,
        feedback: "Correct! Set equal, get x² - 7x + 6 = 0. Sum = 7.",
      },
      { id: "D", text: "8", isCorrect: false, feedback: "Incorrect." },
    ],
    explanation:
      "x² - 4x + 1 = 3x - 5 => x² - 7x + 6 = 0. Factor (x-1)(x-6). Roots 1, 6. Sum = 7.",
  },
  {
    id: 6,
    question:
      "The graph of g(x) = 2(x - 3)² - 4 is obtained from f(x) = x². Which describes the transformation?",
    options: [
      {
        id: "A",
        text: "Left 3, Down 4, Wider",
        isCorrect: false,
        feedback: "x-3 means Right 3.",
      },
      {
        id: "B",
        text: "Right 3, Down 4, Narrower",
        isCorrect: true,
        feedback: "Correct! a=2 makes it steeper (narrower).",
      },
      {
        id: "C",
        text: "Right 3, Up 4, Narrower",
        isCorrect: false,
        feedback: "-4 means Down.",
      },
      {
        id: "D",
        text: "Left 3, Down 4, Narrower",
        isCorrect: false,
        feedback: "x-3 means Right 3.",
      },
    ],
    explanation:
      "(x-3) is Right 3. -4 is Down 4. Factor 2 is vertical stretch (narrower).",
  },
];
