<Window x:Class="AxCopilot.Views.RegionSelectWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        WindowStyle="None"
        AllowsTransparency="True"
        Background="Transparent"
        Topmost="True"
        ShowInTaskbar="False"
        ResizeMode="NoResize"
        WindowStartupLocation="Manual"
        Cursor="Cross"
        MouseDown="Window_MouseDown"
        MouseMove="Window_MouseMove"
        MouseUp="Window_MouseUp"
        KeyDown="Window_KeyDown">

    <Canvas x:Name="RootCanvas">
        <!-- 반투명 어두운 배경 (선택 영역 바깥) -->
        <!-- 바깥 마스크: 4개의 반투명 사각형으로 구성 (성능 최적) -->
        <Rectangle x:Name="OverlayTop"    Fill="#88000000" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="OverlayBottom" Fill="#88000000" Canvas.Left="0"/>
        <Rectangle x:Name="OverlayLeft"   Fill="#88000000" Canvas.Left="0"/>
        <Rectangle x:Name="OverlayRight"  Fill="#88000000"/>

        <!-- 선택 영역 테두리 (실선) -->
        <Rectangle x:Name="SelectionBorder"
                   Stroke="#00D4FF"
                   StrokeThickness="1.5"
                   Fill="Transparent"
                   Visibility="Collapsed"/>

        <!-- 가이드 텍스트 (드래그 전) -->
        <Border x:Name="GuideText"
                Canvas.Left="0" Canvas.Top="0"
                Background="#CC1A1B2E"
                CornerRadius="10"
                Padding="20,12">
            <StackPanel>
                <TextBlock Text="캡처할 영역을 드래그하세요"
                           FontSize="16" FontWeight="SemiBold"
                           Foreground="White"
                           HorizontalAlignment="Center"/>
                <TextBlock Text="ESC — 취소  ·  마우스 버튼을 놓으면 캡처"
                           FontSize="12" Foreground="#88AACCFF"
                           HorizontalAlignment="Center"
                           Margin="0,6,0,0"/>
            </StackPanel>
        </Border>

        <!-- 크기 표시 레이블 -->
        <Border x:Name="SizeLabel"
                Background="#CC1A1B2E"
                CornerRadius="6"
                Padding="8,4"
                Visibility="Collapsed">
            <TextBlock x:Name="SizeLabelText"
                       FontSize="11"
                       FontFamily="Consolas"
                       Foreground="#00D4FF"/>
        </Border>
    </Canvas>
</Window>
