<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Game Downloads</title>
    <style>
        body {
            background-color: #2E2E2E;
            color: white;
            font-family: 'Arial', sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            margin: 0;
        }
        h1 {
            font-size: 28px;
            margin: 20px 0;
            text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
        }
        .game-container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
        }
        .game-card {
            background-color: rgba(35, 39, 42, 0.9);
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
            width: 300px;
            text-align: center;
        }
        .game-card img {
            width: 100%;
            border-radius: 10px;
            margin-bottom: 15px;
        }
        .game-card h2 {
            font-size: 20px;
            margin-bottom: 15px;
        }
        .game-card button {
            padding: 12px;
            background-color: #7289da;
            border: none;
            border-radius: 5px;
            color: white;
            font-size: 16px;
            cursor: pointer;
            width: 100%;
            transition: background-color 0.3s, transform 0.3s;
        }
        .game-card button:hover {
            background-color: #5b6eae;
            transform: translateY(-2px);
        }
        .game-card button:active {
            background-color: #4b5a7e;
            transform: translateY(0);
        }
    </style>
</head>
<body>
    <h1>Game Downloads</h1>
    <div class="game-container">
        {% for game in games %}
        <div class="game-card">
            <img src="{{ game.image }}" alt="{{ game.name }}">
            <h2>{{ game.name }}</h2>
            <a href="{{ game.download_link }}" target="_blank">
                <button>Download</button>
            </a>
        </div>
        {% endfor %}
    </div>
</body>
</html>
