/* Gallery Header */
.gallery-header {
    margin: 4rem 0 3rem;
}

.gallery-header h1 {
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.all-games-glassy-container {
    position: relative;
    padding-left: 5rem;
    padding-right: 5rem;
}

@media (max-width: 992px) {
    .all-games-glassy-container {
        padding-left: 0rem;
        padding-right: 0rem;
    }
}

.all-games-glassy-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
}

.all-games-notch-title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
    background: rgba(20, 24, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 0.5rem 2rem;
    color: var(--text-color, #fff);
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Gallery Item Styling */
.gallery-item {
    position: relative;
    aspect-ratio: 460 / 215;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px var(--accent-glow);
    z-index: 10;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

/* Overlay & Interaction */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.overlay-content {
    color: white;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.overlay-content h5 {
    margin: 0 0 0.5rem 0;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.overlay-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.gallery-fallback-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--card-bg) 0%, #21262d 100%);
    color: var(--text-color);
    text-align: center;
    padding: 1.5rem;
}

.gallery-fallback-bg h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    z-index: 10;
}

@media (max-width: 576px) {
    .all-games-notch-title {
        font-size: 1rem;
        padding: 0.4rem 1rem;
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }
}