<?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="#0f142d"
    tools:context=".MainActivity">

    <TextView
        android:id="@+id/gameTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/app_name"
        android:textColor="@color/cyan"
        android:textSize="32sp"
        android:textStyle="bold"
        android:shadowColor="#00ffff"
        android:shadowRadius="10"
        android:shadowDx="0"
        android:shadowDy="0"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <com.tetris3d.views.TetrisGameView
        android:id="@+id/tetrisGameView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginTop="16dp"
        app:layout_constraintBottom_toTopOf="@+id/rotationHint"
        app:layout_constraintDimensionRatio="1:2"
        app:layout_constraintEnd_toStartOf="@+id/infoPanel"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/gameTitle" />

    <TextView
        android:id="@+id/rotationHint"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:gravity="center"
        android:text="Tap LEFT side: Horizontal Rotation (X) • Tap RIGHT side: Vertical Rotation (Y)"
        android:textColor="#ffaa00"
        android:textSize="13sp"
        app:layout_constraintBottom_toTopOf="@+id/controlsHint"
        app:layout_constraintEnd_toStartOf="@+id/infoPanel"
        app:layout_constraintStart_toStartOf="parent" />

    <TextView
        android:id="@+id/controlsHint"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:gravity="center"
        android:text="Swipe left/right to move • Swipe down for soft drop • Swipe up for hard drop"
        android:textColor="#00ffff"
        android:textSize="13sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/infoPanel"
        app:layout_constraintStart_toStartOf="parent" />

    <androidx.cardview.widget.CardView
        android:id="@+id/infoPanel"
        android:layout_width="140dp"
        android:layout_height="0dp"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="16dp"
        app:cardBackgroundColor="#202040"
        app:cardCornerRadius="12dp"
        app:cardElevation="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/gameTitle">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:padding="12dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/score"
                android:textColor="#ffffff"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/scoreText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="0"
                android:textColor="#ff9900"
                android:textSize="22sp"
                android:textStyle="bold" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:text="@string/lines"
                android:textColor="#ffffff"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/linesText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="0"
                android:textColor="#ff9900"
                android:textSize="22sp"
                android:textStyle="bold" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:text="@string/level"
                android:textColor="#ffffff"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/levelText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="1"
                android:textColor="#ff9900"
                android:textSize="22sp"
                android:textStyle="bold" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="24dp"
                android:text="Next Piece"
                android:textAlignment="center"
                android:textColor="#00ffff"
                android:textSize="16sp" />

            <com.tetris3d.views.NextPieceView
                android:id="@+id/nextPieceView"
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:layout_marginTop="8dp" />

            <Button
                android:id="@+id/startButton"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:backgroundTint="#ff00dd"
                android:textColor="#ffffff"
                android:text="@string/start" />

            <Button
                android:id="@+id/pauseButton"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:backgroundTint="#00ddff"
                android:textColor="#ffffff"
                android:text="@string/pause" />

            <Button
                android:id="@+id/optionsButton"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:backgroundTint="#9900ff"
                android:textColor="#ffffff"
                android:text="@string/options" />

        </LinearLayout>
    </androidx.cardview.widget.CardView>

</androidx.constraintlayout.widget.ConstraintLayout> 