<?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:background="@color/login_background"
    android:id="@+id/main"
    android:padding="16dp"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".login.RegisterActivity">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/topContainer"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:paddingStart="16dp"
        android:paddingEnd="16dp">
        <ImageView
            android:id="@+id/backIcon"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:src="@mipmap/back"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />
        <!-- 标题：找回密码 -->
        <TextView
            android:id="@+id/tvRegisterTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/retrieve_password"
            android:textColor="@color/black"
            android:textSize="16dp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="@id/backIcon"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/backIcon" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <!-- 副标题：找回密码 -->
    <TextView
        android:id="@+id/tvRegisterSubtitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/retrieve_password"
        android:textColor="@color/black"
        android:textSize="20dp"
        android:textStyle="bold"
        android:layout_marginTop="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/topContainer" />

    <!-- 手机号输入行容器 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/phoneRowLayout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="32dp"
        android:background="@drawable/textinput_white_bg"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/tvRegisterSubtitle">

        <ImageView
            android:id="@+id/ivPhoneIcon"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:src="@mipmap/lg"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <EditText
            android:id="@+id/etPhoneNumber"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:background="@null"
            android:hint="@string/enter_phone_number"
            android:inputType="phone"
            android:maxLength="11"
            android:paddingVertical="16dp"
            android:textColor="@android:color/black"
            android:textColorHint="@color/gray"
            android:textSize="16sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/ivPhoneIcon"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <!-- 验证码登录专用区域：图标 + 验证码输入框 + 发送按钮 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/smsRowLayout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:background="@drawable/textinput_white_bg"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        app:layout_constraintTop_toBottomOf="@+id/phoneRowLayout"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:visibility="visible">

        <!-- 左侧图标 -->
        <ImageView
            android:id="@+id/ivSmsIcon"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:src="@mipmap/vc"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />

        <!-- 验证码输入框（无背景） -->
        <EditText
            android:id="@+id/etSmsCode"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:hint="@string/enter_verification_code"
            android:textColorHint="@color/gray"
            android:textColor="@android:color/black"
            android:background="@null"
            android:inputType="number"
            android:paddingVertical="16dp"
            app:layout_constraintStart_toEndOf="@+id/ivSmsIcon"
            app:layout_constraintEnd_toStartOf="@+id/sendCodeBtn"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />

        <!-- 发送验证码按钮 -->
        <android.widget.Button
            android:id="@+id/sendCodeBtn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/send_code"
            android:textSize="16sp"
            android:textColor="@color/white"
            android:background="@drawable/rounded_blue_bg"
            android:paddingHorizontal="12dp"
            android:maxWidth="120dp"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            android:layout_marginStart="12dp" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <!-- 请输入新密码 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/passwordRowLayout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:background="@drawable/textinput_white_bg"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        app:layout_constraintTop_toBottomOf="@+id/smsRowLayout"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <!-- 左侧图标 -->
        <ImageView
            android:id="@+id/ivPasswordIcon"
            android:layout_width="24dp"
            android:layout_height="24dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />

        <!-- 密码输入框（无背景） -->
        <EditText
            android:id="@+id/etPassword"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:hint="@string/enter_new_password"
            android:textColorHint="@color/gray"
            android:textColor="@android:color/black"
            android:background="@null"
            android:inputType="text"
            android:paddingVertical="16dp"
            app:layout_constraintStart_toEndOf="@+id/ivPasswordIcon"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>


    <!-- 请再次输入新密码 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/inviteRowLayout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:background="@drawable/textinput_white_bg"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/passwordRowLayout">

        <ImageView
            android:id="@+id/ivInviteIcon"
            android:layout_width="24dp"
            android:layout_height="24dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <EditText
            android:id="@+id/etInviteCode"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:background="@null"
            android:hint="@string/enter_password_again"
            android:inputType="text"
            android:maxLength="10"
            android:paddingVertical="16dp"
            android:textColor="@android:color/black"
            android:textColorHint="@color/gray"
            android:textSize="16sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/ivInviteIcon"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <!-- 确定按钮 -->
    <android.widget.Button
        android:id="@+id/btnNext"
        android:layout_width="0dp"
        android:layout_height="56dp"
        android:layout_marginTop="32dp"
            android:text="@string/determine"
        android:textAllCaps="false"
        android:textSize="16sp"
        app:cornerRadius="12dp"
        android:textColor="@color/white"
        android:background="@drawable/rounded_blue_bg"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/inviteRowLayout" />

</androidx.constraintlayout.widget.ConstraintLayout>