import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; // Import screenutil
import 'main_screen.dart';

class IdentityVerificationScreen extends StatelessWidget {
  const IdentityVerificationScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        backgroundColor: Colors.white,
        elevation: 0,
        leading: IconButton(
          icon: Icon(Icons.arrow_back_ios, color: Colors.black, size: 20.w),
          onPressed: () => Navigator.pop(context),
        ),
        title: Text(
          '본인 인증',
          style: TextStyle(
            fontSize: 15.sp,
            fontFamily: 'SCDream',
            fontWeight: FontWeight.w500,
            color: Colors.black,
          ),
        ),
        centerTitle: true,
      ),
      body: Padding(
        padding: EdgeInsets.all(20.0.w),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            SizedBox(height: 20.h),
            Text(
              '더 안전한 서비스 이용을 위해\n본인 인증을 진행해 주세요.',
              style: TextStyle(
                fontSize: 20.sp,
                fontFamily: 'SCDream',
                fontWeight: FontWeight.bold,
                color: Colors.black,
              ),
            ),
            SizedBox(height: 40.h),

            // 본인 인증 UI (Placeholder)
            Container(
              padding: EdgeInsets.all(20.w),
              decoration: BoxDecoration(
                color: Colors.grey[100],
                borderRadius: BorderRadius.circular(10.r),
                border: Border.all(color: Colors.grey[300]!),
              ),
              child: Column(
                children: [
                  Icon(
                    Icons.shield_outlined,
                    size: 50.w,
                    color: const Color(0xFFFF7500),
                  ),
                  SizedBox(height: 10.h),
                  Text(
                    'PASS / 문자 인증',
                    style: TextStyle(
                      fontFamily: 'SCDream',
                      fontSize: 16.sp,
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                  SizedBox(height: 10.h),
                  Text(
                    '(현재 UI만 구현된 상태입니다)',
                    style: TextStyle(
                      fontFamily: 'SCDream',
                      fontSize: 12.sp,
                      color: Colors.grey,
                    ),
                  ),
                ],
              ),
            ),

            const Spacer(),

            // 건너뛰기 버튼
            TextButton(
              onPressed: () {
                // 홈 화면으로 이동 (로그인 프로세스 완료)
                Navigator.pushAndRemoveUntil(
                  context,
                  MaterialPageRoute(builder: (context) => const MainScreen()),
                  (route) => false,
                );
              },
              child: Text(
                '다음에 하기 (건너뛰기)',
                style: TextStyle(
                  fontFamily: 'SCDream',
                  fontSize: 14.sp,
                  fontWeight: FontWeight.w500,
                  color: Colors.grey,
                  decoration: TextDecoration.underline,
                ),
              ),
            ),
            SizedBox(height: 10.h),

            // 인증하기 버튼 (현재는 동작 X)
            SizedBox(
              height: 50.h,
              child: ElevatedButton(
                onPressed: () {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(content: Text('본인 인증 기능은 추후 구현 예정입니다.')),
                  );
                },
                style: ElevatedButton.styleFrom(
                  backgroundColor: const Color(0xFFFF7500),
                  elevation: 0,
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(8.r),
                  ),
                ),
                child: Text(
                  '인증하기',
                  style: TextStyle(
                    fontFamily: 'SCDream',
                    fontSize: 16.sp,
                    fontWeight: FontWeight.bold,
                    color: Colors.white,
                  ),
                ),
              ),
            ),
            SizedBox(height: 10.h),
          ],
        ),
      ),
    );
  }
}
