@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Orbitron:wght@500;600;700;800&display=swap');

:root {
    --bg: #070a12;
    --surface: #0d1220;
    --surface-2: #111827;

    --text: #f8fafc;
    --muted: #94a0b5;

    --cyan: #38bdf8;
    --blue: #5b7cfa;
    --purple: #9b7bea;
    --green: #4caf8a;
    --gold: #d6a85c;
    --rose: #d36b7c;

    --border: rgba(255,255,255,.09);
}


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

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: "Inter", sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(79, 70, 229, .14),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 15%,
            rgba(14, 165, 233, .10),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #060810,
            #080c16 50%,
            #060811
        );

    overflow-x: hidden;
}


/* =========================================
   SUBTLE BACKGROUND GRID
========================================= */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(255,255,255,.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.018) 1px,
            transparent 1px
        );

    background-size: 50px 50px;

    mask-image:
        linear-gradient(
            to bottom,
            black 0%,
            transparent 90%
        );

    z-index: -1;
}


/* =========================================
   HEADER
========================================= */

header {
    width: min(1200px, 92%);

    margin: 0 auto;

    padding: 65px 0 35px;

    text-align: center;
}

header h1 {
    margin: 0;

    font-family: "Orbitron", sans-serif;

    font-size: clamp(36px, 7vw, 68px);

    font-weight: 800;

    letter-spacing: 5px;

    color: #ffffff;

    text-shadow:
        0 0 25px rgba(96,165,250,.15),
        0 0 70px rgba(99,102,241,.08);
}

header p {
    margin: 12px 0 0;

    font-family: "Orbitron", sans-serif;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 4px;

    color: #69758c;
}


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

main {
    width: min(1200px, 92%);

    margin: 0 auto;

    padding: 10px 0 90px;

    display: grid;

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

    gap: 22px;
}


/* =========================================
   GAME LINKS
========================================= */

main > a {
    display: block;

    color: inherit;

    text-decoration: none;

    min-width: 0;
}


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

.game-card {
    --accent: #5b7cfa;

    position: relative;

    min-height: 225px;

    padding: 34px 36px;

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    overflow: hidden;

    isolation: isolate;

    border-radius: 22px;

    border: 1px solid var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.012)
        ),
        #0c111d;

    box-shadow:
        0 12px 35px rgba(0,0,0,.25),
        inset 0 1px 0 rgba(255,255,255,.035);

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


/* =========================================
   CARD GLOW
========================================= */

.game-card::before {
    content: "";

    position: absolute;

    width: 230px;
    height: 230px;

    right: -90px;
    top: -100px;

    background:
        radial-gradient(
            circle,
            color-mix(
                in srgb,
                var(--accent) 28%,
                transparent
            ),
            transparent 68%
        );

    opacity: .65;

    pointer-events: none;

    transition:
        transform .4s ease,
        opacity .4s ease;
}


/* =========================================
   BOTTOM ACCENT
========================================= */

.game-card::after {
    content: "";

    position: absolute;

    left: 36px;
    right: 36px;
    bottom: 0;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--accent),
            transparent
        );

    opacity: .35;

    transition:
        opacity .3s ease,
        box-shadow .3s ease;
}


/* =========================================
   CARD CONTENT
========================================= */

.game-card h2,
.game-card p {
    position: relative;

    z-index: 2;
}

.game-card h2 {
    margin: 0 0 12px;

    font-family: "Orbitron", sans-serif;

    font-size: clamp(20px, 2.5vw, 28px);

    font-weight: 700;

    line-height: 1.3;

    letter-spacing: .4px;

    color: #f8fafc;
}

.game-card p {
    margin: 0;

    max-width: 560px;

    color: #8995aa;

    font-size: 14px;

    line-height: 1.65;

    font-weight: 500;
}


/* =========================================
   HOVER
========================================= */

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

    border-color:
        color-mix(
            in srgb,
            var(--accent) 45%,
            transparent
        );

    box-shadow:
        0 22px 55px rgba(0,0,0,.42),
        0 0 30px
            color-mix(
                in srgb,
                var(--accent) 10%,
                transparent
            ),
        inset 0 1px 0 rgba(255,255,255,.07);
}

main > a:hover .game-card::before {
    transform: scale(1.35);

    opacity: 1;
}

main > a:hover .game-card::after {
    opacity: .9;

    box-shadow:
        0 0 14px var(--accent);
}


/* =========================================
   KEYBOARD FOCUS
========================================= */

main > a:focus-visible {
    outline: none;
}

main > a:focus-visible .game-card {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px
            color-mix(
                in srgb,
                var(--accent) 20%,
                transparent
            ),
        0 20px 50px rgba(0,0,0,.4);
}


/* =========================================
   INDIVIDUAL GAME COLORS
========================================= */

/* IQ */

main > a:nth-child(1) .game-card {
    --accent: #d6a85c;
}

/* Mind Match */

main > a:nth-child(2) .game-card {
    --accent: #38bdf8;
}

/* Sequence */

main > a:nth-child(3) .game-card {
    --accent: #8b7cf6;
}

/* BrainStorm */

main > a:nth-child(4) .game-card {
    --accent: #e07855;
}

/* Pattern Hacker */

main > a:nth-child(5) .game-card {
    --accent: #43b7a1;
}

/* Archery */

main > a:nth-child(6) .game-card {
    --accent: #c9975b;
}

/* Who Is Lying */

main > a:nth-child(7) .game-card {
    --accent: #c66a7b;
}

/* Color Memory */

main > a:nth-child(8) .game-card {
    --accent: #7771c9;
}


/* =========================================
   OPTIONAL SMALL GAME NUMBER
========================================= */

.game-card {
    counter-increment: game;
}


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

@media (max-width: 760px) {

    header {
        padding-top: 45px;
        padding-bottom: 28px;
    }

    header h1 {
        font-size: 38px;
        letter-spacing: 3px;
    }

    header p {
        font-size: 8px;
        letter-spacing: 2px;
    }

    main {
        width: 94%;

        grid-template-columns: 1fr;

        gap: 16px;
    }

    .game-card {
        min-height: 205px;

        padding: 30px;
    }

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

    .game-card p {
        font-size: 13px;
    }

    .game-card::after {
        left: 30px;
        right: 30px;
    }
}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 420px) {

    body {
        padding: 0;
    }

    header {
        width: 92%;

        padding-top: 38px;
    }

    header h1 {
        font-size: 32px;
    }

    main {
        width: 92%;

        padding-bottom: 60px;
    }

    .game-card {
        min-height: 190px;

        padding: 26px;
    }
}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
