/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Pixelify Sans", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Title */
h1 {
    margin-top: 40px;
    font-size: 20px;
    letter-spacing: 2px;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;

    width: 90%;
    max-width: 800px;
}

/* Card base */
.card {
    width: 220px;
    height: 130px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    color: white;

    position: relative;
    border-radius: 12px;

    overflow: hidden;

    /* pixel box style */
    background: #222;
    border: 4px solid #555;

    box-shadow:
        0 0 0 3px black,
        6px 6px 0px black;

    transition: 0.2s;
}

/* Text */
.card span {
    position: relative;
    z-index: 2;
    text-align: center;
    font-size: 12px;
    text-shadow: 2px 2px 0px black;
}

.card:hover {
    transform: translateY(-5px);
}

.rps-card {
    background-image: url("images/RockPaperScissors.jpg");
    background-size: cover;
    background-position: center;
}

.rps-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/*XO*/
.xo-card {
    background-image: url("images/xo.jpg");
    background-size: cover;
    background-position: center;
}

.xo-card::before {
    content: "";
    position: absolute;
    inset: 0;
}

/*Guess*/
.guess-card {
    background-image: url("images/guess.png");
    background-size: cover;
    background-position: center;
}

.guess-card::before {
    content: "";
    position: absolute;
    inset: 0;
}


/* 📱 Mobile */
@media (max-width: 500px) {
    .container {
        flex-direction: column;
        transform: scale(0.95);
    }

    .game-box {
        width: 90%;
    }

    .history-panel {
        width: 90%;
    }
    @media (max-width: 500px) {
    h1 {
        font-size: 16px;
    }

    .card {
        height: 100px;
    }
}
}

/* 📲 Tablet */
@media (min-width: 501px) and (max-width: 900px) {
    .container {
        transform: scale(1.1);
    }
}

/* 💻 Laptop */
@media (min-width: 901px) {
    .container {
        transform: scale(1.3);
    }
}