/* =============================================
   Game Card — shared on About page and /games page
   ============================================= */

.game-cards-row {
    display: flex;
    gap: 0.875rem;
    margin-top: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.75rem 0rem;
    -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
    mask-image: linear-gradient(to right, black 88%, transparent 100%);
}

.game-cards-row::-webkit-scrollbar {
    display: none;
}

.game-card-link {
    flex: none;
    width: 140px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: var(--background-hover);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.game-card-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.game-card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3.5rem 0.5rem 0.6rem;
    background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.65) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.game-card-title {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: #fff;
    margin: 0;
}

.game-card-badges {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.game-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.game-rating-badge--high {
    background: rgba(26, 122, 60, 0.85);
    color: #a8f0c0;
}

.game-rating-badge--mid {
    background: rgba(122, 94, 0, 0.85);
    color: #ffd966;
}

.game-rating-badge--low {
    background: rgba(122, 26, 26, 0.85);
    color: #f0a8a8;
}

.game-mospick-badge {
    background: rgba(120, 88, 0, 0.9);
    color: #ffd700;
}

/* =============================================
   Games Page Hero
   ============================================= */

.games-page-hero {
    padding: 3rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeIn 0.6s ease-out both;
}

.games-page-hero h1 {
    font-size: 5rem;
    font-weight: 300;
    letter-spacing: -4px;
    line-height: 1;
    margin: 0;
}

.games-page-hero-desc {
    font-size: 1.05rem;
    color: silver;
    max-width: 520px;
    line-height: 1.6;
    margin: 0;
}

/* =============================================
   Game Type Filter Chips
   ============================================= */

.game-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 0.75rem;
}

.game-type-chip {
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    font-size: 0.78rem;
    cursor: pointer;
    border: 1px solid var(--accent);
    color: var(--accent);
    transition: all 0.18s ease-in-out;
    user-select: none;
    line-height: 1.6;
}

.game-type-chip:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.game-type-chip.active {
    background: var(--secondary);
    color: var(--background);
    border-color: var(--secondary);
    font-weight: 600;
}

/* =============================================
   Wrapping Game Card Grid
   ============================================= */

.game-cards-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.game-cards-wrap .game-card-link {
    flex: none;
    width: 140px;
    cursor: pointer;
}

/* =============================================
   Game Modal Shell
   ============================================= */

.game-modal {
    background-color: var(--background);
    color: var(--text);
    border-radius: var(--border-radius);
    padding: 1rem;
    width: 100%;
    max-width: 660px;
    max-height: 90vh;
    overflow-y: auto;
}

.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 1rem;
}

.game-modal-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: -1px;
}

.game-modal-close {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 36px;
    min-height: 36px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.6;
}

.game-modal-close:hover {
    background-color: var(--background-hover);
    opacity: 1;
}

/* Body — float layout on desktop */
.game-modal-body {
    padding: 1.25rem 0.25rem 0.5rem;
}

.game-modal-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Cover image — floated right */
.game-modal-cover {
    float: right;
    width: 160px;
    margin: 0 0 0.5rem 1.5rem;
}

.game-modal-cover-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Badges — floated right, stacked below the cover */
.game-modal-cover-meta {
    float: right;
    clear: right;
    width: 160px;
    margin: 0 0 1rem 1.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.game-type-badge {
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent);
}

/* Text — flows left of the floats on desktop */
.game-modal-platform {
    font-size: 0.8rem;
    color: var(--accent);
    margin: 0 0 0.75rem;
    letter-spacing: 0.2px;
}

.game-modal-review {
    margin: 0;
    font-size: 0.975rem;
    line-height: 1.7;
    color: silver;
}

.game-modal-clearfix {
    clear: both;
}

/* =============================================
   Mobile
   ============================================= */

@media (max-width: 768px) {
    .games-page-hero h1 {
        font-size: 3rem;
        letter-spacing: -2.5px;
    }

    .game-cards-wrap .game-card-link {
        width: 120px;
    }

    .game-type-chip {
        font-size: 0.72rem;
        padding: 0.25rem 0.65rem;
    }

    /* Stack modal: cover (small) → badges row → review */
    .game-modal {
        max-height: 95vh;
    }

    .game-modal-title {
        font-size: 1.4rem;
        letter-spacing: -0.5px;
    }

    .game-modal-cover {
        float: none;
        width: 110px;
        margin: 0 0 0.75rem 0;
    }

    .game-modal-cover-meta {
        float: none;
        clear: none;
        width: auto;
        margin: 0 0 1rem 0;
    }
}
