"use client"
import { ExamStrategyCard } from "@/components/AI/ExamStrategyCard"
import { StudyTimeOptimizationCard } from "@/components/AI/StudyTimeOptimizationCard"
import { Card, CardContent } from "@/components/ui/card"
import { Zap, Clock, Target, Lightbulb, CheckCircle2, AlertTriangle, TrendingUp } from "lucide-react"
import { useActiveUser, isDemoUser } from "@/hooks/useActiveUser"
const DEMO_NEG_MARKING_DATA = [
{ subject: "Physics", attempts: 30, negMarks: 12, accuracy: 60 },
{ subject: "Chemistry", attempts: 35, negMarks: 7, accuracy: 80 },
{ subject: "Maths / Biology", attempts: 28, negMarks: 10, accuracy: 64 },
]
const ZERO_NEG_MARKING_DATA = [
{ subject: "Physics", attempts: 0, negMarks: 0, accuracy: 0 },
{ subject: "Chemistry", attempts: 0, negMarks: 0, accuracy: 0 },
{ subject: "Maths / Biology", attempts: 0, negMarks: 0, accuracy: 0 },
]
export default function StrategyPage() {
const { userId } = useActiveUser()
const isDemo = isDemoUser(userId)
const negMarkingData = isDemo ? DEMO_NEG_MARKING_DATA : ZERO_NEG_MARKING_DATA
return (
{/* Page Header */}
Exam Strategy & Time Optimization
Master time allocation per question, eliminate negative marking traps, and fine-tune your subject sequence for maximum score yield.
AI Powered
{/* KPI Strip */}
{[
{ label: "Time Per Question", value: isDemo ? "45 sec" : "-- sec", note: isDemo ? "Target: 38 sec" : "Not calibrated", icon:
, color: "border-red-400/20 bg-red-400/5" },
{ label: "Negative Marks Lost", value: isDemo ? "−29" : "0", note: isDemo ? "Last mock test" : "0 negative marks", icon:
, color: "border-amber-400/20 bg-amber-400/5" },
{ label: "Attempted Questions", value: isDemo ? "93 / 120" : "0 / 120", note: isDemo ? "+7 vs last test" : "0 attempted", icon:
, color: "border-[#00F0FF]/20 bg-[#00F0FF]/5" },
{ label: "Score Yield", value: isDemo ? "214" : "0", note: isDemo ? "Predicted score" : "Baseline", icon:
, color: "border-green-400/20 bg-green-400/5" },
].map((kpi) => (
{kpi.icon}
{kpi.value}
{kpi.label}
{kpi.note}
))}
{/* Main Cards Row */}
Subject Sequence Strategy
Daily Peak Hours Analysis
{/* Negative Marking Analysis */}
Negative Marking Analysis
{isDemo ? "Last Mock Test · Aug 1" : "Day 1 Initializing"}
{negMarkingData.map((row) => (
{row.subject}
{row.negMarks === 0 ? "0" : `−${row.negMarks}`}
Neg. Marks
Accuracy
= 75 ? "text-green-400" : row.accuracy >= 60 ? "text-amber-400" : row.accuracy === 0 ? "text-muted-foreground" : "text-red-400"}>
{row.accuracy}%
= 75 ? "bg-green-400" : row.accuracy >= 60 ? "bg-amber-400" : isDemo ? "bg-red-400" : "bg-white/10"}`}
style={{ width: `${row.accuracy}%` }}
/>
))}
Insight: {isDemo ? (
<>You're losing ~29 marks to wrong answers. Switching to "skip and revisit" for uncertain Physics questions could recover 15–20 marks.>
) : (
<>Complete your first mock test or timed DPP to calculate your negative marking profile and fine-tune your subject pacing.>
)}
{/* Strategy Tips */}
AI Strategy Recommendations
{[
{ tip: "Start with Chemistry (highest accuracy) to build momentum and bank easy marks in the first 40 minutes.", color: "text-green-400", label: "Opening Strategy" },
{ tip: "Attempt Physics only if you are 80%+ confident per question. Otherwise, mark and skip — recover in last 10 min buffer.", color: "text-red-400", label: "Physics Guard" },
{ tip: "Reserve 10–15 minutes at the end to revisit starred questions. Your review accuracy is historically 20% higher than first-attempt.", color: "text-[#00F0FF]", label: "Review Window" },
].map((s) => (
))}
)
}