/* Modern Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #0f172a; /* Deep slate blue/black */
    --card-bg: #1e293b; /* Lighter slate */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8; /* Sky blue */
    --accent-glow: rgba(56, 189, 248, 0.4);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3 {
    line-height: 1.1;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Layout */
header {
    padding: 2rem 1rem;
    text-align: center;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Game Card */
.game-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow), 0 0 15px var(--accent-glow);
    border-color: rgba(56, 189, 248, 0.3);
}

.card-image-wrapper {
    width: 100%;
    height: 200px;
    background-color: #020617;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.play-button {
    display: inline-block;
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent);
    color: #0f172a;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.play-button:hover {
    background-color: #7dd3fc; /* Lighter sky blue */
}

.play-button:active {
    transform: scale(0.98);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}
