/* ==========================================================================
   DISEÑO PROFESIONAL PARA PÁGINA DE JUEGOS (TEMA CLARO)
   ========================================================================== */

/* Contenedor Principal */
.games-main-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1.5rem;
}

/* Cabecera de la sección */
.games-header {
    text-align: center;
    margin-bottom: 2.5rem;
    margin-top: 1.5rem; /* <-- AÑADIDO: Espacio superior adicional */
}
.games-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1e3a8a; /* Azul oscuro de la marca */
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.025em;
}
.games-header p {
    font-size: 1.125rem;
    color: #4b5563;
    margin-top: 0.5rem;
}

/* Barra de Filtros y Búsqueda */
.filters-container {
    background-color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
    border: 1px solid #e5e7eb;
}
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.category-filters .filters-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}
.category-filters .filter-btn {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    text-decoration: none;
    font-size: 0.875rem;
}
.category-filters .filter-btn:hover {
    background-color: #e5e7eb;
}
.category-filters .filter-btn.active {
    background-color: #C70064; /* Fucsia de la marca */
    color: white;
    border-color: #C70064;
    font-weight: 700;
}

/* Grilla de Juegos */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* Tarjeta de Juego Individual */
.game-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.game-card-image-container {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #f3f4f6;
}
.game-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Efecto de superposición al pasar el ratón */
.game-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.game-card:hover .game-card-overlay {
    opacity: 1;
}

.game-card-overlay .game-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    transform: translateY(15px);
    transition: transform 0.3s ease;
}
.game-card:hover .game-card-overlay .game-title {
    transform: translateY(0);
}

.game-card-overlay .play-button {
    margin-top: 0.75rem;
    background-color: #C70064;
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(15px);
    transition: transform 0.3s ease 0.1s, background-color 0.2s;
}
.game-card:hover .play-button {
    transform: translateY(0);
}
.game-card-overlay .play-button:hover {
    background-color: #A30050;
}


/* Modal del Juego (ya tiene tema oscuro, lo que crea un buen contraste) */
.game-modal {
    display: none; position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.8); z-index: 2000; align-items: center; justify-content: center;
}
.game-modal-content {
    background-color: #1f2937; width: 95vw; height: 95vh; max-width: 1280px; display: flex; flex-direction: column; border-radius: 0.5rem; overflow: hidden; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}
.game-modal-header {
    display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; background-color: #374151; color: white; flex-shrink: 0;
}
.game-modal-title {
    font-size: 1.125rem; font-weight: 600;
}
.game-modal-close-btn {
    font-size: 2rem; color: #9ca3af; background: none; border: none; cursor: pointer; line-height: 1; transition: color 0.2s ease, transform 0.2s ease;
}
.game-modal-close-btn:hover {
    color: white; transform: rotate(90deg);
}
.game-modal-body {
    flex-grow: 1; background-color: #000;
}
.game-modal-body iframe {
    width: 100%; height: 100%; border: none;
}