/* ТВОЙ CSS (как ты дал) */
.grid {
    margin-top: 100px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    text-align: center;
}

.card {
    background-color: #DCDCDC;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: clamp(80px, 20vw, 150px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px black;
}

.card img {
    width: 100%;
    border-radius: 10px;
}

/* выбранная карточка */
.card.selected {
    box-shadow: 0 0 25px #00bfff;
    border: 2px solid #00bfff;
}

/* чтобы можно было позиционировать надпись */
.card {
    position: relative;
}

/* надпись популярно */
.card.popular::after {
    content: "Популярно";
    position: absolute;
    top: -10px;
    right: -10px;

    background: red;
    color: white;
    font-size: 12px;
    font-weight: bold;

    padding: 5px 10px;
    border-radius: 10px;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.timer {
    font-size: clamp(14px, 3vw, 25px);
}

@media (max-width: 325px) {
    .card {
        width: clamp(60px, 20vw, 150px);
    }
}

@media (max-width: 290px) {
    .grid {
        padding: 10px;
        gap: 30px;
    }

    .card {
        padding: 10px;
    }
}

/* ===== ДОБАВЛЕНО: POPUP С BLUR ===== */

.games-popup {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 999999;
}

.games-popup.show {
    opacity: 1;
    pointer-events: auto;
}

.games-content {
    background: #fff;
    padding: 24px 28px;
    border-radius: 16px;
    text-align: center;
    min-width: 260px;
    max-width: 90vw;
}

.games-list div {
    padding: 6px 0;
    font-size: 18px;
}



.games-hint {
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.7;
}