<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginHorizontal="16dp"
    android:layout_marginVertical="8dp"
    app:cardBackgroundColor="@color/bg_surface"
    app:cardCornerRadius="12dp"
    app:cardElevation="0dp"
    app:strokeWidth="2dp"
    app:strokeColor="@color/brand">

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

        <!-- Top bar: Live status -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/brand_dim"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:paddingHorizontal="14dp"
            android:paddingVertical="8dp">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:fontFamily="@font/font_ibm_plex_mono"
                android:text="PARTIDA AO VIVO"
                android:textColor="@color/brand"
                android:textSize="10sp"
                android:textStyle="bold"
                android:letterSpacing="0.08" />

            <!-- Live Pill Badge -->
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:gravity="center_vertical"
                android:background="@drawable/bg_circle_green"
                android:paddingHorizontal="8dp"
                android:paddingVertical="2dp">

                <View
                    android:id="@+id/live_indicator"
                    android:layout_width="6dp"
                    android:layout_height="6dp"
                    android:background="@drawable/bg_circle_light_gray"
                    android:layout_marginEnd="4dp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="DIRETO"
                    android:textColor="@color/bg_base"
                    android:textSize="9sp"
                    android:fontFamily="@font/font_ibm_plex_mono"
                    android:textStyle="bold" />
            </LinearLayout>
        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/border" />

        <!-- Body: Teams and Scores -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="16dp"
            android:gravity="center">

            <!-- Time Badge -->
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:gravity="center"
                android:layout_marginBottom="12dp">

                <TextView
                    android:id="@+id/text_game_time"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/font_ibm_plex_mono"
                    android:text="45'"
                    android:textColor="@color/brand"
                    android:textSize="14sp"
                    android:textStyle="bold" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:orientation="horizontal">

                <!-- Home Team -->
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1.2"
                    android:gravity="center"
                    android:orientation="vertical">

                    <com.google.android.material.imageview.ShapeableImageView
                        android:layout_width="44dp"
                        android:layout_height="44dp"
                        android:padding="4dp"
                        android:background="@color/bg_elevated"
                        app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent"
                        app:strokeColor="@color/border"
                        app:strokeWidth="1dp"
                        android:scaleType="centerInside"
                        android:src="@drawable/ic_club_placeholder" />

                    <TextView
                        android:id="@+id/text_home_team"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="8dp"
                        android:fontFamily="@font/font_ibm_plex_sans"
                        android:text="J.U. Mosteiró"
                        android:textColor="@color/text_1"
                        android:textSize="12sp"
                        android:textStyle="bold"
                        android:gravity="center"
                        android:maxLines="2"
                        android:ellipsize="end" />
                </LinearLayout>

                <!-- Score Section -->
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_marginHorizontal="8dp"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/text_score"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:fontFamily="@font/font_bebas_neue"
                        android:text="2 - 1"
                        android:textColor="@color/brand"
                        android:textSize="36sp"
                        android:letterSpacing="0.04" />
                </LinearLayout>

                <!-- Away Team -->
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1.2"
                    android:gravity="center"
                    android:orientation="vertical">

                    <com.google.android.material.imageview.ShapeableImageView
                        android:layout_width="44dp"
                        android:layout_height="44dp"
                        android:padding="4dp"
                        android:background="@color/bg_elevated"
                        app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent"
                        app:strokeColor="@color/border"
                        app:strokeWidth="1dp"
                        android:scaleType="centerInside"
                        android:src="@drawable/ic_club_placeholder" />

                    <TextView
                        android:id="@+id/text_away_team"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="8dp"
                        android:fontFamily="@font/font_ibm_plex_sans"
                        android:text="SC Espinho"
                        android:textColor="@color/text_1"
                        android:textSize="12sp"
                        android:textStyle="bold"
                        android:gravity="center"
                        android:maxLines="2"
                        android:ellipsize="end" />
                </LinearLayout>

            </LinearLayout>

        </LinearLayout>

    </LinearLayout>

</com.google.android.material.card.MaterialCardView>
