/* =========================================================
   GAME GRID
   ========================================================= */

main {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;

    width: 100%;
    max-width: 1400px;

    margin: 2rem auto;
    padding: 0 1rem;

    box-sizing: border-box;
}


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

.game-card {
    position: relative;

    width: 100%;
    min-width: 0;
    min-height: 260px;

    padding: 1.5rem;

    flex: 1 1 calc((100% - 3rem) / 3);
    box-sizing: border-box;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.025)
        );

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.25),
        inset 0 0 25px rgba(255, 255, 255, 0.015);

    overflow: hidden;

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


/* =========================================================
   STATUS
   ========================================================= */

.game-status {
    position: absolute;

    top: 1.2rem;
    left: 1.2rem;

    width: 11px;
    height: 11px;

    border-radius: 50%;

    transform: translateX(50%);
}


.game-card.is-open .game-status {
    background: #2ecc71;

    box-shadow:
        0 0 5px #2ecc71,
        0 0 12px #2ecc71,
        0 0 22px rgba(46, 204, 113, 0.5);
}

.game-card.is-locked .game-status {
    background: #f5c542;

    box-shadow:
        0 0 5px #f5c542,
        0 0 12px #f5c542,
        0 0 22px rgba(245, 197, 66, 0.5);
}

.game-card.is-closed .game-status {
    background: #e74c3c;

    box-shadow:
        0 0 5px #e74c3c,
        0 0 12px #e74c3c,
        0 0 22px rgba(231, 76, 60, 0.45);
}


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

.game-content {
    display: flex;
    flex-direction: column;

    min-height: 230px;
}

.game-description {
    flex: 1;

    padding-top: 0.5rem;
    padding-right: 1.5rem;
}

.game-title {
    margin: 0.5rem 0 0.75rem;

    font-size: 1.5rem;
    line-height: 1.2;

    font-weight: 700;

    letter-spacing: -0.025em;
}

.game-type {
    margin: -0.5rem 0 0.75rem;

    font-size: .75rem;
    line-height: 1.2;

    font-weight: 700;

    letter-spacing: -0.025em;
}

.game-subtitle {
    margin: 0;

    font-size: 0.9rem;
    line-height: 1.55;

    color: rgba(255, 255, 255, 0.58);
}

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

.game-actions {
    margin-top: 1.5rem;
}


.game-toggle {
    position: relative;

    display: block;

    width: 100%;

    padding: 0.85rem 1rem;

    border: 1px solid rgba(28, 117, 233, 0.65);
    border-radius: 7px;

    background:
        linear-gradient(
            90deg,
            rgba(28, 117, 233, 0.18),
            rgba(28, 117, 233, 0.04)
        );

    color: white;

    font-family: inherit;

    font-size: 0.85rem;
    font-weight: 700;

    letter-spacing: 0.04em;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.game-toggle:hover {
    background:
        linear-gradient(
            90deg,
            rgba(28, 117, 233, 0.4),
            rgba(28, 117, 233, 0.12)
        );

    border-color: #1c75e9;

    transform: translateY(-2px);

    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.25),
        0 0 15px rgba(28, 117, 233, 0.12);
}


.game-toggle:active {
    transform: translateY(0);
}

.game-toggle.rissen {
    border: 2px solid green;
}

.game-toggle.disabled {
    opacity: 0.45;    background:rgba(255, 255, 255, 0.04);
    border-color:rgba(255, 255, 255, 0.15);
    color:rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

.game-toggle.disabled:hover {
    background: linear-gradient(
                    90deg,
                    rgba(255, 255, 255, 0.06),
                    rgba(255, 255, 255, 0.025)
                );
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.35);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

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

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

}


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

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

        padding: 0 1rem;
    }

}