<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="@color/background_light"
    tools:context=".AddActivity">

    <!-- 顶部导航栏 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/top_bar"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:background="@color/white"
        android:elevation="4dp"
        app:layout_constraintTop_toTopOf="parent">

        <!-- 返回按钮 -->
        <ImageView
            android:id="@+id/btn_back"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_marginStart="8dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="返回"
            android:padding="12dp"
            android:src="@drawable/ic_arrow_back"
            android:tint="@color/text_primary"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <!-- 标题 -->
        <TextView
            android:id="@+id/tv_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="添加心情"
            android:textColor="@color/text_primary"
            android:textSize="18sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <!-- 内容区域 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content_area"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:padding="32dp"
        app:layout_constraintBottom_toTopOf="@id/btn_end"
        app:layout_constraintTop_toBottomOf="@id/top_bar">

        <!-- 小鸡形象 -->
        <ImageView
            android:id="@+id/iv_chick"
            android:layout_width="120dp"
            android:layout_height="120dp"
            android:layout_marginTop="48dp"
            android:contentDescription="小鸡形象"
            android:scaleType="centerInside"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:src="@drawable/ic_placeholder_happy" />

        <!-- 心情文案 -->
        <TextView
            android:id="@+id/tv_mood_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="32dp"
            android:text="开始！"
            android:textColor="@color/text_primary"
            android:textSize="24sp"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/iv_chick" />

        <!-- 心情值显示 -->
        <TextView
            android:id="@+id/tv_mood_value"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:text="0"
            android:textColor="@color/text_primary"
            android:textSize="48sp"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tv_mood_text" />

        <!-- 进度条 -->
        <ProgressBar
            android:id="@+id/progress_bar"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="0dp"
            android:layout_height="8dp"
            android:layout_marginTop="24dp"
            android:layout_marginHorizontal="32dp"
            android:max="100"
            android:progress="0"
            android:progressDrawable="@drawable/progress_bar_mood"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tv_mood_value" />

        <!-- 提示文案 -->
        <TextView
            android:id="@+id/tv_hint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:text="摇晃手机记录你的心情"
            android:textColor="@color/text_secondary"
            android:textSize="14sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/progress_bar" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <!-- 结束按钮 -->
    <Button
        android:id="@+id/btn_end"
        android:layout_width="0dp"
        android:layout_height="56dp"
        android:layout_marginHorizontal="32dp"
        android:layout_marginBottom="32dp"
        android:background="@drawable/button_primary"
        android:text="结束"
        android:textColor="@color/white"
        android:textSize="16sp"
        android:textStyle="bold"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <!-- 遮罩层 - 放在最后确保覆盖所有内容 -->
    <View
        android:id="@+id/view_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/overlay_background"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        tools:visibility="visible" />

    <!-- 遮罩文案 - 放在遮罩层之后 -->
    <TextView
        android:id="@+id/tv_overlay_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="握紧手机"
        android:textColor="@color/white"
        android:textSize="28sp"
        android:textStyle="bold"
        android:shadowColor="#80000000"
        android:shadowDx="2"
        android:shadowDy="2"
        android:shadowRadius="4"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:visibility="visible" />

</androidx.constraintlayout.widget.ConstraintLayout>