/* ========================================
 * Project: Dice Games Collection
 * File: style.css
 * Author: Bretscher Jan
 * Date: 10.02.25
 * Version: 1.0
 * Description: Stylesheet for the dice games collection main page.
 *              Contains styling for responsive game cards grid,
 *              hover effects and mobile adaptations.
 * ======================================== */

/* Reset default styles for all elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Basic styling for the page body */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    padding: 2rem;
}

/* Center content and set maximum width */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Style the main heading */
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
}

/* Create a responsive grid for game cards */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: 2rem;
    padding: 1rem;
    justify-content: center;
}

/* Style individual game cards */
.game-card {
    background-color: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
    width: 300px;
    margin: 0 auto;
}

/* Add hover effect to game cards */
.game-card:hover {
    transform: translateY(-5px);
}

/* Style game card titles */
.game-card h3 {
    color: #444;
    margin-bottom: 1rem;
}

/* Style game card images */
.game-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 5px;
}

/* Remove underline from links */
.game-card a {
    text-decoration: none;
}

/* Make grid single column on mobile devices */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
}
