/* Games Grid Layout */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Game Card */
.game-card {
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 15px rgba(122,162,255,0.4);
}

/* Game Image */
.game-card img {
    width: 100% !important;
    height: 140px !important; /* adjust as needed */
    object-fit: cover !important;
    object-position: center top !important;
    display: block;
}

/* Game Title */
.game-card h3 {
    font-size: 1rem;
    margin: 0.5rem 0.75rem;
    color: #fff;
}

/* Playtime */
.game-card p {
    font-size: 0.85rem;
    margin: 0 0.75rem 0.75rem;
    color: #aaa;
}

/* Full Game Modal Background */
.game-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.hidden {
    display: none;
}

/* Modal Content */
.game-modal-content {
    background: #111;
    padding: 1.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 0 20px rgba(122,162,255,0.4);
    position: relative;
    animation: fadeIn 0.2s ease-out;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #fff;
}

/* Header Image */
.modal-header-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Title */
#modalTitle {
    margin: 0.5rem 0;
    color: #fff;
}

/* Description */
#modalDesc {
    color: #ccc;
    margin-bottom: 1rem;
}

/* Playtime */
.modal-playtime {
    color: #7aa2ff;
    margin-bottom: 1.5rem;
}

/* Full Page Button */
.modal-full-btn {
    background: #7aa2ff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    color: #000;
    font-weight: bold;
    transition: background 0.2s ease;
}

.modal-full-btn:hover {
    background: #9bb8ff;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Hover Preview Modal (Steam-style) */
.hover-modal {
    position: absolute;
    background: rgba(0, 0, 0, 0.92);
    padding: 1rem;
    border-radius: 8px;
    width: 320px;
    z-index: 9999;
    box-shadow: 0 0 12px rgba(122,162,255,0.4);
    pointer-events: none; /* prevents blocking hover */
    transition: opacity 0.15s ease;
	pointer-events: auto; /* allow clicking */
}

.hover-modal.hidden {
    display: none;
}

.hover-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hover-cover {
    width: 100%;
    border-radius: 6px;
}

.hover-title {
    color: #fff;
    font-size: 1rem;
    margin: 0;
}

.hover-desc {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.3;
    max-height: 90px;
    overflow: hidden;
}

.hover-full-btn {
    margin-top: 0.5rem;
    background: #7aa2ff;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    color: #000;
    font-weight: bold;
    font-size: 0.85rem;
    pointer-events: auto; /* allow clicking */
}

.hover-full-btn:hover {
    background: #9bb8ff;
}

.modal-info {
    color: #ccc;
    margin: 0.25rem 0 0.5rem;
    font-size: 0.9rem;
}

.modal-info strong {
    color: #7aa2ff;
}