/* --- Global Carousel Styles --- */
.all-game-carousels { margin: 0; }
.game-carousel-container { position: relative; width: 100%; overflow: hidden; }
.game-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0; 
    gap: 15px; 
    scroll-snap-type: x mandatory;
}

/* --- Game Item Wrapper --- */
.game-item {
    aspect-ratio: 16 / 10; 
    flex: 0 0 calc((100% / 5) - 12px);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1c1c1e;
    transition: transform 0.2s ease-out;
    scroll-snap-align: start;
}
.game-item:hover { transform: translateY(-4px); }

/* --- Core Sibling Elements --- */
.game-item > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.game-item img {
    object-fit: cover;
    transition: filter 0.3s ease;
    z-index: 1;
    filter: brightness(0.8);
}
.game-item:hover img { 
    filter: brightness(0.6);
}

.game-name {
    display: flex;
    align-items: flex-end;
    padding: 12px;
    color: #ffffff;
    font-size: 1.1em; 
    font-weight: 600;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
    pointer-events: none; 
    z-index: 3;
}
.full-card-link { z-index: 5; }

/* --- INDICATOR STYLES --- */
/* Container for Top-LEFT indicators (New, Popularity) */
.top-left-indicators {
    top: 10px;
    left: 10px;
    width: auto;
    height: 36px; /* Match the height of the favorite button for alignment */
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 30, 30, 0.7);
    padding: 0 8px; /* Padding on the sides */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* Standalone Favorite Button (Top-RIGHT) */
.favorite-btn {
    top: 10px; /* Aligns with the top of the other container */
    left: auto;
    right: 10px;
    width: 36px;
    height: 36px;
    z-index: 6;
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 50%; /* Perfect circle */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    pointer-events: auto; /* Make sure this is clickable */
}
.favorite-btn:hover { background: rgba(50, 50, 50, 0.9); transform: scale(1.1); }
.favorite-btn.is-favorite { color: #ff4757; }


/* Styles for items INSIDE the left container */
.new-game-indicator {
    background-color: #f7b731;
    color: #000000;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.7em;
    font-weight: 700;
    display: flex;
    align-items: center;
    height: 24px;
}
.new-game-indicator .fa-star { margin-right: 4px; }

.game-stats-indicator {
    color: #e0e0e0;
    font-size: 0.8em;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 0 4px;
    pointer-events: auto;
    cursor: default;
}
.game-stats-indicator .fa-fire { color: #ff6b6b; margin-right: 4px; }


/* --- Carousel Arrows & Scrollbar --- */
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); height: 50px; width: 50px; background-color: rgba(20, 20, 20, 0.6); color: var(--primary-text-color); border: none; border-radius: 50%; cursor: pointer; font-size: 1.5em; z-index: 10; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease, background-color 0.3s ease; }
.game-carousel-container:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background-color: rgba(20, 20, 20, 0.8); }
.carousel-arrow-left { left: 10px; }
.carousel-arrow-right { right: 10px; }
.game-carousel::-webkit-scrollbar { display: none; }
.game-carousel { -ms-overflow-style: none; scrollbar-width: none; }

/* --- Responsive Design --- */
@media (max-width: 1200px) { .game-item { flex-basis: calc((100% / 4) - (3 * 15px / 4)); } }
@media (max-width: 992px) { .game-item { flex-basis: calc((100% / 3) - (2 * 15px / 3)); } }
@media (hover: none) { .carousel-arrow { opacity: 0.8; } }
@media (max-width: 767px) { .game-carousel { gap: 10px; } .game-item { flex-basis: calc((100% / 2) - (1 * 10px / 2)); } .carousel-arrow { height: 40px; width: 40px; font-size: 1.2em; } }
@media (max-width: 480px) { .game-item { flex-basis: calc(60% - 5px); } }