<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- Scanner Frame Overlay -->
    <View
        android:id="@+id/scanner_frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/scanner_frame_background" />

    <!-- Top Bar -->
    <LinearLayout
        android:id="@+id/top_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:background="#80000000"
        android:orientation="horizontal"
        android:padding="16dp">

        <ImageButton
            android:id="@+id/close_button"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="Close"
            android:src="@drawable/ic_close"
            android:tint="@android:color/white" />

        <TextView
            android:id="@+id/prompt_text"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginStart="16dp"
            android:layout_weight="1"
            android:text="Scan QR Code"
            android:textColor="@android:color/white"
            android:textSize="18sp" />

    </LinearLayout>

    <!-- Bottom Controls -->
    <LinearLayout
        android:id="@+id/bottom_controls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="#80000000"
        android:gravity="center"
        android:orientation="horizontal"
        android:padding="16dp">

        <ImageButton
            android:id="@+id/torch_button"
            android:layout_width="56dp"
            android:layout_height="56dp"
            android:layout_margin="8dp"
            android:background="@drawable/circle_button_background"
            android:contentDescription="Toggle Torch"
            android:src="@drawable/ic_flash_off"
            android:tint="@android:color/white"
            android:visibility="gone" />

        <ImageButton
            android:id="@+id/flip_camera_button"
            android:layout_width="56dp"
            android:layout_height="56dp"
            android:layout_margin="8dp"
            android:background="@drawable/circle_button_background"
            android:contentDescription="Flip Camera"
            android:src="@drawable/ic_flip_camera"
            android:tint="@android:color/white" />

    </LinearLayout>

    <!-- Scan Area Indicator -->
    <View
        android:id="@+id/scan_area"
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:layout_centerInParent="true"
        android:background="@drawable/scan_area_corners" />

</RelativeLayout>