import SwiftUI struct RootView: View { @EnvironmentObject private var app: AppModel var body: some View { ZStack { TvColors.bg.ignoresSafeArea() switch app.phase { case .boot: SplashView() case .server: ServerChoiceView() case .auth: AuthChoiceView() case .password: PasswordLoginView() case .link: LinkView() case .profiles: ProfilesView() case .main: MainHub() } } .animation(.easeInOut(duration: 0.32), value: app.phase) } } struct SplashView: View { @State private var pulse = false @State private var glow = false var body: some View { ZStack { LinearGradient( colors: [ Color(red: 0.1, green: 0.02, blue: 0.04), TvColors.bg, ], startPoint: .top, endPoint: .bottom ) .ignoresSafeArea() VStack(spacing: 28) { Text("VMC") .font(TvFonts.brand) .foregroundStyle(TvColors.accent) .scaleEffect(pulse ? 1.06 : 0.94) .shadow(color: TvColors.accent.opacity(glow ? 0.65 : 0.25), radius: glow ? 42 : 12) Text("Vonas Media Cluster") .font(TvFonts.body) .foregroundStyle(TvColors.textDim) .opacity(pulse ? 1 : 0.7) ProgressView() .tint(TvColors.textDim) .scaleEffect(1.3) } } .onAppear { withAnimation(.easeInOut(duration: 1.2).repeatForever(autoreverses: true)) { pulse = true glow = true } } } }