<?xml version="1.0" encoding="utf-8"?>
<!-- ═══════════════════════════════════════════════════════════════════════════════
     SUBTITLE SETTINGS PANEL - Two-pane list (Android TV style)
     Left pane: categories (Track, Size, Style, Color, Outline, BG, Elevate, Font, Reset)
     Right pane: options for the selected category, with live preview
     Lists are populated programmatically by the player activity controllers.
     ═══════════════════════════════════════════════════════════════════════════════ -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/subtitle_settings_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="gone"
    android:elevation="300dp">

    <!-- Semi-transparent backdrop -->
    <View
        android:id="@+id/subtitle_settings_backdrop"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#B3000000" />

    <!-- Main Panel Card -->
    <LinearLayout
        android:id="@+id/subtitle_settings_panel"
        android:layout_width="640dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:orientation="vertical"
        android:background="@drawable/subtitle_panel_bg"
        android:paddingStart="24dp"
        android:paddingEnd="24dp"
        android:paddingTop="20dp"
        android:paddingBottom="20dp"
        android:elevation="16dp">

        <!-- Header -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="SUBTITLE SETTINGS"
            android:textColor="#FFFFFF"
            android:textSize="14sp"
            android:fontFamily="sans-serif-medium"
            android:letterSpacing="0.1"
            android:layout_marginBottom="14dp" />

        <!-- Online subtitle search row -->
        <LinearLayout
            android:id="@+id/subtitle_search_row"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="14dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/subtitle_identity_label"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginEnd="12dp"
                android:ellipsize="end"
                android:maxLines="2"
                android:text="Detected title unavailable"
                android:textColor="#B3FFFFFF"
                android:textSize="12sp" />

            <TextView
                android:id="@+id/subtitle_search_button"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:background="@drawable/subtitle_column_bg"
                android:clickable="true"
                android:drawableStart="@drawable/ic_search"
                android:drawablePadding="8dp"
                android:drawableTint="#FFFFFF"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:gravity="center"
                android:paddingStart="14dp"
                android:paddingEnd="14dp"
                android:text="Search Movie/Show Subtitles"
                android:textColor="#FFFFFF"
                android:textSize="12sp"
                android:fontFamily="sans-serif-medium" />

        </LinearLayout>

        <!-- Two-pane list -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="320dp"
            android:orientation="horizontal"
            android:background="@drawable/subtitle_preview_bg">

            <!-- Left pane: Categories -->
            <androidx.core.widget.NestedScrollView
                android:id="@+id/subtitle_categories_scroll"
                android:layout_width="220dp"
                android:layout_height="match_parent"
                android:fillViewport="true"
                android:scrollbars="none">

                <LinearLayout
                    android:id="@+id/subtitle_categories_container"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingTop="6dp"
                    android:paddingBottom="6dp" />

            </androidx.core.widget.NestedScrollView>

            <!-- Divider -->
            <View
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:background="#22FFFFFF" />

            <!-- Right pane: Options -->
            <androidx.core.widget.NestedScrollView
                android:id="@+id/subtitle_options_scroll"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="match_parent"
                android:fillViewport="true"
                android:scrollbars="none">

                <LinearLayout
                    android:id="@+id/subtitle_options_container"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingTop="6dp"
                    android:paddingBottom="6dp" />

            </androidx.core.widget.NestedScrollView>

        </LinearLayout>

        <!-- Preview Section -->
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:layout_marginTop="14dp"
            android:background="@drawable/subtitle_preview_bg">

            <TextView
                android:id="@+id/subtitle_preview_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="Sample subtitle preview"
                android:textColor="#FFFFFF"
                android:textSize="16sp"
                android:fontFamily="sans-serif"
                android:shadowColor="#000000"
                android:shadowDx="1"
                android:shadowDy="1"
                android:shadowRadius="2" />

        </FrameLayout>

        <!-- Hint -->
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="10dp"
            android:text="◄► Switch pane  |  ▲▼ Navigate  |  OK Select  |  BACK Close"
            android:textColor="#60FFFFFF"
            android:textSize="10sp"
            android:fontFamily="sans-serif" />

    </LinearLayout>

</FrameLayout>
