<?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="170dp">

    <View
        android:id="@+id/v_shadow"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="4dp"
        android:layout_marginTop="8dp"
        android:layout_marginBottom="8dp"
        android:background="@drawable/bg_single_game_card"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <View
        android:id="@+id/v_background"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="20dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="24dp"
        android:background="@drawable/bg_shape_white_radius_8_border"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guide_line"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.5" />

    <TextView
        android:id="@+id/tv_today_recommend"
        android:layout_width="0dp"
        android:layout_height="32dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="8dp"
        android:background="@drawable/bg_single_game_card_today_recommend"
        android:ellipsize="end"
        android:gravity="center"
        android:maxLines="1"
        android:minWidth="44dp"
        android:paddingHorizontal="10dp"
        android:textColor="@color/text_aw_primary"
        app:layout_constraintEnd_toStartOf="@id/guide_line"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_max="wrap" />

    <View
        android:layout_width="4dp"
        android:layout_height="3dp"
        android:background="@drawable/ic_single_game_card_today_recommend"
        app:layout_constraintStart_toStartOf="@id/tv_today_recommend"
        app:layout_constraintTop_toBottomOf="@id/tv_today_recommend" />

    <com.gh.gamecenter.feature.view.GameIconView
        android:id="@+id/iv_icon"
        android:layout_width="88dp"
        android:layout_height="88dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="28dp"
        app:gameIconBorderColor="@color/resource_border"
        app:gameIconBorderWidth="0.5dp"
        app:gameIconCornerRadius="20dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/tv_title"
        style="@style/TextTitle2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="32dp"
        android:layout_marginTop="24dp"
        android:ellipsize="end"
        android:includeFontPadding="false"
        android:maxLines="1"
        android:textColor="@color/text_primary"
        app:layout_constrainedWidth="true"
        app:layout_constraintEnd_toStartOf="@id/tv_discount"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/v_background"
        tools:text="星之翼（Brotato）" />

    <TextView
        android:id="@+id/tv_discount"
        style="@style/TextLabel1"
        android:layout_width="wrap_content"
        android:layout_height="16dp"
        android:layout_marginStart="4dp"
        android:layout_marginEnd="12dp"
        android:background="@drawable/bg_single_game_card_discount"
        android:gravity="center"
        android:paddingStart="4dp"
        android:paddingEnd="4dp"
        android:textColor="@color/text_aw_primary"
        app:layout_constrainedWidth="true"
        app:layout_constraintBottom_toBottomOf="@id/tv_title"
        app:layout_constraintEnd_toStartOf="@id/iv_icon"
        app:layout_constraintStart_toEndOf="@id/tv_title"
        app:layout_constraintTop_toTopOf="@id/tv_title"
        tools:text="0.1折" />

    <TextView
        android:id="@+id/tv_ratting"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="4dp"
        android:drawablePadding="4dp"
        android:textColor="@color/primary_theme"
        android:textSize="12sp"
        app:drawableStartCompat="@drawable/game_horizontal_rating"
        app:layout_constraintStart_toStartOf="@id/tv_title"
        app:layout_constraintTop_toBottomOf="@id/tv_title"
        tools:text="8.3" />

    <com.gh.common.view.SingleCardTagContainerView
        android:id="@+id/game_tags"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="4dp"
        android:layout_marginTop="4dp"
        android:background="@color/ui_surface"
        app:layout_constraintEnd_toStartOf="@id/iv_icon"
        app:layout_constraintStart_toEndOf="@id/tv_ratting"
        app:layout_constraintTop_toBottomOf="@id/tv_title"
        app:layout_goneMarginStart="0dp" />

    <TextView
        android:id="@+id/tv_label"
        style="@style/TextAnnotation1"
        android:layout_width="24dp"
        android:layout_height="14dp"
        android:background="@drawable/bg_single_game_card_recharge"
        android:gravity="center"
        android:text="@string/recharge"
        android:textColor="@color/text_price"
        app:layout_constraintBottom_toBottomOf="@id/tv_price"
        app:layout_constraintStart_toStartOf="@id/tv_title"
        app:layout_constraintTop_toTopOf="@id/tv_price" />

    <TextView
        android:id="@+id/tv_price_unit"
        style="@style/TextLabel2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="4dp"
        android:text="¥"
        android:textColor="@color/text_price"
        app:layout_constraintBaseline_toBaselineOf="@id/tv_price"
        app:layout_constraintStart_toEndOf="@id/tv_label" />

    <TextView
        android:id="@+id/tv_price"
        style="@style/TextTitle2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="1dp"
        android:layout_marginTop="8dp"
        android:layout_marginBottom="24dp"
        android:includeFontPadding="false"
        android:textColor="@color/text_price"
        app:layout_constraintBottom_toBottomOf="@id/v_background"
        app:layout_constraintStart_toEndOf="@id/tv_price_unit"
        tools:text="388.8" />

    <TextView
        android:id="@+id/tv_original_price"
        style="@style/TextCaption1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="4dp"
        android:includeFontPadding="false"
        android:textColor="@color/text_tertiary"
        app:layout_constraintBaseline_toBaselineOf="@id/tv_price"
        app:layout_constraintStart_toEndOf="@id/tv_price"
        tools:text="¥648" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/g_welfare"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:constraint_referenced_ids="tv_discount,tv_label,tv_price_unit,tv_price,tv_original_price" />

    <TextView
        android:id="@+id/tv_desc"
        style="@style/TextAnnotation1"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginBottom="30dp"
        android:ellipsize="end"
        android:maxLines="1"
        android:textColor="@color/text_theme"
        android:textSize="13sp"
        app:layout_constraintBottom_toBottomOf="@id/v_background"
        app:layout_constraintEnd_toStartOf="@id/iv_icon"
        app:layout_constraintStart_toStartOf="@id/v_background" />

    <View
        android:id="@+id/v_download_background"
        android:layout_width="124dp"
        android:layout_height="36dp"
        app:layout_constraintBottom_toBottomOf="@id/v_background"
        app:layout_constraintEnd_toEndOf="@id/v_background"
        app:layout_constraintStart_toStartOf="@id/v_background"
        app:layout_constraintTop_toBottomOf="@id/v_background"
        android:background="@drawable/background_shape_white_radius_999"/>

    <com.gh.gamecenter.feature.view.DownloadButton
        android:id="@+id/btn_download"
        android:layout_width="124dp"
        android:layout_height="36dp"
        app:download_button_show_progress="true"
        app:download_button_text_size="12sp"
        app:layout_constraintBottom_toBottomOf="@id/v_background"
        app:layout_constraintEnd_toEndOf="@id/v_background"
        app:layout_constraintStart_toStartOf="@id/v_background"
        app:layout_constraintTop_toBottomOf="@id/v_background" />

    <TextView
        android:id="@+id/multiVersionDownloadTv"
        android:layout_width="wrap_content"
        android:layout_height="28dp"
        android:drawablePadding="2dp"
        android:gravity="center"
        android:text="@string/expand"
        android:textColor="@color/white"
        android:textSize="@dimen/secondary_size"
        android:visibility="gone"
        app:drawableEndCompat="@drawable/ic_jump_universal"
        app:layout_constraintBottom_toBottomOf="@+id/btn_download"
        app:layout_constraintEnd_toEndOf="@+id/btn_download"
        app:layout_constraintStart_toStartOf="@+id/btn_download"
        app:layout_constraintTop_toTopOf="@+id/btn_download" />

    <com.airbnb.lottie.LottieAnimationView
        android:id="@+id/downloadTipsLottie"
        android:layout_width="16dp"
        android:layout_height="16dp"
        android:layout_marginTop="-8dp"
        android:visibility="gone"
        app:layout_constraintRight_toRightOf="@+id/btn_download"
        app:layout_constraintTop_toTopOf="@+id/btn_download"
        app:lottie_autoPlay="false"
        app:lottie_loop="true"
        app:lottie_repeatMode="restart" />
</androidx.constraintlayout.widget.ConstraintLayout>