import SwiftUI

struct DailyThinkingPage: View {
    @State private var answer = ""; @State private var submitted = false
    var body: some View {
        ZStack { Color.zxBg0.ignoresSafeArea()
            ScrollView { VStack(spacing: 16) {
                VStack(alignment: .leading, spacing: 12) {
                    HStack { Image(systemName:"sparkles").foregroundColor(Color.zxAccent); Text("解释\"注意力机制\"在 Transformer 中的作用").zxFontScaled(size:15,weight:.bold).foregroundColor(Color.zxF0) }
                    Text("AI会从三个方面评估你的回答：核心概念理解 · 理论深度 · 实际应用能力").zxFontScaled(size:12).foregroundColor(Color.zxF04)
                }.padding(16).background(ZXGradient.thinkingCard).clipShape(RoundedRectangle(cornerRadius:16))
                VStack(alignment:.leading,spacing:8){Text("你的回答").font(.system(size:13,weight:.semibold)).foregroundColor(Color.zxF04);TextEditor(text:$answer).zxFontScaled(size:13).foregroundColor(Color.zxF0).tint(Color.zxPurple).frame(minHeight:160).scrollContentBackground(.hidden).padding(12).background(Color.zxFill004).clipShape(RoundedRectangle(cornerRadius:14)).overlay(RoundedRectangle(cornerRadius:14).stroke(Color.zxBorder008,lineWidth:1))}
                if !submitted{ NavigationLink(value: Route.aiFeedback){ Text("提交回答，获取 AI 反馈").font(.system(size:14,weight:.bold)).foregroundColor(.white).frame(maxWidth:.infinity).frame(height:52).background(ZXGradient.ctaPurple).clipShape(RoundedRectangle(cornerRadius:16)).shadow(color:Color(hex:"#7C6EFA",opacity:0.3),radius:24) }.zxPressable() }
            }.padding(.horizontal,20).padding(.top, 8).padding(.bottom,120) }.scrollIndicators(.hidden)
        }.navigationBarTitleDisplayMode(.inline).animatedTabBarHide().toolbarBackground(.hidden,for:.navigationBar)
    }
}
