body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    text-align: center;
    color: #4CAF50;
}

label {
    display: block;
    margin: 20px 0 10px;
    font-weight: bold;
    text-align: center;
}

input[type="text"], button {
    width: calc(100% - 40px); /* Same width as game items */
    max-width: 250px; /* Restrict to the same width as game items */
    padding: 10px;
    margin: 0 auto 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: block;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

.loading {
    display: none;
    font-size: 18px;
    color: #4CAF50;
    margin: 20px 0;
}

.game-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.game-item {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    width: calc(100% - 40px); /* Full width on mobile */
    text-align: center;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.game-item img {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}

h2 {
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
    color: #4CAF50;
    text-align: center;
}

.sold, .acquired {
    opacity: 0.3;
}

.sold::after, .acquired::after {
    content: attr(data-status);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    width: 80%;
}

@media (min-width: 768px) {
    .game-item {
        width: calc(50% - 20px); /* Two columns on tablets */
    }
}

@media (min-width: 1024px) {
    .game-item {
        width: calc(25% - 20px); /* Four columns on desktops */
    }
}