* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Desktop First - Default Styles (1260px and above) */
.game-card-container {
    color: white;
    width: 1260px;
    margin: 0 auto;
    position: relative;
    margin-bottom: 64px;
}
.game-card-header-title-container{
    display: flex;
    align-items: center;
    gap: 10px;
}
.game-card-header-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #fff;
}
.game-card-header-title-container .game-card-header-title-arrow {
    transition: transform 0.2s ease;
}
.game-card-header-title-container:hover .game-card-header-title-arrow{
    transform: translateX(5px);
}

.game-cards {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.game-cards::-webkit-scrollbar {
    display: none;
}

.game-card {
    flex: 0 0 auto;
    width: 300px;
    overflow: visible;
    transition: transform 0.2s;
    scroll-snap-align: start;
    position: relative;
    cursor: pointer;
}

.game-card-image-container {
    position: relative;
    width: 300px;
    height: 200px;
}

.game-card-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0);
    transition: background-color 0.2s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 8px;
}

.game-card:hover .game-card-image-container::before {
    background-color: rgba(255, 255, 255, 0.20);
}

.game-card-img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.game-card-info {
    padding-top: 15px;
}

.game-title {
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.2;
    color: #fff;
}

.game-descript{
    font-size: 0.75rem;
    color: hsla(0,0%,100%,0.65);
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.navigation-arrows {
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    gap: 10px;
}

.nav-arrow {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.2s;
    z-index: 1;
}

.nav-arrow:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: hsl(357, 92%, 47%);
    font-size: 14px;
}

.rating-count {
    color: hsla(0,0%,100%,0.65);
    font-size: 0.75rem;
    margin-left: 4px;
}

/* =========================
   TOUCH DEVICE OPTIMIZATIONS
   For all touch-enabled devices
   ========================= */
@media (hover: none) {
    .game-cards {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* Grid Layout for Category Cards */
.category-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.category-card-grid .game-card {
    width: 100%;
    margin-bottom: 32px;
}

.category-card-grid .game-card-image-container {
    width: 100%;
    height: 200px;
}

.category-card-grid .game-card-img {
    width: 100%;
    height: 200px;
}

.category-page-content .game-card-header-title{
    font-size: 1.5rem;
}

.category-page-content .game-card-header{
    flex-direction: column;
    gap: 12px;
}

.category-page-content .game-card-header-description{
    font-size: 0.8rem;
    width: 50%;
    line-height: 1.6;
    color: hsla(0,0%,100%,0.65);
}

/* Responsive Grid Layout */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .category-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-card-container {
        width: 620px;
    }
}

@media screen and (max-width: 768px) {
    .category-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-card-container {
        width: 620px;
    }
    
    .game-card-header-title {
        font-size: 1.1rem;
    }
    
    .game-title {
        font-size: 0.9rem;
    }
    
    .game-descript {
        font-size: 0.7rem;
    }

    .category-page-content .game-card-header-description{
        width: 80%;
    }
}   

@media screen and (max-width: 480px) {
    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .game-card-container {
        width: 300px;
    }
    
    .nav-arrow {
        width: 25px;
        height: 25px;
    }

    /* Hide arrows on mobile/tablet portrait */
    .navigation-arrows {
        display: none; 
    }

    .category-page-content .game-card-header-description{
        width: 100%;
    }
} 

/* Game Card Popup Styles */
.game-card-popup {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background-color: rgba(17, 17, 17, 0.95);
    padding: 20px;
    border-radius: 12px;
    z-index: 1000;
    width: 140%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

.game-card-popup.active {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.popup-image {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.popup-content {
    color: white;
}

.popup-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.popup-description {
    font-size: 1rem;
    line-height: 1.6;
    color: hsla(0,0%,100%,0.85);
}

.popup-overlay {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 999;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

.popup-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Responsive popup styles */
@media screen and (max-width: 768px) {
    .game-card-popup {
        width: 95%;
        padding: 15px;
    }

    .popup-title {
        font-size: 1.2rem;
    }

    .popup-description {
        font-size: 0.9rem;
    }
} 

/* Add this near the top of the file, after the initial reset */
body.is-scrolling .game-card-popup,
body.is-scrolling .popup-overlay {
    transition: none !important;
}

body.is-scrolling .game-card {
    pointer-events: none;
} 