/* Reset & box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base font sizing */
html {
    font-size: 62.5%;
}

/* Body */
body {
    font-family: sans-serif;
    /* default for paragraphs, lists, links */
    font-weight: 300;
    font-size: 1.6rem;
    line-height: 1.5;
    background: #fff;
    color: #000;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem;
}

/* Main container */
main {
    border: 0.2rem solid #4055e0;
    padding: 2rem;
    border-radius: 3rem;
    margin: auto;
    /* set a comfortable narrower max width (600px) */
    max-width: 60rem;
    /* 60rem @ 1rem = 10px => 600px */
    width: 100%;
    text-align: left;
}

/* Header */
h1 {
    font-family: 'Playwrite GB S', cursive;
    /* fancy font only for heading */
    font-weight: 400;
    font-size: 2.4rem;
    line-height: 1.2;
    color: #4055e0;
    padding-bottom: 1.5rem;
    cursor: pointer;
    transition: transform 0.1s ease;
    display: inline-block;
    perspective: 1000px;
}

h1.spinning {
    animation: spin360 1s ease-in-out;
    transform-style: preserve-3d;
}

@keyframes spin360 {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

/* Paragraphs */
#content p {
    margin-bottom: 0.5rem;
    /* vertical spacing between text blocks */
}

/* Lists */
ul {
    list-style-position: outside;
    margin: 0.5rem 0;
    /* space above/below list */
    padding-left: 2rem;
    /* let the bullet handle its own space */
}

li {
    margin-bottom: 0.1rem;
    /* space between items */
}

li a {
    font-weight: 400;
    display: inline;
}

.desc {
    display: inline;
    font-style: italic;
    font-weight: 300;
}


/* Links */
a {
    font-weight: 400;
    color: #4055e0;
    text-decoration: none;
}

a:hover,
a:active {
    text-decoration: underline;
}

/* Divider (optional) */
.hr-divider {
    border: none;
    border-top: 0.1rem solid #4055e0;
    width: 80%;
    margin: 2rem auto;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    html {
        font-size: 60%;
    }

    main {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }
}

/* Games grid: card-like, two-column layout on wide screens, stacked on phones */
.games-grid {
    display: grid;
    /* Always use two columns (never shrink to a single column as requested) */
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem;
    margin-top: 1rem;
}

.game-card {
    background: linear-gradient(180deg, rgba(64, 85, 224, 0.04), rgba(64, 85, 224, 0.01));
    border: 0.1rem solid rgba(64, 85, 224, 0.12);
    border-radius: 1.2rem;
    overflow: hidden;
}

.game-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.screenshot {
    background: #111;
    display: block;
    width: 100%;
    /* make thumbnails square */
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.screenshot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1.2rem 1.2rem 0 0;
}

.meta {
    padding: 1rem 1.2rem;
}

.meta h3 {
    margin-bottom: 0.3rem;
    font-size: 1.6rem;
    color: #223;
}

.meta .desc {
    margin: 0;
    color: #444;
    font-size: 1.3rem;
    font-style: italic;
}

.game-card:hover,
.game-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(16, 30, 115, 0.12);
}

.game-link:focus {
    outline: 0.2rem solid rgba(64, 85, 224, 0.35);
    outline-offset: 0.3rem;
}

/* Two columns on medium/large screens */
/* Two columns enforced at all sizes — no media query needed */

footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 1.4rem;
    color: #666;
}