/* Global Reset & Body handled by main style.css effectively, but ensuring consistency */
body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #ffffff;
    font-family: 'Press Start 2P', cursive;
    overflow-x: hidden;
}

/* Page Container */
#games-page-container {
    width: 100%;
}

/* Generic Section Style for the 5 Sections */
.games-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /* Each section takes full viewport height? or just distinct blocks? User said "scrolling page", so blocks. */
    /* User said "page divided in 5 sections... 4 projects in one line... spacing... 4 projects" */
    /* Let's make min-height flexible or ample padding */
    padding: 100px 5%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-content: center;
    border-bottom: none;
    /* Removed border as requested */
}

#games-section-1 {
    padding-top: 40px;
    /* Reduced top padding for first section to bring heading up */
    justify-content: flex-start;
    /* Align content to start to favor top */
}

#games-section-1 .games-section-content {
    display: flex;
    flex-direction: column;
    min-height: 85vh;
    /* Take up most of the viewport */
}

#games-section-1 .projects-grid {
    margin-top: auto;
    /* Push to center */
    margin-bottom: auto;
    /* Push to center */
}

/* Background Media */
.games-section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.4;
    /* Dim it slightly so content pops */
}

/* Content Wrapper */
.games-section-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Section Title (Optional, handy for debugging or future use) */
.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000;
}

/* 4-Column Grid */
/* Main Grid - Auto-fill for responsive squared look */
.projects-grid {
    display: grid;
    /* Use auto-fill with smaller min-width (e.g., 250px) to make cards narrower/sqaurer */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Project Card "Block Out" Design */
/* Project Card "Block Out" Design */
.project-card {
    background-color: #000;
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 0;
    /* Remove padding to let image fill */
    display: flex;
    flex-direction: column;
    position: relative;
    aspect-ratio: 1/1;
    /* FORCE SQUARE CARD */
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    border-color: var(--neon-cyan);
}

.project-image-placeholder,
.project-card img {
    width: 100%;
    height: 100%;
    /* Fill the square card */
    object-fit: cover;
    border-radius: 7px;
    /* Match card radius minus border */
}

/* Card Title (Overlay at bottom) */
.project-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
    padding: 20px 10px 10px 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 1px;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cols on tablets */
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        /* 1 col on mobile */
    }
}