<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg_main_gradient"
    android:fillViewport="true"
    tools:context=".presentation.ExploreFragment">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <!-- A. 顶部栏 Header -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingStart="16dp"
            android:paddingTop="16dp"
            android:paddingEnd="16dp">

            <!-- 标题和副标题 -->
            <TextView
                android:id="@+id/tv_sketch_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/sketch"
                android:textColor="@color/text_primary"
                android:textSize="24sp"
                android:textStyle="bold" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="4dp"
                android:text="@string/sketch_subtitle"
                android:textColor="@color/text_secondary"
                android:textSize="13sp" />

            <!-- Import 主按钮 - 柔和牛奶蓝渐变，融入温柔调性 -->
            <com.google.android.material.button.MaterialButton
                android:id="@+id/btn_import_gallery"
                style="@style/Widget.MaterialComponents.Button"
                android:layout_width="match_parent"
                android:layout_height="52dp"
                android:layout_marginTop="16dp"
                android:background="@drawable/btn_import_bg"
                android:stateListAnimator="@null"
                android:text="@string/import_from_gallery"
                android:textAllCaps="false"
                android:textColor="@color/soft_blue_text"
                android:textSize="15sp"
                android:textStyle="bold"
                app:backgroundTint="@null"
                app:cornerRadius="12dp"
                app:elevation="0dp"
                app:icon="@android:drawable/ic_input_add"
                app:iconGravity="start"
                app:iconPadding="8dp"
                app:iconTint="@color/soft_blue_text" />

        </LinearLayout>

        <!-- B. Featured Sketches 主推荐区 - 增强层次感 -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="12dp"
            android:background="@drawable/featured_section_bg"
            android:paddingTop="12dp"
            android:paddingBottom="12dp"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginBottom="8dp"
                android:text="@string/featured"
                android:textColor="@color/text_primary"
                android:textSize="14sp"
                android:textStyle="bold" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycler_featured"
                android:layout_width="match_parent"
                android:layout_height="240dp"
                android:clipToPadding="false"
                android:paddingStart="16dp"
                android:paddingEnd="16dp" />

        </LinearLayout>

        <!-- C. Categories 分类入口区 -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:orientation="vertical"
            android:paddingStart="16dp"
            android:paddingEnd="16dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:text="@string/categories"
                android:textColor="@color/text_primary"
                android:textSize="14sp"
                android:textStyle="bold" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycler_categories"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:nestedScrollingEnabled="false" />

        </LinearLayout>

        <!-- D. 底部安全区 (24-32dp) -->
        <View
            android:layout_width="match_parent"
            android:layout_height="32dp" />

    </LinearLayout>

</androidx.core.widget.NestedScrollView>


