/* ===================================
   VARIABLES
=================================== */

:root {
    --background: #233d39;
    --background-dark: #1a302d;

    --white: #ffffff;

    --text: #17211f;

    --muted: #65716d;

    --light-text: #d0dfdb;

    --accent: #359580;

    --line: #daddda;

    --chip: #f0f2ef;
}


/* ===================================
   RESET
=================================== */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: var(--background);

    color: var(--white);
}


a {
    color: inherit;
}



/* ===================================
   MAIN PAGE
=================================== */

.games-page {
    width: min(
        1700px,
        calc(100% - 54px)
    );

    margin: 0 auto;

    padding:
        20px
        0
        50px;
}



/* ===================================
   TOP
=================================== */

.page-top {
    min-height: 36px;

    display: flex;

    justify-content:
        space-between;

    align-items: center;

    gap: 20px;
}


.back-link {
    color: #c6d8d4;

    text-decoration: none;

    font-size: 12px;

    font-weight: 700;
}


.back-link:hover {
    color: #ffffff;
}


.academic-label {
    color: #9ab6af;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.16em;
}



/* ===================================
   HERO
=================================== */

.games-hero {
    max-width: 800px;

    padding:
        20px
        0
        48px;
}


.eyebrow {
    color: #9dddd0;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 0.18em;
}


.games-hero h1 {
    margin:
        14px
        0
        18px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            42px,
            5vw,
            58px
        );

    line-height: 1.05;
}


.games-hero p {
    max-width: 760px;

    margin: 0;

    color: var(--light-text);

    font-size: 15px;

    line-height: 1.75;
}



/* ===================================
   GAMES GRID
=================================== */

.games-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 15px;
}



/* ===================================
   GAME CARD
=================================== */

.game-card {
    min-width: 0;

    min-height: 390px;

    padding:
        25px
        24px
        20px;

    display: flex;

    flex-direction: column;

    color: var(--text);

    background: #ffffff;

    border:
        1px
        solid
        #d9dddb;

    border-radius: 15px;

    text-decoration: none;

    box-shadow:
        0
        8px
        25px
        rgba(0, 0, 0, 0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.game-card:hover {
    transform:
        translateY(-6px);

    border-color:
        #8bb9ae;

    box-shadow:
        0
        18px
        40px
        rgba(0, 0, 0, 0.18);
}


.game-card:focus-visible {
    outline:
        3px
        solid
        #78c8b7;

    outline-offset: 4px;
}



/* ===================================
   CARD TOP
=================================== */

.game-top {
    display: flex;

    justify-content:
        space-between;

    align-items: center;

    gap: 15px;
}


.game-icon {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 25px;

    font-weight: 700;

    color: #17211f;
}


.difficulty {
    padding:
        6px
        10px;

    border-radius:
        100px;

    background:
        var(--chip);

    color:
        #68736f;

    font-size:
        8px;

    font-weight: 900;

    letter-spacing:
        0.05em;

    white-space:
        nowrap;
}



/* ===================================
   CATEGORY
=================================== */

.game-category {
    margin-top:
        38px;

    color:
        #73807c;

    font-size:
        9px;

    font-weight:
        900;

    letter-spacing:
        0.15em;
}



/* ===================================
   GAME TITLE
=================================== */

.game-card h2 {
    margin:
        10px
        0
        15px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        24px;

    line-height:
        1.2;
}



/* ===================================
   DESCRIPTION
=================================== */

.description {
    margin: 0;

    color:
        var(--muted);

    font-size:
        12px;

    line-height:
        1.75;
}



/* ===================================
   SKILLS
=================================== */

.game-skills {
    margin:
        25px
        0
        25px;

    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}


.game-skills span {
    padding:
        6px
        10px;

    border-radius:
        100px;

    background:
        var(--chip);

    color:
        #6e7875;

    font-size:
        9px;
}



/* ===================================
   CARD FOOTER
=================================== */

.game-footer {
    margin-top: auto;

    padding-top:
        17px;

    display: flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap: 15px;

    border-top:
        1px
        solid
        var(--line);
}


.game-info {
    display: flex;

    align-items:
        flex-end;

    gap: 17px;
}


.game-info div {
    min-width: 28px;
}


.game-info strong {
    display: block;

    color:
        #17211f;

    font-size:
        14px;

    line-height: 1;
}


.game-info small {
    display: block;

    margin-top:
        4px;

    color:
        #7b8582;

    font-size:
        7px;
}



/* ===================================
   PLAY
=================================== */

.play-button {
    flex-shrink: 0;

    padding-bottom:
        3px;

    color:
        var(--accent);

    font-size:
        10px;

    font-weight:
        900;

    letter-spacing:
        0.05em;
}



/* ===================================
   BOTTOM SECTION
=================================== */

.games-bottom {
    margin-top:
        48px;

    padding:
        27px
        30px;

    display: flex;

    justify-content:
        space-between;

    align-items: center;

    gap: 40px;

    border:
        1px
        solid
        rgba(
            255,
            255,
            255,
            0.16
        );

    border-radius:
        14px;

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );
}


.games-bottom > div {
    flex: 1;

    min-width: 0;
}


.games-bottom strong {
    display: block;

    margin-bottom:
        7px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        21px;
}


.games-bottom p {
    max-width:
        720px;

    margin: 0;

    color:
        #c7d8d4;

    font-size:
        13px;

    line-height:
        1.6;
}



/* ===================================
   RANDOM BUTTON
=================================== */

.random-game-button {
    flex-shrink: 0;

    padding:
        13px
        19px;

    border:
        1px
        solid
        #718c86;

    border-radius:
        9px;

    background:
        transparent;

    color:
        #ffffff;

    font: inherit;

    font-size:
        12px;

    font-weight:
        800;

    cursor: pointer;

    transition:
        0.25s ease;
}


.random-game-button:hover {
    background:
        #ffffff;

    color:
        var(--background);

    transform:
        translateY(-2px);
}



/* ===================================
   TABLET
=================================== */

@media screen and (max-width: 1250px) {

    .games-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .game-card {
        min-height:
            370px;
    }

}



/* ===================================
   MOBILE
=================================== */

@media screen and (max-width: 680px) {

    .games-page {
        width: 92%;

        padding-top:
            14px;
    }


    .academic-label {
        display: none;
    }


    .games-hero {
        padding:
            30px
            0
            38px;
    }


    .games-hero h1 {
        font-size:
            40px;
    }


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


    .game-card {
        min-height:
            385px;
    }


    .game-card h2 {
        font-size:
            25px;
    }


    .games-bottom {
        padding:
            24px;

        flex-direction:
            column;

        align-items:
            flex-start;
    }


    .random-game-button {
        width:
            100%;
    }

}
