<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    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="match_parent"
    android:background="@color/background"
    android:padding="16dp">

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

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/links_title"
            android:textColor="@color/terminal_green"
            android:textSize="24sp"
            android:textStyle="bold"
            android:fontFamily="monospace"
            android:layout_marginBottom="8dp" />

        <TextView
            android:id="@+id/server_url_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/server_url_placeholder"
            android:textColor="@color/text_secondary"
            android:fontFamily="monospace"
            android:textSize="12sp"
            android:layout_marginBottom="16dp" />

        <!-- Row 1: Dashboard, WireGuard -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="8dp">

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_dashboard"
                android:layout_width="0dp"
                android:layout_height="100dp"
                android:layout_weight="1"
                android:layout_marginEnd="4dp"
                android:clickable="true"
                android:focusable="true"
                app:cardBackgroundColor="@color/surface"
                app:cardCornerRadius="8dp"
                app:strokeColor="@color/terminal_green_dim"
                app:strokeWidth="1dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/link_dashboard"
                    android:textColor="@color/terminal_green"
                    android:textSize="14sp"
                    android:fontFamily="monospace" />

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

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_wireguard"
                android:layout_width="0dp"
                android:layout_height="100dp"
                android:layout_weight="1"
                android:layout_marginStart="4dp"
                android:clickable="true"
                android:focusable="true"
                app:cardBackgroundColor="@color/surface"
                app:cardCornerRadius="8dp"
                app:strokeColor="@color/terminal_green_dim"
                app:strokeWidth="1dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/link_wireguard"
                    android:textColor="@color/terminal_green"
                    android:textSize="14sp"
                    android:fontFamily="monospace" />

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

        <!-- Row 2: Shield, Hardware -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="8dp">

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_shield"
                android:layout_width="0dp"
                android:layout_height="100dp"
                android:layout_weight="1"
                android:layout_marginEnd="4dp"
                android:clickable="true"
                android:focusable="true"
                app:cardBackgroundColor="@color/surface"
                app:cardCornerRadius="8dp"
                app:strokeColor="@color/terminal_green_dim"
                app:strokeWidth="1dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/link_shield"
                    android:textColor="@color/terminal_green"
                    android:textSize="14sp"
                    android:fontFamily="monospace" />

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

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_hardware"
                android:layout_width="0dp"
                android:layout_height="100dp"
                android:layout_weight="1"
                android:layout_marginStart="4dp"
                android:clickable="true"
                android:focusable="true"
                app:cardBackgroundColor="@color/surface"
                app:cardCornerRadius="8dp"
                app:strokeColor="@color/terminal_green_dim"
                app:strokeWidth="1dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/link_hardware"
                    android:textColor="@color/terminal_green"
                    android:textSize="14sp"
                    android:fontFamily="monospace" />

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

        <!-- Row 3: Wireshark, OSINT -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="8dp">

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_wireshark"
                android:layout_width="0dp"
                android:layout_height="100dp"
                android:layout_weight="1"
                android:layout_marginEnd="4dp"
                android:clickable="true"
                android:focusable="true"
                app:cardBackgroundColor="@color/surface"
                app:cardCornerRadius="8dp"
                app:strokeColor="@color/terminal_green_dim"
                app:strokeWidth="1dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/link_wireshark"
                    android:textColor="@color/terminal_green"
                    android:textSize="14sp"
                    android:fontFamily="monospace" />

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

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_osint"
                android:layout_width="0dp"
                android:layout_height="100dp"
                android:layout_weight="1"
                android:layout_marginStart="4dp"
                android:clickable="true"
                android:focusable="true"
                app:cardBackgroundColor="@color/surface"
                app:cardCornerRadius="8dp"
                app:strokeColor="@color/terminal_green_dim"
                app:strokeWidth="1dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/link_osint"
                    android:textColor="@color/terminal_green"
                    android:textSize="14sp"
                    android:fontFamily="monospace" />

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

        <!-- Row 4: Defense, Offense -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="8dp">

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_defense"
                android:layout_width="0dp"
                android:layout_height="100dp"
                android:layout_weight="1"
                android:layout_marginEnd="4dp"
                android:clickable="true"
                android:focusable="true"
                app:cardBackgroundColor="@color/surface"
                app:cardCornerRadius="8dp"
                app:strokeColor="@color/terminal_green_dim"
                app:strokeWidth="1dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/link_defense"
                    android:textColor="@color/terminal_green"
                    android:textSize="14sp"
                    android:fontFamily="monospace" />

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

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_offense"
                android:layout_width="0dp"
                android:layout_height="100dp"
                android:layout_weight="1"
                android:layout_marginStart="4dp"
                android:clickable="true"
                android:focusable="true"
                app:cardBackgroundColor="@color/surface"
                app:cardCornerRadius="8dp"
                app:strokeColor="@color/terminal_green_dim"
                app:strokeWidth="1dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/link_offense"
                    android:textColor="@color/terminal_green"
                    android:textSize="14sp"
                    android:fontFamily="monospace" />

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

        <!-- Row 5: Settings (single, full width) -->
        <com.google.android.material.card.MaterialCardView
            android:id="@+id/card_settings"
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:layout_marginBottom="8dp"
            android:clickable="true"
            android:focusable="true"
            app:cardBackgroundColor="@color/surface"
            app:cardCornerRadius="8dp"
            app:strokeColor="@color/terminal_green_dim"
            app:strokeWidth="1dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="@string/link_settings"
                android:textColor="@color/terminal_green"
                android:textSize="14sp"
                android:fontFamily="monospace" />

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

    </LinearLayout>
</ScrollView>
