/* ==== OUTER CONTAINER ==== */
.game-container {
    padding: 30px;
}

/* ==== TOP SEARCH & INFO BAR ==== */
.top-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.search-form {
    width: 295px;
    height: 50px;
    border: 1px solid #FED853;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 5px;
}

.search-form input[type="text"] {
    flex: 1;
    height: 100%;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
    padding-left: 5px;
}

.search-form button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
}

.result-info {
    font-size: 16px;
}

.result-info .active-filter {
    background: #e0e0e0;
    padding: 5px 10px;
    margin-left: 10px;
    border-radius: 20px;
    display: inline-block;
}

.result-info .remove-filter {
    margin-left: 5px;
    color: red;
    text-decoration: none;
    font-weight: bold;
}

/* ==== WRAPPER ==== */
html, body {
    height: 100%;
    margin: 0;
}

.game-wrapper {
    display: flex;
    height: 150vh;
    overflow: hidden; /* Prevent page scroll */
}

/* Sidebar stays fixed in place visually */
.sidebar {
    flex: 0 0 320px; /* Keep layout */
    height: 150vh;
    overflow-y: auto;
    background: #f9f9f9;
    position: sticky;
    top: 0;
}

/* ==== Resource Toggle Button ==== */
.resource-toggle {
    width: 100%;
    height: 60px;
    background: #FED853;
    font-size: 20px;
    line-height: 60px;
    text-align: left;
    padding: 0 20px;
    border: none;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    color: black;
}

.resource-toggle .arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.resource-toggle.collapsed .arrow {
    transform: translateY(-50%) rotate(-90deg);
}

/* ==== Dropdown List (Categories) ==== */
.resource-list {
    list-style: none;
    padding: 20px;
    margin: 0;
    display: block;
    /* transition: all 0.3s ease; */
}

.resource-list:not(.open) {
    display: none;
}

.resource-list li {
    margin-bottom: 15px;
}

.resource-list li a {
    display: block;
    width: 100%;
    height: 50px;
    line-height: 50px;
    background: #fff;
    border: 1px solid #000000;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    color: #000;
    font-weight: 600;
    /* transition: all 0.3s ease; */
}

.resource-list li a:hover,
.resource-list li a.active {
    background: #FED853;
    color: #000;
}

/* Push main content to the right of sidebar */
/* Scrollable content area */
.content {
    flex: 1;
    overflow-y: auto;
    height: 150vh;
    padding: 20px;
}
/* ==== GAME GRID ==== */
/* .game-grid {
    display: flex;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
} */
 .game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ==== GAME CARD ==== */
.game-card {
    background: #F0F0F0;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-card img {
    max-width: 100%;
    border-radius: 6px;
}

.card-footer {
    margin-top: 10px;
}

.card-footer h4 {
    font-size: 14px;
    margin: 5px 0;
}

.download-link {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 12px;
    /* background: #00aaff; */
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

/* .download-link:hover {
    background: #0077cc;
} */

/* Show download button only on hover with image overlay */
.game-card {
    position: relative;
    overflow: hidden;
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.image-wrapper img {
    width: 100%;
    display: block;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    inset: 0;
    /* background: hwb(0 79% 21% / 0.4); */
     background-image: linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
    display: flex;
    align-items: self-end;
    justify-content: center;
    
}

.download-link {
    padding: 10px 20px;
    /* background: #00aaff; */
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.game-card:hover .image-overlay {
    opacity: 1;
}

.game-card:hover .download-link {
    opacity: 1;
    transform: translateY(0);
}

.game-card:hover img {
    transform: scale(1.05);
}


.age_group_name {
    padding-bottom: 30px;
    font-size: 30px;
    font-weight: 800;
    font-family: Urbanist !important;
    letter-spacing: 1px;
    color: black;
}

.result-info {
    display: none;
}



/* ==== RESPONSIVE STYLES ==== */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }

    .top-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .search-form {
        width: 100%;
    }

    .resource-list li a {
        margin-left: 0;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive: 2 columns on tablet, 1 on mobile */
@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: 2fr;
    }
}