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

html {
    font-size: 18px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #F7F5F2;
    color: #2C3E50;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Header === */
.site-header {
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    color: #fff;
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.site-subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    opacity: 0.9;
}

/* === Games Grid === */
.games-container {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* === Game Cards === */
.game-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: #2C3E50;
    border-left: 5px solid #4A90D9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.game-card:hover,
.game-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.game-card:focus-visible {
    outline: 3px solid #4A90D9;
    outline-offset: 2px;
}

.game-card:active {
    transform: translateY(0);
}

/* Card color variants */
.game-card--blue    { border-left-color: #4A90D9; }
.game-card--green   { border-left-color: #5CB85C; }
.game-card--orange  { border-left-color: #F5A623; }
.game-card--purple  { border-left-color: #9B59B6; }
.game-card--teal    { border-left-color: #1ABC9C; }
.game-card--rose    { border-left-color: #E74C3C; }

.game-card__emoji {
    font-size: 3rem;
    line-height: 1;
    flex-shrink: 0;
}

.game-card__title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.game-card__desc {
    font-size: 0.95rem;
    color: #5D6D7E;
    line-height: 1.4;
}

/* === Footer === */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: #7F8C8D;
    font-size: 0.85rem;
}

/* === Responsive === */
@media (max-width: 640px) {
    html {
        font-size: 16px;
    }

    .site-header {
        padding: 2rem 1rem;
    }

    .site-title {
        font-size: 2rem;
    }

    .games-container {
        padding: 1.25rem 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .game-card {
        padding: 1.25rem;
    }

    .game-card__emoji {
        font-size: 2.5rem;
    }
}

/* Large tablets and up — 3 columns */
@media (min-width: 900px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
