.list img {
    width: 100%;
    margin-bottom: 1em;
    cursor: pointer;
    /* max-width: 300px;
    object-fit: cover; */
}

.list {
    /* display: grid;
    grid-template-columns: repeat(3, 1fr); */

    /* display: flex;
    flex-wrap: wrap; */

    /* column-count: 3; */
    columns: 300px;
    padding: 1rem;
    display: block;
}

#Screen {
    padding-top: 3%;
    padding-bottom: 1.5%;
    background: radial-gradient(circle at top, #0ff1, #000);
}

/* ------------------ New card panel styles ------------------ */
.game-card {
    background: #111;
    color: #eee;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin: 0 0 1.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    /* works with column layout */
    width: 100%;
    break-inside: avoid;
    /* keeps card intact in columns */
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.game-info {
    padding: 1rem;
}

.game-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #0ff;
}

.game-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #ccc;
}

.play-btn {
    background: #0ff;
    color: #111;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.play-btn:hover {
    background: #0cc;
    transform: scale(1.08);
}


/* ------------------ Game Window ------------------ */
/* Modal background */
.modal {
    display: none;
    /* hidden by default */
    position: fixed;
    z-index: 9999;
    /* on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    /* dim background */
}

/* Modal content box */
.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 15px;
    border-radius: 10px;
    width: 80%;
    max-width: 900px;
    height: 80%;
    display: flex;
    flex-direction: column;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn,
.cancel-btn {
    background: crimson;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
}

.close-btn:hover,
.cancel-btn:hover {
    background: darkred;
}

/* Game area */
#gameContainer {
    flex: 1;
    margin-top: 10px;
    background: #000;
    overflow: hidden;
    border-radius: 8px;
}


/* ------------------ Confirmatuin Pop up ------------------ */
/* Confirmation popup full-screen backdrop */
#confirmPopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

/* Only target confirm popup content */
#confirmPopup .modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: auto;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    /* FIX: prevent stretching */
    height: auto;
    max-height: none;
}

/* Confirmation message text */
.confirm-box {
    text-align: center;
}

/* Buttons container */
.confirm-actions {
    display: flex;
    justify-content: space-evenly;
    margin-top: 15px;
}

/* Buttons */
.yes-btn {
    background-color: #d9534f;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.no-btn {
    background-color: #5bc0de;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Hover effects */
.yes-btn:hover {
    background-color: #c9302c;
}

.no-btn:hover {
    background-color: #31b0d5;
}